From 648f9e100d5702d6e7a79020cac17c74797d3b89 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Wed, 2 Dec 2020 10:53:26 +0100 Subject: [PATCH] Use light turn on service (#43847) --- .../components/automation/blueprints/motion_light.yaml | 4 ++-- tests/components/automation/test_blueprint.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/automation/blueprints/motion_light.yaml b/homeassistant/components/automation/blueprints/motion_light.yaml index 8b17fbe91fe..c10d3691e6b 100644 --- a/homeassistant/components/automation/blueprints/motion_light.yaml +++ b/homeassistant/components/automation/blueprints/motion_light.yaml @@ -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 diff --git a/tests/components/automation/test_blueprint.py b/tests/components/automation/test_blueprint.py index a455d1de5b5..0a651b501c5 100644 --- a/tests/components/automation/test_blueprint.py +++ b/tests/components/automation/test_blueprint.py @@ -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")