Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source_address in Telegram() #516

Merged
merged 9 commits into from
Nov 29, 2020
Merged

Conversation

farmio
Copy link
Member

@farmio farmio commented Nov 28, 2020

Description

  • add Telegram.source_address
  • use positional arguments in tests for Telegram() (i was half way through when I realized I should just move Telegram.source_address - so I finished, but I think its nicer to read anyway)

first point of #497

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • I have performed a self-review of my own code
  • The documentation has been adjusted accordingly
  • The changes generate no new warnings
  • Tests have been added that prove the fix is effective or that the feature works
  • The changes are documented in the changelog
  • The Homeassistant plugin has been adjusted in case of new config options

@farmio farmio requested a review from marvin-w November 28, 2020 23:01
@coveralls
Copy link

coveralls commented Nov 28, 2020

Coverage Status

Coverage increased (+0.08%) to 94.581% when pulling 05f8764 on farmio:Telegram.source_address into 4a3718d on XKNX:master.

marvin-w
marvin-w approved these changes Nov 29, 2020
Copy link
Member

@marvin-w marvin-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me - tested with the telegram monitor:

Telegram received: <Telegram source_address="PhysicalAddress("1.1.37")", destination_address="GroupAddress("1/0/34")", payload="<DPTBinary value="0" />" telegramtype="TelegramType.GROUP_WRITE" direction="TelegramDirection.INCOMING" />
Telegram received: <Telegram source_address="PhysicalAddress("1.1.37")", destination_address="GroupAddress("1/0/34")", payload="<DPTBinary value="1" />" telegramtype="TelegramType.GROUP_WRITE" direction="TelegramDirection.INCOMING" />
Telegram received: <Telegram source_address="PhysicalAddress("1.1.37")", destination_address="GroupAddress("1/0/34")", payload="<DPTBinary value="0" />" telegramtype="TelegramType.GROUP_WRITE" direction="TelegramDirection.INCOMING" />
Telegram received: <Telegram source_address="PhysicalAddress("1.1.37")", destination_address="GroupAddress("1/0/34")", payload="<DPTBinary value="1" />" telegramtype="TelegramType.GROUP_WRITE" direction="TelegramDirection.INCOMING" />
Telegram received: <Telegram source_address="PhysicalAddress("1.1.37")", destination_address="GroupAddress("1/0/34")", payload="<DPTBinary value="0" />" telegramtype="TelegramType.GROUP_WRITE" direction="TelegramDirection.INCOMING" />
Telegram received: <Telegram source_address="PhysicalAddress("1.1.120")", destination_address="GroupAddress("7/0/0")", payload="<DPTBinary value="0" />" telegramtype="TelegramType.GROUP_WRITE" direction="TelegramDirection.INCOMING" />

You should also adjust https://github.com/farmio/xknx/blob/Telegram.source_address/xknx/core/value_reader.py#L51

changelog.md Outdated Show resolved Hide resolved
@marvin-w marvin-w merged commit 825ea63 into XKNX:master Nov 29, 2020
@farmio farmio deleted the Telegram.source_address branch June 5, 2021 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants