mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Switch Mill to ClimateEntityFeature (#69293)
This commit is contained in:
parent
95a97d99dd
commit
396fddfbfa
@ -9,8 +9,7 @@ from homeassistant.components.climate.const import (
|
|||||||
FAN_ON,
|
FAN_ON,
|
||||||
HVAC_MODE_HEAT,
|
HVAC_MODE_HEAT,
|
||||||
HVAC_MODE_OFF,
|
HVAC_MODE_OFF,
|
||||||
SUPPORT_FAN_MODE,
|
ClimateEntityFeature,
|
||||||
SUPPORT_TARGET_TEMPERATURE,
|
|
||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -117,10 +116,10 @@ class MillHeater(CoordinatorEntity, ClimateEntity):
|
|||||||
|
|
||||||
if heater.generation < 3:
|
if heater.generation < 3:
|
||||||
self._attr_supported_features = (
|
self._attr_supported_features = (
|
||||||
SUPPORT_TARGET_TEMPERATURE | SUPPORT_FAN_MODE
|
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self._attr_supported_features = SUPPORT_TARGET_TEMPERATURE
|
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||||
|
|
||||||
self._update_attr(heater)
|
self._update_attr(heater)
|
||||||
|
|
||||||
@ -201,7 +200,7 @@ class LocalMillHeater(CoordinatorEntity, ClimateEntity):
|
|||||||
_attr_hvac_modes = [HVAC_MODE_HEAT]
|
_attr_hvac_modes = [HVAC_MODE_HEAT]
|
||||||
_attr_max_temp = MAX_TEMP
|
_attr_max_temp = MAX_TEMP
|
||||||
_attr_min_temp = MIN_TEMP
|
_attr_min_temp = MIN_TEMP
|
||||||
_attr_supported_features = SUPPORT_TARGET_TEMPERATURE
|
_attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||||
_attr_target_temperature_step = PRECISION_WHOLE
|
_attr_target_temperature_step = PRECISION_WHOLE
|
||||||
_attr_temperature_unit = TEMP_CELSIUS
|
_attr_temperature_unit = TEMP_CELSIUS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user