Use EntityFeature enum in components (m**) (#69414)
* Use EntityFeature in melcloud * Use EntityFeature in mystrom * Use EntityFeature in mysensors * Use EntityFeature in myq * Use EntityFeature in mpd * Use EntityFeature in monoprice * Use EntityFeature in moehlenhoff_alpha2 * Use EntityFeature in modern_forms * Use EntityFeature in modbus * Use EntityFeature in melissa * Use EntityFeature in mediaroom * Use EntityFeature in maxcube * Use EntityFeature in manual_mqtt * Fix maxcube tests * Revert "Use EntityFeature in modbus" This reverts commit56cf9d900d
. * Revert "Use EntityFeature in myq" This reverts commit44a31b1a03
. * Revert "Use EntityFeature in mystrom" This reverts commit7260ee0384
. * Revert "Revert "Use EntityFeature in modbus"" This reverts commit916a612a60
. * Revert "Revert "Use EntityFeature in myq"" This reverts commita6be42fa17
.
This commit is contained in:
parent
8e090a8c04
commit
5e2cc2b9b0
15 changed files with 109 additions and 160 deletions
|
@ -39,6 +39,7 @@ from homeassistant.components.climate.const import (
|
|||
SERVICE_SET_HVAC_MODE,
|
||||
SERVICE_SET_PRESET_MODE,
|
||||
SERVICE_SET_TEMPERATURE,
|
||||
ClimateEntityFeature,
|
||||
)
|
||||
from homeassistant.components.maxcube.climate import (
|
||||
MAX_TEMPERATURE,
|
||||
|
@ -46,7 +47,6 @@ from homeassistant.components.maxcube.climate import (
|
|||
OFF_TEMPERATURE,
|
||||
ON_TEMPERATURE,
|
||||
PRESET_ON,
|
||||
SUPPORT_FLAGS,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID,
|
||||
|
@ -89,7 +89,10 @@ async def test_setup_thermostat(hass, cube: MaxCube):
|
|||
PRESET_ON,
|
||||
]
|
||||
assert state.attributes.get(ATTR_PRESET_MODE) == PRESET_NONE
|
||||
assert state.attributes.get(ATTR_SUPPORTED_FEATURES) == SUPPORT_FLAGS
|
||||
assert (
|
||||
state.attributes.get(ATTR_SUPPORTED_FEATURES)
|
||||
== ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.PRESET_MODE
|
||||
)
|
||||
assert state.attributes.get(ATTR_MAX_TEMP) == MAX_TEMPERATURE
|
||||
assert state.attributes.get(ATTR_MIN_TEMP) == 5.0
|
||||
assert state.attributes.get(ATTR_CURRENT_TEMPERATURE) == 19.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue