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

Use __qualname__ to make ids unique for settings and sensors #1589

Merged
merged 1 commit into from Nov 9, 2022

Conversation

starkillerOG
Copy link
Contributor

@starkillerOG starkillerOG commented Nov 9, 2022

Split out from #1586

set the id to the qualified_name instead of only the function name (in order to prevent unique_id collisions in HomeAssistant for example with DNDStatus.start and CleaningDetails.start)

@codecov-commenter
Copy link

codecov-commenter commented Nov 9, 2022

Codecov Report

Merging #1589 (8dab28c) into master (b5a2940) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1589   +/-   ##
=======================================
  Coverage   80.88%   80.88%           
=======================================
  Files         156      156           
  Lines       15254    15256    +2     
  Branches     3283     3283           
=======================================
+ Hits        12338    12340    +2     
  Misses       2667     2667           
  Partials      249      249           
Impacted Files Coverage Δ
miio/devicestatus.py 90.54% <100.00%> (+0.26%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@starkillerOG starkillerOG mentioned this pull request Nov 9, 2022
@rytilahti rytilahti changed the title Make decorator id more unique for settings and sensors Use __qualname__ to make ids unique for settings and sensors Nov 9, 2022
Copy link
Owner

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

LGTM, I edited the title a bit 👍
@starkillerOG On those CI errors, I'm wondering if you are basing your branches on master that does not have #1565?

@rytilahti rytilahti added the bug label Nov 9, 2022
@rytilahti rytilahti merged commit b9e042e into rytilahti:master Nov 9, 2022
@starkillerOG
Copy link
Contributor Author

I schould be basing on the default https://github.com/rytilahti/python-miio/ (master) branch when I make new branches...
(I use Github Desktop)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants