mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Add tests for KNX light (#58912)
* test lights: simple, brightness, color_temp * hs, xyy, rgb individual * test rgb, rgbw
This commit is contained in:
parent
ea4009fd81
commit
4d4d778598
@ -30,6 +30,13 @@ class KNXTestKit:
|
|||||||
# telegrams to an InternalGroupAddress won't be queued here
|
# telegrams to an InternalGroupAddress won't be queued here
|
||||||
self._outgoing_telegrams: asyncio.Queue = asyncio.Queue()
|
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):
|
async def setup_integration(self, config):
|
||||||
"""Create the KNX integration."""
|
"""Create the KNX integration."""
|
||||||
|
|
||||||
|
1042
tests/components/knx/test_light.py
Normal file
1042
tests/components/knx/test_light.py
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user