Add tests for KNX light (#58912)

* test lights: simple, brightness, color_temp

* hs, xyy, rgb individual

* test rgb, rgbw
pull/59121/head
Matthias Alphart 2021-11-04 22:43:38 +01:00 committed by GitHub
parent ea4009fd81
commit 4d4d778598
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1049 additions and 0 deletions

View File

@ -30,6 +30,13 @@ class KNXTestKit:
# telegrams to an InternalGroupAddress won't be queued here
self._outgoing_telegrams: asyncio.Queue = asyncio.Queue()
def assert_state(self, entity_id: str, state: str, **attributes) -> None:
"""Assert the state of an entity."""
test_state = self.hass.states.get(entity_id)
assert test_state.state == state
for attribute, value in attributes.items():
assert test_state.attributes.get(attribute) == value
async def setup_integration(self, config):
"""Create the KNX integration."""

File diff suppressed because it is too large Load Diff