Switch Mill to ClimateEntityFeature (#69293)

pull/69298/head
Daniel Hjelseth Høyer 2022-04-04 20:46:46 +02:00 committed by GitHub
parent 95a97d99dd
commit 396fddfbfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -9,8 +9,7 @@ from homeassistant.components.climate.const import (
FAN_ON,
HVAC_MODE_HEAT,
HVAC_MODE_OFF,
SUPPORT_FAN_MODE,
SUPPORT_TARGET_TEMPERATURE,
ClimateEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
@ -117,10 +116,10 @@ class MillHeater(CoordinatorEntity, ClimateEntity):
if heater.generation < 3:
self._attr_supported_features = (
SUPPORT_TARGET_TEMPERATURE | SUPPORT_FAN_MODE
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE
)
else:
self._attr_supported_features = SUPPORT_TARGET_TEMPERATURE
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
self._update_attr(heater)
@ -201,7 +200,7 @@ class LocalMillHeater(CoordinatorEntity, ClimateEntity):
_attr_hvac_modes = [HVAC_MODE_HEAT]
_attr_max_temp = MAX_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_temperature_unit = TEMP_CELSIUS