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

+5 -4
View File
@@ -8,6 +8,7 @@ from homeassistant.components import switch
from homeassistant.const import STATE_ON, STATE_OFF, CONF_PLATFORM
from tests.common import get_test_home_assistant
from tests.components.switch import common
class TestSwitch(unittest.TestCase):
@@ -41,8 +42,8 @@ class TestSwitch(unittest.TestCase):
self.assertFalse(switch.is_on(self.hass, self.switch_2.entity_id))
self.assertFalse(switch.is_on(self.hass, self.switch_3.entity_id))
switch.turn_off(self.hass, self.switch_1.entity_id)
switch.turn_on(self.hass, self.switch_2.entity_id)
common.turn_off(self.hass, self.switch_1.entity_id)
common.turn_on(self.hass, self.switch_2.entity_id)
self.hass.block_till_done()
@@ -51,7 +52,7 @@ class TestSwitch(unittest.TestCase):
self.assertTrue(switch.is_on(self.hass, self.switch_2.entity_id))
# Turn all off
switch.turn_off(self.hass)
common.turn_off(self.hass)
self.hass.block_till_done()
@@ -64,7 +65,7 @@ class TestSwitch(unittest.TestCase):
self.assertFalse(switch.is_on(self.hass, self.switch_3.entity_id))
# Turn all on
switch.turn_on(self.hass)
common.turn_on(self.hass)
self.hass.block_till_done()