sbidy / wiz_light

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

Fixed color temp. bulbs not working after upgrade from 0.4.2 #211

Closed zsilbi closed 2 years ago

zsilbi commented 2 years ago

Hello!

Recently upgraded from 0.4.2 to 0.4.4 and lost connection to my E27 filament bulbs: https://www.wizconnected.com/en/consumer/products/8718699787332/

This is the dimmable only version. (color temperature is fixed)

2021-12-16 08:00:55 ERROR (MainThread) [homeassistant.components.light] Error while setting up wiz_light platform for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/wiz_light/light.py", line 47, in async_setup_entry
    wizbulb = WizBulbEntity(
  File "/config/custom_components/wiz_light/light.py", line 75, in __init__
    self._attr_min_mireds = self.get_min_mireds()
  File "/config/custom_components/wiz_light/light.py", line 178, in get_min_mireds
    self._bulbtype.kelvin_range.max
AttributeError: 'NoneType' object has no attribute 'max'

All my other bulbs (E14, GU10) were still working correctly.

I tried deleting and re-adding the intergration for these bulbs. The integration was successfully added but no devices were present in them.

After downgrading to 0.4.2, everything works as intended.

Thanks, zsilbi

sbidy commented 2 years ago

I cross-checked that issue and in my test setup with exactly that type of bulb - ESP06_SHTW1_01 (this is the controller name for the ST64) with no issues.

Can you please run pip show pywizlight and check that you are running on the latest version (0.4.13)? If not, install it with pip install pywizlight==0.4.13 or restart HASS after you updated the integration.

The ST64 is a Tunable-White bulb, so there should be a warm-white and cold-white functionality. I will cross-check again with a Dimmable White (SHDW) bulb with no color temperature (kelvin).

zsilbi commented 2 years ago

The ST64 is a Tunable-White bulb, so there should be a warm-white and cold-white functionality.

I think there are 2 versions of ST64. (at least according to the website) If I use 0.4.2, there is only a brightness slider in HA, there is no option to change the color temp.

I don't have shell access to the core at the moment so I can't check the pywizlight version. (I am running the latest HassOS 7.0 inside a VM with core-2021.12.2.)

zsilbi commented 2 years ago

Just checked the bulb type: ESP06_SHDW1_01

sbidy commented 2 years ago

Now fixed in Release v0.4.5

bdraco commented 2 years ago

This can be closed as its confirmed fixed in the core version