Allow sending GroupValueResponse telegrams with knx.send service (#62639)
* Add knx.respond service * Combine knx.send and knx.respond services * Rename knx attribute and fix tests * Use parametrization in tests Co-authored-by: Marvin Wichmann <marvin.wichmann@unic.com>
This commit is contained in:
parent
7185e1140d
commit
ab4effc7e2
4 changed files with 119 additions and 41 deletions
|
@ -109,7 +109,7 @@ class KNXTestKit:
|
|||
# APCI Service tests
|
||||
####################
|
||||
|
||||
async def _assert_telegram(
|
||||
async def assert_telegram(
|
||||
self,
|
||||
group_address: str,
|
||||
payload: int | tuple[int, ...] | None,
|
||||
|
@ -141,19 +141,19 @@ class KNXTestKit:
|
|||
|
||||
async def assert_read(self, group_address: str) -> None:
|
||||
"""Assert outgoing GroupValueRead telegram. One by one in timely order."""
|
||||
await self._assert_telegram(group_address, None, GroupValueRead)
|
||||
await self.assert_telegram(group_address, None, GroupValueRead)
|
||||
|
||||
async def assert_response(
|
||||
self, group_address: str, payload: int | tuple[int, ...]
|
||||
) -> None:
|
||||
"""Assert outgoing GroupValueResponse telegram. One by one in timely order."""
|
||||
await self._assert_telegram(group_address, payload, GroupValueResponse)
|
||||
await self.assert_telegram(group_address, payload, GroupValueResponse)
|
||||
|
||||
async def assert_write(
|
||||
self, group_address: str, payload: int | tuple[int, ...]
|
||||
) -> None:
|
||||
"""Assert outgoing GroupValueWrite telegram. One by one in timely order."""
|
||||
await self._assert_telegram(group_address, payload, GroupValueWrite)
|
||||
await self.assert_telegram(group_address, payload, GroupValueWrite)
|
||||
|
||||
####################
|
||||
# Incoming telegrams
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue