mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
bitwise and for test supported_features (#58097)
This commit is contained in:
parent
b507b9ebfb
commit
e2303dc713
@ -871,7 +871,7 @@ async def test_implemented_percentage(hass, speed_count, percentage_step):
|
||||
state = hass.states.get("fan.mechanical_ventilation")
|
||||
attributes = state.attributes
|
||||
assert attributes["percentage_step"] == percentage_step
|
||||
assert attributes.get("supported_features") or SUPPORT_SET_SPEED
|
||||
assert attributes.get("supported_features") & SUPPORT_SET_SPEED
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||
@ -939,7 +939,7 @@ async def test_implemented_preset_mode(hass, start_ha):
|
||||
state = hass.states.get("fan.mechanical_ventilation")
|
||||
attributes = state.attributes
|
||||
assert attributes.get("percentage") is None
|
||||
assert attributes.get("supported_features") or SUPPORT_PRESET_MODE
|
||||
assert attributes.get("supported_features") & SUPPORT_PRESET_MODE
|
||||
|
||||
|
||||
@pytest.mark.parametrize("count,domain", [(1, DOMAIN)])
|
||||
|
Loading…
x
Reference in New Issue
Block a user