Remove service helper (4) (#16892)

* Update media_player

* Update lock

* Update notify

* Update remote

* Update scene

* Update vacuum

* Remove timer helpers

* Removed unused legacy helpers
This commit is contained in:
cdce8p authored and Paulus Schoutsen committed 2018-09-26 18:02:05 +02:00
1 parent d0ddc28f96
commit dd45e99302
23 files changed
+499 -520

No files matched your search

+6 -4
View File
@@ -5,7 +5,9 @@ import unittest
from homeassistant.setup import setup_component
import homeassistant.components.remote as remote
from homeassistant.const import STATE_ON, STATE_OFF
from tests.common import get_test_home_assistant
from tests.components.remote import common
ENTITY_ID = 'remote.remote_one'
@@ -28,22 +30,22 @@ class TestDemoRemote(unittest.TestCase):
def test_methods(self):
"""Test if services call the entity methods as expected."""
remote.turn_on(self.hass, entity_id=ENTITY_ID)
common.turn_on(self.hass, entity_id=ENTITY_ID)
self.hass.block_till_done()
state = self.hass.states.get(ENTITY_ID)
self.assertEqual(state.state, STATE_ON)
remote.turn_off(self.hass, entity_id=ENTITY_ID)
common.turn_off(self.hass, entity_id=ENTITY_ID)
self.hass.block_till_done()
state = self.hass.states.get(ENTITY_ID)
self.assertEqual(state.state, STATE_OFF)
remote.turn_on(self.hass, entity_id=ENTITY_ID)
common.turn_on(self.hass, entity_id=ENTITY_ID)
self.hass.block_till_done()
state = self.hass.states.get(ENTITY_ID)
self.assertEqual(state.state, STATE_ON)
remote.send_command(self.hass, 'test', entity_id=ENTITY_ID)
common.send_command(self.hass, 'test', entity_id=ENTITY_ID)
self.hass.block_till_done()
state = self.hass.states.get(ENTITY_ID)
self.assertEqual(