Adds new climate feature flags to melissa (#109469)
This commit is contained in:
parent
eb7d125976
commit
82a2980cbd
2 changed files with 9 additions and 2 deletions
|
@ -57,9 +57,13 @@ class MelissaClimate(ClimateEntity):
|
|||
|
||||
_attr_hvac_modes = OP_MODES
|
||||
_attr_supported_features = (
|
||||
ClimateEntityFeature.FAN_MODE | ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
ClimateEntityFeature.FAN_MODE
|
||||
| ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
_attr_temperature_unit = UnitOfTemperature.CELSIUS
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(self, api, serial_number, init_data):
|
||||
"""Initialize the climate device."""
|
||||
|
|
|
@ -223,7 +223,10 @@ async def test_supported_features(hass: HomeAssistant) -> None:
|
|||
device = (await api.async_fetch_devices())[_SERIAL]
|
||||
thermostat = MelissaClimate(api, _SERIAL, device)
|
||||
features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.FAN_MODE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
assert thermostat.supported_features == features
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue