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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip unsupported LIFX Switches during discovery #67726
Conversation
This resolves an issue with the underlying library waiting for a response from the switches that will never arrive. Signed-off-by: Avi Miller <me@dje.li>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
@@ -74,6 +74,7 @@ | |||
UNAVAILABLE_GRACE = 90 | |||
|
|||
FIX_MAC_FW = AwesomeVersion("3.70") | |||
SWITCH_PRODUCT_IDS = [70, 71, 89] |
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.
It would be cleaner if the library provided this in the future.
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.
It would be even better if the library supported the Switch.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
There is no ETA. Please just be patient. Thanks 馃憤 Let's keep comments on PR towards the actual review as well. If you have further/other questions, please use our community forum or Discord chat. ../Frenck |
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.
Thanks, @Djelibeybi 馃憤
You're welcome @frenck. If I may: the LIFX integration is showing its age and needs more than a little bit of love. Where's the right place to discuss what's required and how best to implement those requirements? In particular, I'd be keen to replace the underlying library used, and I'd love to get feedback from others. |
@Djelibeybi Well, you can show it some love by opening PRs of course :) For the library, I think it is always best (for the whole Python ecosystem) to discuss library changes with the current maintainer of the library. If you have further questions in general, please feel free to join our Discord chat. ../Frenck |
Great, thanks. |
This resolves an issue with the underlying library waiting for
a response from the switches that will never arrive.
Signed-off-by: Avi Miller me@dje.li
Proposed change
This change adjusts the discovery of LIFX devices so that switches are skipped. This is due to the underlying
aiolifx
library's lack of support for switches and the core integration's assumption that all LIFX devices are bulbs. Thebulb.get_color
call will hang for about 2-3 minutes for each switch discovered without this fix.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: