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

Handle invalid payloads per RemoteValue, log a readable warning #861

Merged
merged 4 commits into from Feb 6, 2022

Conversation

farmio
Copy link
Member

@farmio farmio commented Feb 5, 2022

Description

Handle invalid payloads in RemoteValue. Log a warning when RemoteValue.payload_valid() fails for each RemoteValue processing the Telegram instead of handling the exception in TelegramQueue.
As a result wrongly configured GAs can be identified more easily and wrongly configured GAs (eg. from typos) for one device don't affect other devices.

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

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.

Good idea, just some minor comment for now.

xknx/remote_value/remote_value.py Outdated Show resolved Hide resolved
@farmio farmio marked this pull request as ready for review February 6, 2022 09:33
@farmio farmio requested a review from marvin-w February 6, 2022 09:35
@farmio
Copy link
Member Author

farmio commented Feb 6, 2022

Issue reported in home-assistant/core#59170 (comment)

@codecov
Copy link

codecov bot commented Feb 6, 2022

Codecov Report

Merging #861 (f438052) into main (f0c8789) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #861      +/-   ##
==========================================
+ Coverage   95.70%   95.73%   +0.03%     
==========================================
  Files         114      114              
  Lines        6960     7009      +49     
==========================================
+ Hits         6661     6710      +49     
  Misses        299      299              
Impacted Files Coverage Δ
xknx/remote_value/remote_value.py 100.00% <100.00%> (ø)
xknx/remote_value/remote_value_1count.py 100.00% <100.00%> (ø)
xknx/remote_value/remote_value_climate_mode.py 97.91% <100.00%> (+0.18%) ⬆️
xknx/remote_value/remote_value_color_rgb.py 100.00% <100.00%> (ø)
xknx/remote_value/remote_value_color_rgbw.py 100.00% <100.00%> (ø)
xknx/remote_value/remote_value_color_xyy.py 100.00% <100.00%> (ø)
xknx/remote_value/remote_value_control.py 89.28% <100.00%> (+0.82%) ⬆️
xknx/remote_value/remote_value_datetime.py 100.00% <100.00%> (ø)
...x/remote_value/remote_value_dpt_2_byte_unsigned.py 100.00% <100.00%> (ø)
...nx/remote_value/remote_value_dpt_value_1_ucount.py 100.00% <100.00%> (ø)
... and 10 more

@farmio farmio merged commit 810cee0 into XKNX:main Feb 6, 2022
@farmio farmio deleted the parse-error-handling branch February 6, 2022 13:07
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.

None yet

2 participants