1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 04:50:05 +00:00

Add brightness_step to light.turn_on (#31452)

* Clean up light turn on service

* Add brightness_step to turn_on schema

* Fix import

* Fix imports 2

* Fix RFLink test
This commit is contained in:
Paulus Schoutsen
2020-02-04 16:13:29 -08:00
committed by GitHub
parent e970177eeb
commit c85a7934ed
7 changed files with 115 additions and 73 deletions

View File

@@ -298,18 +298,16 @@ async def test_signal_repetitions_cancelling(hass, monkeypatch):
DOMAIN, SERVICE_TURN_OFF, {ATTR_ENTITY_ID: DOMAIN + ".test"}
)
hass.async_create_task(
hass.services.async_call(
DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: DOMAIN + ".test"}
)
await hass.services.async_call(
DOMAIN, SERVICE_TURN_ON, {ATTR_ENTITY_ID: DOMAIN + ".test"}, blocking=True
)
await hass.async_block_till_done()
assert protocol.send_command_ack.call_args_list[0][0][1] == "off"
assert protocol.send_command_ack.call_args_list[1][0][1] == "on"
assert protocol.send_command_ack.call_args_list[2][0][1] == "on"
assert protocol.send_command_ack.call_args_list[3][0][1] == "on"
assert [call[0][1] for call in protocol.send_command_ack.call_args_list] == [
"off",
"on",
"on",
"on",
]
async def test_type_toggle(hass, monkeypatch):