-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Rename Telegram.group_address
to Telegram.destination_address
.
#510
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this change. Thank you! Splitting it apart makes a lot of sense considering the size of the original PR. Once the minor issue is fixed we can merge this.
f99fa91
to
767540e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, thank you!
Hint: Please don't force push once someone reviewed it as it's hard to find the actual changes.
I'm aware of the hint, but in this case I did it directly since the change was so small ;-) Next time I'll do a fixup commit and then squash once approved. |
Cool! 👍 And yes, it was really small 👯 No need to manually squash. We can just squash the whole PR when merging. |
Since a Telegram has a destination address and a source address it would be nice to call it eg. one of "destination_address", "dest_address", "destination". |
Just to get this straight: I just want to avoid renaming Telegram.group_address twice. |
That's fine. So let's call it |
Great! Descriptive is always nice. 😃 |
This renames `Telegram.group_address` to `Telegram.address`. This makes it possible to use a telegram for non-broadcast types of messages.
Per feedback, rename this to `Telegram.destination_address`.
767540e
to
6028759
Compare
Rebased the PR and adapted |
Telegram.group_address
to Telegram.address
.Telegram.group_address
to Telegram.destination_address
.
@basilfx Please fix the merge conflicts and the linting error (black formatting). https://travis-ci.org/github/XKNX/xknx/jobs/746142703#L349 Pre-commit will do this automatically for you. EDIT: Took care of it already. |
# Conflicts: # changelog.md
Pushed one more to changelog.md since the field was renamed. |
Thanks! Merged. |
@@ -110,13 +110,13 @@ def to_knx(self, value): | |||
|
|||
async def process(self, telegram, always_callback=False): | |||
"""Process incoming or outgoing telegram.""" | |||
if not self.has_group_address(telegram.group_address): | |||
if not self.has_group_address(telegram.destination_address): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this raise TypeError if destination_address is a PhysicalAddress ? Could this even happen? Is this tested?
Line 64 in f1f654f
if type(self) is not type(other): |
Description
This PR is a part of #253, for easier reviewing.
In this PR, I refactored
Telegram.group_address
toTelegram.address
telegram.destination_address
. Based on the type of address, the CEMIFrame is build with the proper flags set. This changes allows for the other changes of #253 to support non-broadcast APCI services.All high-level devices still use
group_address
, which still makes sense over there. They just update aTelegram.destination_address
with theirgroup_address
.Type of change
Checklist: