Add unique IDs to automation/scenes (#31150)

* Add unique IDs to automation and scenes

* Fix typo
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-01-26 23:01:35 -08:00
1 parent 8fff6462a1
commit 1f0f62de7f
14 files changed
+123 -27

No files matched your search

+9 -1
View File
@@ -3,7 +3,7 @@ import io
import unittest
from homeassistant.components import light, scene
from homeassistant.setup import setup_component
from homeassistant.setup import async_setup_component, setup_component
from homeassistant.util.yaml import loader as yaml_loader
from tests.common import get_test_home_assistant
@@ -128,3 +128,11 @@ class TestScene(unittest.TestCase):
assert self.light_1.is_on
assert self.light_2.is_on
assert 100 == self.light_2.last_call("turn_on")[1].get("brightness")
async def test_services_registered(hass):
"""Test we register services with empty config."""
assert await async_setup_component(hass, "scene", {})
assert hass.services.has_service("scene", "reload")
assert hass.services.has_service("scene", "turn_on")
assert hass.services.has_service("scene", "apply")