Remove service helper (5) (#16917)

* Update switch

* Update script

* Update light

* Fix tests

* Fix config/script hook

* Async_create_task

* Fix flux switch
This commit is contained in:
cdce8p authored and Paulus Schoutsen committed 2018-09-27 23:13:11 +02:00
1 parent a7248d4574
commit 70b901017f
27 files changed
+385 -316

No files matched your search

+3 -3
View File
@@ -1,11 +1,11 @@
"""The tests for the Template switch platform."""
from homeassistant.core import callback
from homeassistant import setup
import homeassistant.components as core
from homeassistant.const import STATE_ON, STATE_OFF
from tests.common import (
get_test_home_assistant, assert_setup_component)
from tests.components.switch import common
class TestTemplateSwitch:
@@ -406,7 +406,7 @@ class TestTemplateSwitch:
state = self.hass.states.get('switch.test_template_switch')
assert state.state == STATE_OFF
core.switch.turn_on(self.hass, 'switch.test_template_switch')
common.turn_on(self.hass, 'switch.test_template_switch')
self.hass.block_till_done()
assert len(self.calls) == 1
@@ -442,7 +442,7 @@ class TestTemplateSwitch:
state = self.hass.states.get('switch.test_template_switch')
assert state.state == STATE_ON
core.switch.turn_off(self.hass, 'switch.test_template_switch')
common.turn_off(self.hass, 'switch.test_template_switch')
self.hass.block_till_done()
assert len(self.calls) == 1