sbidy / wiz_light

A WiZ Light integration for Home Assistant
MIT License
341 stars 68 forks source link

Unable to add device ST19 Filament Model ID 23015 #197

Closed gkrickovic closed 2 years ago

gkrickovic commented 2 years ago

Logger: homeassistant.components.light Source: custom_components/wiz_light/light.py:395 Integration: Light (documentation, issues) First occurred: 11:33:45 PM (1 occurrences) Last logged: 11:33:45 PM

wiz_light: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 651, in async_device_update await task File "/config/custom_components/wiz_light/light.py", line 256, in async_update await self.update_scene_list() File "/config/custom_components/wiz_light/light.py", line 395, in update_scene_list self._scenes = list(_value.values()) AttributeError: 'list' object has no attribute 'values'

gkrickovic commented 2 years ago

version | core-2021.11.3 installation_type | Home Assistant OS

wizlight --version wizlight, version 0.4.8

Bulb that was successfully added: A19 Colors Model ID B23065 Firmware 1.24.0

Bulb that throws this error: ST19 Filament, Dimmable Model ID 23015 Firmware 1.24.0

gkrickovic commented 2 years ago

bash-5.1# cat /config/custom_components/wiz_light/manifest.json { "version": "0.4.2", ---- SNIP ----

gkrickovic commented 2 years ago

Bulb that was successfully added:

echo '{"method":"getPilot","params":{}}' | nc -u -w 1 192.168.1.20 38899 {"method":"getPilot","env":"pro","result":{"mac":"a8bb507aa352","rssi":-60,"src":"","state":true,"sceneId":29,"dimming":62}}

Bulb that throws the error:

bash-5.1# echo '{"method":"getPilot","params":{}}' | nc -u -w 1 192.168.1.34 38899 {"method":"getPilot","env":"pro","result":{"mac":"a8bb509f6ab2","rssi":-58,"src":"","state":true,"sceneId":29,"dimming":62}}

I tried updating pywizlight in the "homeassistant" docker container to 0.4.12 using pip install --upgrade, but after it is restarted, it reverts back to 0.4.8.

sbidy commented 2 years ago

There is an issue with the scenes. I have to reproduce the error with my fil-bulbs.

gkrickovic commented 2 years ago

I removed the integration and installed the commit 8c3939cc9e5089d77e8bc670f6d847a6cb534faa .

The bulb was detected and added properly, after adding the entry in the config YAML. It shows up in Lovelace and I can turn it on using the slider. However, the slider immediately reverts back to "off" position, leaving the bulb turned on. After that, I am unable to turn if off through the integration. The original error is also logged.

gkrickovic commented 2 years ago

wizlight off turns it off successfully.

sbidy commented 2 years ago

Please reinstall the integration with version 0.4.3. This should fix the issue.

gkrickovic commented 2 years ago

It works. Thank you!!!