diyhue / diyHue

Main diyHue software repo
https://diyhue.org/
Other
1.52k stars 274 forks source link

Home assistant lights: Fix WARNING - ... is unreachable: 'NoneType' object is not subscriptable #990

Closed rernst closed 4 months ago

rernst commented 4 months ago

Home assistant only reports attributes if light is on, which currently results in the following error and a 'offline' flag in DiyHue: 2024-02-07 12:26:55,386 - services.stateFetch - WARNING - lamp.trapkast Light is unreachable: 'NoneType' object is not subscriptable

This is mainly caused by: diyhue_state['xy'] = [value[0], value[1]], the other values are set to None currently.

I am not sure what the desired behaviour is:

rernst commented 4 months ago

Thanks for merging, just tested it in Home Assistant and warning messages are gone.

mariusmotea commented 4 months ago

Thanks for your contribution to this project!