mirror of
https://github.com/home-assistant/core.git
synced 2025-08-10 08:05:06 +02:00
Use light turn on service (#43847)
This commit is contained in:
@@ -37,7 +37,7 @@ trigger:
|
|||||||
to: "on"
|
to: "on"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: homeassistant.turn_on
|
- service: light.turn_on
|
||||||
target: !input light_target
|
target: !input light_target
|
||||||
- wait_for_trigger:
|
- wait_for_trigger:
|
||||||
platform: state
|
platform: state
|
||||||
@@ -45,5 +45,5 @@ action:
|
|||||||
from: "on"
|
from: "on"
|
||||||
to: "off"
|
to: "off"
|
||||||
- delay: !input no_motion_wait
|
- delay: !input no_motion_wait
|
||||||
- service: homeassistant.turn_off
|
- service: light.turn_off
|
||||||
target: !input light_target
|
target: !input light_target
|
||||||
|
@@ -131,8 +131,8 @@ async def test_motion_light(hass):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
turn_on_calls = async_mock_service(hass, "homeassistant", "turn_on")
|
turn_on_calls = async_mock_service(hass, "light", "turn_on")
|
||||||
turn_off_calls = async_mock_service(hass, "homeassistant", "turn_off")
|
turn_off_calls = async_mock_service(hass, "light", "turn_off")
|
||||||
|
|
||||||
# Turn on motion
|
# Turn on motion
|
||||||
hass.states.async_set("binary_sensor.kitchen", "on")
|
hass.states.async_set("binary_sensor.kitchen", "on")
|
||||||
|
Reference in New Issue
Block a user