Avoid arbitrarily reducing ZHA climate temperature information (#43442)
The Zigbee specification mandates that temperatures are given in 1/100ths of degrees, and several devices are able to provide temperature readings or accept target temperature settings with precision equal or better than 0.1°C. Yet the ZHA climate entity implementation advertises an hard-coded precision of 0.5°C. Avoid arbitrary coarsening by advertising 0.1°C precision, as passing through the full 0.01°C precision is probably not that useful.pull/43473/head
parent
db60a71603
commit
b2bd68a4a0
|
@ -36,7 +36,7 @@ from homeassistant.components.climate.const import (
|
||||||
SUPPORT_TARGET_TEMPERATURE,
|
SUPPORT_TARGET_TEMPERATURE,
|
||||||
SUPPORT_TARGET_TEMPERATURE_RANGE,
|
SUPPORT_TARGET_TEMPERATURE_RANGE,
|
||||||
)
|
)
|
||||||
from homeassistant.const import ATTR_TEMPERATURE, PRECISION_HALVES, TEMP_CELSIUS
|
from homeassistant.const import ATTR_TEMPERATURE, PRECISION_TENTHS, TEMP_CELSIUS
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
from homeassistant.helpers.event import async_track_time_interval
|
from homeassistant.helpers.event import async_track_time_interval
|
||||||
|
@ -287,7 +287,7 @@ class Thermostat(ZhaEntity, ClimateEntity):
|
||||||
@property
|
@property
|
||||||
def precision(self):
|
def precision(self):
|
||||||
"""Return the precision of the system."""
|
"""Return the precision of the system."""
|
||||||
return PRECISION_HALVES
|
return PRECISION_TENTHS
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def preset_mode(self) -> Optional[str]:
|
def preset_mode(self) -> Optional[str]:
|
||||||
|
|
Loading…
Reference in New Issue