Support multiple Hue bridges with lights of the same id#11259
Conversation
There was a problem hiding this comment.
continuation line under-indented for visual indent
There was a problem hiding this comment.
continuation line under-indented for visual indent
There was a problem hiding this comment.
line too long (95 > 79 characters)
a4ce97b to
1879320
Compare
There was a problem hiding this comment.
continuation line under-indented for visual indent
There was a problem hiding this comment.
continuation line under-indented for visual indent
There was a problem hiding this comment.
line too long (95 > 79 characters)
1879320 to
19ab528
Compare
|
Could this please be merged in dev to apply this in my setup. |
|
@thundergreen I would appreciate you testing this since I only have one bridge right now. You can download the diff from my repo and apply it on top of your dev tree. That said I just pushed a fix for the lint warnings so this should be ready for review. |
…me id. The old code pre-refactoring kept a per-bridge list of lights in a closure; my refactoring moved that to hass.data, which is convenient but caused them to conflict with each other. Fixes home-assistant#11183
19ab528 to
8d825bf
Compare
|
I switched back tob0.59.2 as all kind of modifications won't work for me but that's maybe also my fault |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Looks ok to me. I think the hue light platform could benefit of another refactor to make it more DRY and less convoluted, but that's for another PR. A small comment below.
|
|
||
| with patch('homeassistant.components.light.hue.get_bridge_type', | ||
| return_value=self.mock_bridge_type): | ||
| with patch('homeassistant.components.light.hue.HueLight.' + |
pvizeli
left a comment
There was a problem hiding this comment.
Ready to merge after address other comments
|
@pvizeli I don't think there are other changes pending, after you removed the |
* Improve support for multiple Hue bridges with lights that have the same id. The old code pre-refactoring kept a per-bridge list of lights in a closure; my refactoring moved that to hass.data, which is convenient but caused them to conflict with each other. Fixes #11183 * Update test_hue.py
Description:
The old code pre-refactoring kept a per-bridge list of lights in a closure; my refactoring moved that to hass.data, which is convenient but caused them to conflict with each other.
Related issue (if applicable): fixes #11183
If the code communicates with devices, web services, or third-party tools:
toxrun successfully. Your PR cannot be merged unless tests pass