Mill 3. gen add support for PRECISION_HALVES (#73592)
* Add support for PRECISION_HALVES for Mill 3. generation heaters * Add support for precision halves for Mill local API * Make sure to cast to float for local api * Support both float for gen 3 heaters and int for gen < 3 heaters when using cloud api * Mill attribute bugfix * Add support for PRECISION_HALVES for Mill 3. generation heaters * Add support for precision halves for Mill local API * Make sure to cast to float for local api * Support both float for gen 3 heaters and int for gen < 3 heaters when using cloud api * Mill attribute bugfix * Revert PRECISION_HALVES for Mill cloud integration * Remove unused code * Revert to casting to int for mill cloud integration * Remove unused codepull/77821/head
parent
03b3959b95
commit
b3596fdea1
|
@ -15,6 +15,7 @@ from homeassistant.const import (
|
|||
ATTR_TEMPERATURE,
|
||||
CONF_IP_ADDRESS,
|
||||
CONF_USERNAME,
|
||||
PRECISION_HALVES,
|
||||
PRECISION_WHOLE,
|
||||
TEMP_CELSIUS,
|
||||
)
|
||||
|
@ -200,7 +201,7 @@ class LocalMillHeater(CoordinatorEntity, ClimateEntity):
|
|||
_attr_max_temp = MAX_TEMP
|
||||
_attr_min_temp = MIN_TEMP
|
||||
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
_attr_target_temperature_step = PRECISION_WHOLE
|
||||
_attr_target_temperature_step = PRECISION_HALVES
|
||||
_attr_temperature_unit = TEMP_CELSIUS
|
||||
|
||||
def __init__(self, coordinator):
|
||||
|
@ -225,7 +226,7 @@ class LocalMillHeater(CoordinatorEntity, ClimateEntity):
|
|||
if (temperature := kwargs.get(ATTR_TEMPERATURE)) is None:
|
||||
return
|
||||
await self.coordinator.mill_data_connection.set_target_temperature(
|
||||
int(temperature)
|
||||
float(temperature)
|
||||
)
|
||||
await self.coordinator.async_request_refresh()
|
||||
|
||||
|
|
Loading…
Reference in New Issue