Skip to content

Commit

Permalink
Merge f4df2a9 into 6b2e8d7
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Nov 29, 2020
2 parents 6b2e8d7 + f4df2a9 commit 83799ac
Show file tree
Hide file tree
Showing 33 changed files with 585 additions and 229 deletions.
6 changes: 5 additions & 1 deletion changelog.md
Expand Up @@ -2,9 +2,13 @@

## Unreleased changes

### HA integration

- knx_event: add `source` attribute

### Internals

- Telegram: `group_address` renamed to `destination_address`, to prepare support for other APCI services.
- Telegram: `group_address` renamed to `destination_address`, to prepare support for other APCI services and add `source_address`
- Farewell Travis CI; Welcome Github Actions!

## 0.15.6 Bugfix for StateUpater 2020-11-26
Expand Down
8 changes: 6 additions & 2 deletions examples/example_tunnel.py
Expand Up @@ -37,9 +37,13 @@ async def main():
await tunnel.connect_udp()
await tunnel.connect()

await tunnel.send_telegram(Telegram(GroupAddress("1/0/15"), payload=DPTBinary(1)))
await tunnel.send_telegram(
Telegram(destination_address=GroupAddress("1/0/15"), payload=DPTBinary(1))
)
await asyncio.sleep(2)
await tunnel.send_telegram(Telegram(GroupAddress("1/0/15"), payload=DPTBinary(0)))
await tunnel.send_telegram(
Telegram(destination_address=GroupAddress("1/0/15"), payload=DPTBinary(0))
)
await asyncio.sleep(2)

await tunnel.connectionstate()
Expand Down
1 change: 1 addition & 0 deletions home-assistant-plugin/custom_components/xknx/__init__.py
Expand Up @@ -327,6 +327,7 @@ async def telegram_received_cb(self, telegram):
{
"address": str(telegram.destination_address),
"data": telegram.payload.value,
"source": str(telegram.source_address),
},
)

Expand Down
4 changes: 3 additions & 1 deletion test/devices_tests/binary_sensor_test.py
Expand Up @@ -196,7 +196,9 @@ def test_process_wrong_payload(self):
"""Test process wrong telegram (wrong payload type)."""
xknx = XKNX()
binary_sensor = BinarySensor(xknx, "Warning", group_address_state="1/2/3")
telegram = Telegram(GroupAddress("1/2/3"), payload=DPTArray((0x1, 0x2, 0x3)))
telegram = Telegram(
destination_address=GroupAddress("1/2/3"), payload=DPTArray((0x1, 0x2, 0x3))
)
with self.assertRaises(CouldNotParseTelegram):
self.loop.run_until_complete(binary_sensor.process(telegram))

Expand Down

0 comments on commit 83799ac

Please sign in to comment.