Skip to content

Commit

Permalink
add test for fan
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Jul 2, 2024
1 parent 1b2d468 commit 96525cb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/components/matter/test_fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ async def test_fan_base(
await trigger_subscription_callback(hass, matter_client)
state = hass.states.get(entity_id)
assert state.attributes["preset_mode"] == "sleep_wind"
# set mains power to OFF (OnOff cluster)
set_node_attribute(air_purifier, 1, 6, 0, False)
await trigger_subscription_callback(hass, matter_client)
state = hass.states.get(entity_id)
assert state.attributes["preset_mode"] is None
assert state.attributes["percentage"] == 0


async def test_fan_turn_on_with_percentage(
Expand Down

0 comments on commit 96525cb

Please sign in to comment.