Fix bond fan.turn_on with OFF speed (#39387)

This commit is contained in:
Eugene Prystupa authored and GitHub committed 2020-08-29 17:03:19 -05:00
1 parent 7469f57a7b
commit 867d5088e3
2 files changed
+23 -1

No files matched your search

+12
View File
@@ -144,6 +144,18 @@ async def test_turn_on_fan_without_speed(hass: core.HomeAssistant):
mock_turn_on.assert_called_with("test-device-id", Action.turn_on())
async def test_turn_on_fan_with_off_speed(hass: core.HomeAssistant):
"""Tests that turn on command delegates to turn off API."""
await setup_platform(
hass, FAN_DOMAIN, ceiling_fan("name-1"), bond_device_id="test-device-id"
)
with patch_bond_action() as mock_turn_off, patch_bond_device_state():
await turn_fan_on(hass, "fan.name_1", fan.SPEED_OFF)
mock_turn_off.assert_called_with("test-device-id", Action.turn_off())
async def test_turn_off_fan(hass: core.HomeAssistant):
"""Tests that turn off command delegates to API."""
await setup_platform(