Handle mains power for Matter appliances (#121023)
This commit is contained in:
parent
ba7e45e157
commit
52627b9aed
4 changed files with 35 additions and 3 deletions
|
@ -315,14 +315,19 @@ async def test_room_airconditioner(
|
|||
state = hass.states.get("climate.room_airconditioner_thermostat")
|
||||
assert state
|
||||
assert state.attributes["current_temperature"] == 20
|
||||
assert state.attributes["min_temp"] == 16
|
||||
assert state.attributes["max_temp"] == 32
|
||||
# room airconditioner has mains power on OnOff cluster with value set to False
|
||||
assert state.state == HVACMode.OFF
|
||||
|
||||
# test supported features correctly parsed
|
||||
# WITHOUT temperature_range support
|
||||
mask = ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.TURN_OFF
|
||||
assert state.attributes["supported_features"] & mask == mask
|
||||
|
||||
# set mains power to ON (OnOff cluster)
|
||||
set_node_attribute(room_airconditioner, 1, 6, 0, True)
|
||||
await trigger_subscription_callback(hass, matter_client)
|
||||
state = hass.states.get("climate.room_airconditioner_thermostat")
|
||||
|
||||
# test supported HVAC modes include fan and dry modes
|
||||
assert state.attributes["hvac_modes"] == [
|
||||
HVACMode.OFF,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue