Fix scene validator (#40140)

This commit is contained in:
Paulus Schoutsen committed 2020-09-16 20:42:47 +00:00
1 parent f1169120ae
commit c62a6cd779
2 files changed
+13 -4

No files matched your search

@@ -320,3 +320,12 @@ async def test_config(hass):
no_icon = hass.states.get("scene.scene_no_icon")
assert no_icon is not None
assert "icon" not in no_icon.attributes
def test_validator():
"""Test validators."""
parsed = ha_scene.STATES_SCHEMA({"light.Test": {"state": "on"}})
assert len(parsed) == 1
assert "light.test" in parsed
assert parsed["light.test"].entity_id == "light.test"
assert parsed["light.test"].state == "on"