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

Avoid creating binary sensor for unsupported attributes #144

Closed
wants to merge 2 commits into from

Conversation

elupus
Copy link
Contributor

@elupus elupus commented Aug 6, 2024

Some of these are virtual attributes updated but "toggle" events the the OnOffClusterHandler, but not really supported by the device itself.

Some of these are virtual attributes updated but "toggle" events the the OnOffClusterHandler, but not really supported by the device itself.
Return entity if it is a supported configuration, otherwise return None
"""
cluster = cluster_handlers[0].cluster
if ENTITY_METADATA not in kwargs and (
Copy link
Contributor Author

@elupus elupus Aug 6, 2024

Choose a reason for hiding this comment

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

No idea why this is here, it was in one of the other handler like this.

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.

Project coverage is 95.67%. Comparing base (3a1e0d6) to head (41bfc3a).
Report is 22 commits behind head on dev.

Files Patch % Lines
...ha/application/platforms/binary_sensor/__init__.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #144      +/-   ##
==========================================
+ Coverage   95.64%   95.67%   +0.02%     
==========================================
  Files          61       61              
  Lines        9232     9264      +32     
==========================================
+ Hits         8830     8863      +33     
+ Misses        402      401       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@elupus
Copy link
Contributor Author

elupus commented Aug 6, 2024

Okey,. this is not going to fly. The whole stuff with handle_on_off_output_cluster_exception makes things weird here. We hook up the server cluster handler to the client (out) cluster.
How much will break if we drop that?

As far as i understand there are some weird Tuya devices that make use of this strangeness as well as perhaps some LUMI stuff (

)

@elupus
Copy link
Contributor Author

elupus commented Aug 6, 2024

I've opened #145 to try to figure out a better solution.

@elupus elupus closed this Aug 6, 2024
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.

1 participant