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 -3
View File
@@ -5,9 +5,11 @@ from unittest import mock
from homeassistant import setup
from homeassistant.components import litejet
from tests.common import get_test_home_assistant
import homeassistant.components.switch as switch
from tests.common import get_test_home_assistant
from tests.components.switch import common
_LOGGER = logging.getLogger(__name__)
ENTITY_SWITCH = 'switch.mock_switch_1'
@@ -88,11 +90,11 @@ class TestLiteJetSwitch(unittest.TestCase):
assert not switch.is_on(self.hass, ENTITY_SWITCH)
switch.turn_on(self.hass, ENTITY_SWITCH)
common.turn_on(self.hass, ENTITY_SWITCH)
self.hass.block_till_done()
self.mock_lj.press_switch.assert_called_with(ENTITY_SWITCH_NUMBER)
switch.turn_off(self.hass, ENTITY_SWITCH)
common.turn_off(self.hass, ENTITY_SWITCH)
self.hass.block_till_done()
self.mock_lj.release_switch.assert_called_with(ENTITY_SWITCH_NUMBER)