Update Hue Driver to accommodate 0.49.x changes for LAN Child Device Health #927
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes in hubcore 0.49 require LAN-parented Child Devices to manage their online/offline state explicitly instead of automagically following the parent's health, which is needed to allow for child devices to mark themselves offline independently.
There were places in the Hue driver that made assumptions around child devices always following their parents, so we need to make a few tweaks to address that.
Primarily:
online()
on themselves at the end of theirinit
block;offline
when the bridge goes offline, and will poll the actual Zigbee connectivity status reported by the bridge when the bridge comesonline
.The goal here is to try and minimize state divergence between local device watch and cloud health state; the cloud still has some rudimentary assumptions that child devices will follow parent devices, so we need to make the child devices behave the same way they would have in the past.
This supercedes #926 and #922