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

process every incoming Telegram in all Devices #503

Merged
merged 3 commits into from Nov 25, 2020

Conversation

farmio
Copy link
Member

@farmio farmio commented Nov 21, 2020

Description

process every incoming Telegram in all Devices regardless if a callback for the GA is registered (eg. StateUpdater) or not.

This will process Telegrams from the Device class even when a callback for this GA is registered ge. from StateUpdater. Some RemoteValues have no callbacks set (ClimateMode, Cover.position) from their Device so the state would not get initialized properly.
Also devices that use same GAs will be updated each, instead only one.

I'm not sure why this even was prohibited before - maybe @Julius2342 can help me out here?

This will need some testing - especially for climate modes and cover positions (which I don't have in my installation).

Fixes # (issue)

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

regardless if a callback for the GA is registered (eg. StateUpdater) or not
@coveralls
Copy link

coveralls commented Nov 21, 2020

Coverage Status

Coverage decreased (-0.008%) to 94.491% when pulling 9b7cd0c on farmio:process-every-telegram into 73e42c0 on XKNX:master.

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.

Looks good to me. What I wonder is if this has any significant impact on performance but I guess not. Code looks fine. After the next python release we no longer need to manually define the AsyncMock (i.e. when we drop support for 3.7)

Can you maybe make coveralls happy :)?

@farmio
Copy link
Member Author

farmio commented Nov 24, 2020

I think we should just exclude (debug)logging from coveralls. Doesn't make much sense to write tests for a log message.

@marvin-w marvin-w merged commit cd02d86 into XKNX:master Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants