Seeing super odd behavior on Sengled Element Color Plus bulbs using the native Sengled Element Color Plus (non-legacy) driver.
20ish identical bulbs with confirmed identical settings (e.g. firmware, has room, has color prestaging) that work fine from within Hubitat, when connected to Google Home, a handful of them absolutely will not connect to Google Home (native) app. They appear as an option but when chosen, the ones in question throw errors such as this one:
app:572022-01-02 02:08:56.088 pm warnThe following devices are not supported by Google Home and will be removed from your device list:[Reids Lamp, Playroom Lamp]
When I switch over to using Google Home Community, these same bulbs throw an error of:
app:402022-01-02 02:02:25.054 pm errorjava.lang.NullPointerException: Cannot invoke method multiply() on null object on line 2556 (method handleAction)
app:402022-01-02 02:02:25.025 pm debug{"inputs":[{"intent":"action.devices.QUERY","payload":{"devices":[{"id":"710"}]}}],"requestId":"2678394742959206721"}
In the Google Community app, line 2556 contains:
hue = Math.round(hue * 360 / 100)
and the "hue" variable is defined by
def hue = device.currentValue(deviceTrait.hueAttribute)
The devices that are throwing errors appear to have no value at all for hue. Not zero, just no value.
Setting the hue value to anything fixes the problem permanently.
SO... @bptworld I think there is a tiny bug in the sengled driver in that the hue value is not returned until it is manually set by the user. Although it's super tiny, I see from these forums that a number of other folks have run into this issue and their resolution is usually to create a group with a single device. I suspect this works because a group device doesn't report all of the color bulb capabilities. Possibly return 0 for hue if it is undefined or alternatively initialize the hue variable just once on device initialization?
Happy to do some further debugging if I can be helpful, but since I can't look at native driver code I'm at a bit of an impass and can only hope that the brilliant @bptworld may be able to take a peek and fix in a future release