Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/components/knx/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ def __init__(self, hass: HomeAssistant):
# 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."""

Expand Down
Loading