Frontend: Climate entity ignores 'precision' in UI

Created on 11 Oct 2020  路  3Comments  路  Source: home-assistant/frontend

Checklist

  • [X] I have updated to the latest available Home Assistant version.
  • [X] I have cleared the cache of my browser.
  • [X] I have tried a different browser to see if it is related to my browser.

The problem


I have "generic thermostat" climate.* domain devices with precision: 0.1.
When I open those entities in UI view, I can only set the target temperature with step of 0.5, nothing in between.
image

Click of up or down arrow marked yellow on screenshot would make it either 19.5 or 18.5, not 19.1 and 18.9 as desired.

Expected behavior

Respect precision

Steps to reproduce


1. Add climate generic thermostat
2. Set it's precision to 0.1
3. Add the entity to 'entities' UI lovelace card
4. Open the entity
5. Try to set temperature with 0.1*C higher value than shown

Environment

  • Home Assistant release with the issue: 0.116.2
  • Last working Home Assistant release (if known): n/a
  • Browser and browser version: Chrome latest (no matter browser)
  • Operating system: Win 10

State of relevant entities


heat 
hvac_modes: heat, off 
min_temp: 10 
max_temp: 26 
preset_modes: none, away 
current_temperature: 20.7 
temperature: 19 
hvac_action: idle 
preset_mode: none 
friendly_name: Gara偶 
supported_features: 17

Problem-relevant configuration

- platform: generic_thermostat
  name: Gara偶
  heater: group.co_parter_garaz
  target_sensor: sensor.temperature_garaz
  min_temp: 10
  max_temp: 26
  precision: 0.1
  away_temp: 16
  hot_tolerance: 0
  cold_tolerance: 0.3
  min_cycle_duration:
    minutes: 30

Javascript errors shown in your browser console/inspector


Additional information

bug

Most helpful comment

It is actually a backend issue, since the generic_thermostat is not properly exposing the temperature step size and therefore the frontend cannot read it. The climate platform that I am using is for example properly exposing the step size, which is why it always worked for me.

I fixed generic_thermostat on my dev machine already and will prepare a PR for home-assistant/core. Let's leave this issue open until confirmed that my PR works.

The precision attribute in an ClimateEntity is meant to indicate how precise the sensor is, whereas for setting the target temperature there is a separate step size attribute. Since generic_thermostat does not have that currently I will have to use the precision as well or add a new attribute.

All 3 comments

The same problem for me. I have fresh install of HA and did not understand what happening. Previously I was using ~0.96.x version and everything was fine.

It is actually a backend issue, since the generic_thermostat is not properly exposing the temperature step size and therefore the frontend cannot read it. The climate platform that I am using is for example properly exposing the step size, which is why it always worked for me.

I fixed generic_thermostat on my dev machine already and will prepare a PR for home-assistant/core. Let's leave this issue open until confirmed that my PR works.

The precision attribute in an ClimateEntity is meant to indicate how precise the sensor is, whereas for setting the target temperature there is a separate step size attribute. Since generic_thermostat does not have that currently I will have to use the precision as well or add a new attribute.

Hit this issue too. Until core PR will be merged, I have workaround - configure target_temp_step via customize.yaml:

climate.garaz:
  target_temp_step: 0.1

Customization should be enabled first: https://www.home-assistant.io/docs/configuration/customizing-devices/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

casperklein picture casperklein  路  4Comments

Depechie picture Depechie  路  3Comments

aaron9060 picture aaron9060  路  3Comments

SeanPM5 picture SeanPM5  路  3Comments

Misiu picture Misiu  路  3Comments