Fix bond fans without defined max_speed (#38382)

This commit is contained in:
Eugene Prystupa authored and GitHub committed 2020-07-30 14:44:26 +02:00
1 parent 00a4bcff3d
commit a00aa6740e
3 files changed
+22 -4

No files matched your search

+14
View File
@@ -96,6 +96,20 @@ async def test_non_standard_speed_list(hass: core.HomeAssistant):
)
async def test_fan_speed_with_no_max_seed(hass: core.HomeAssistant):
"""Tests that fans without max speed (increase/decrease controls) map speed to HA standard."""
await setup_platform(
hass,
FAN_DOMAIN,
ceiling_fan("name-1"),
bond_device_id="test-device-id",
props={"no": "max_speed"},
state={"power": 1, "speed": 14},
)
assert hass.states.get("fan.name_1").attributes["speed"] == fan.SPEED_HIGH
async def test_turn_on_fan_with_speed(hass: core.HomeAssistant):
"""Tests that turn on command delegates to set speed API."""
await setup_platform(