Use light turn on service (#43847)

This commit is contained in:
Paulus Schoutsen 2020-12-02 10:53:26 +01:00 committed by GitHub
parent 93055884b7
commit 648f9e100d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ trigger:
to: "on"
action:
- service: homeassistant.turn_on
- service: light.turn_on
target: !input light_target
- wait_for_trigger:
platform: state
@ -45,5 +45,5 @@ action:
from: "on"
to: "off"
- delay: !input no_motion_wait
- service: homeassistant.turn_off
- service: light.turn_off
target: !input light_target

View File

@ -131,8 +131,8 @@ async def test_motion_light(hass):
},
)
turn_on_calls = async_mock_service(hass, "homeassistant", "turn_on")
turn_off_calls = async_mock_service(hass, "homeassistant", "turn_off")
turn_on_calls = async_mock_service(hass, "light", "turn_on")
turn_off_calls = async_mock_service(hass, "light", "turn_off")
# Turn on motion
hass.states.async_set("binary_sensor.kitchen", "on")