Open damianbraun opened 1 year ago
second this
third with same problem
Second this too. I thought I was the only one with issue, until I just found this bug. Was thinking towards 2022.9 update of HA
Have this notification: The following integrations and platforms could not be set up:
shelly.light (Show logs) Please check your config and logs.
Looking into logs, nothing to find there.
Same problem after I updated to HA 20220907-0 today.
Logger: homeassistant.setup Source: setup.py:320 First occurred: 21:42:46 (1 occurrences) Last logged: 21:42:46
Unable to prepare setup for platform shelly.light: Platform not found (cannot import name 'ATTR_WHITE_VALUE' from 'homeassistant.components.light' (/usr/src/homeassistant/homeassistant/components/light/__init__.py)).
Same issue after todays upgrade.
Logger: homeassistant.setup Source: setup.py:320 First occurred: 8:33:12 AM (1 occurrences) Last logged: 8:33:12 AM
Unable to prepare setup for platform shelly.light: Platform not found (cannot import name 'ATTR_WHITE_VALUE' from 'homeassistant.components.light' (/usr/src/homeassistant/homeassistant/components/light/init.py)).
Found the issue cause: Remove white_value support from light (@emontnemery - #76926) (light docs) (group docs) (flux docs) (switch_as_x docs)
Found the issue cause: Remove white_value support from light (@emontnemery - #76926) (light docs) (group docs) (flux docs) (switch_as_x docs)
Let’s hope someone can have a look at it. Hmm something was ready to get removed 1,5 years ago..?? Finally removed, I guess I missed the breaking changes
Have made a very crude fix to at least get most of your lights working again - but this doesn't fix RGBW lights https://github.com/StyraHem/ShellyForHASS/pull/714
Same issue
same issue
any solution or we are waiting for a new release?
I have the same problem.
Logger: homeassistant.setup Source: setup.py:320 First occurred: 11:04:32 (1 occurrences) Last logged: 11:04:32
Unable to prepare setup for platform shelly.light: Platform not found (cannot import name 'ATTR_WHITE_VALUE' from 'homeassistant.components.light' (/usr/src/homeassistant/homeassistant/components/light/init.py)).
Have made a very crude fix to at least get most of your lights working again - but this doesn't fix RGBW lights
714
hey thx, how can i use your fix?
best regards
Same problem, I restored a backup. What to do now ?
Note this is affecting other integrations since 2022.9 also https://github.com/basnijholt/adaptive-lighting/issues/336
Have made a very crude fix to at least get most of your lights working again - but this doesn't fix RGBW lights
714
hey thx, how can i use your fix?
best regards
ATTR_WHITE_VALUE,
SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, SUPPORT_EFFECT,
SUPPORT_WHITE_VALUE,
if ATTR_WHITE_VALUE in kwargs:
white_value = int(kwargs[ATTR_WHITE_VALUE])
self._white_value = white_value
as speciifed in this url: https://github.com/StyraHem/ShellyForHASS/pull/714/commits/ca4b860f6985b3c3e845f74f93bfc9e661a7959e
and restart HA
Have made a very crude fix to at least get most of your lights working again - but this doesn't fix RGBW lights
714
hey thx, how can i use your fix? best regards
Just remove this lines from light.py
ATTR_WHITE_VALUE, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, SUPPORT_EFFECT, SUPPORT_WHITE_VALUE,
if ATTR_WHITE_VALUE in kwargs: white_value = int(kwargs[ATTR_WHITE_VALUE]) self._white_value = white_value
as speciifed in this url: ca4b860
and restart HA
can you tell me what is the path to this file? thx best regards
Have made a very crude fix to at least get most of your lights working again - but this doesn't fix RGBW lights
714
hey thx, how can i use your fix? best regards
Just remove this lines from light.py
ATTR_WHITE_VALUE, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, SUPPORT_EFFECT, SUPPORT_WHITE_VALUE,
if ATTR_WHITE_VALUE in kwargs: white_value = int(kwargs[ATTR_WHITE_VALUE]) self._white_value = white_value
as speciifed in this url: ca4b860 and restart HA
can you tell me what is the path to this file? thx best regards
config\custom_components\shelly\light.py
@antoweb thank you very much! :) Strange thing, the light entities are very slow now, but i just checked from extern @work, so i must check when im at home.
You are welcome. But this is a workaround, we are waiting for a definitive solution
We working on a new release.
After deleting those lines the error is gone. Thanx
Duplicate of #706
+1 - Same problem
Any timeline when the fix will be officially published?
ATTR_WHITE_VALUE, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, SUPPORT_EFFECT, SUPPORT_WHITE_VALUE,
To those wanting to correct it by themselves, keep the second line of this block above (as specified in the original fix: https://github.com/StyraHem/ShellyForHASS/commit/ca4b860f6985b3c3e845f74f93bfc9e661a7959e).
To simplify it even further, remove ONLY the red lines, and leave everything else as is.
Close the file and restart HA.
ATTR_WHITE_VALUE, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, SUPPORT_EFFECT, SUPPORT_WHITE_VALUE,
To those wanting to correct it by themselves, keep the second line of this block above (as specified in the original fix: ca4b860).
This does not fix RGBW2 devices, anyone has a quick workaround for RGBW2?
same issue here. I'm not in a hurry with the fix as restored a backup but would obviously like to have the new bells and whistles from the new core. When could this fix be expected roughly? I do have those rgbw bulbs so the workaround is probably not for me.
Same issue, please fix. The "manual" fix referenced above fixes the issue for me temporarily (Dimmer2).
To simplify it even further, remove ONLY the red lines, and leave everything else as is.
Close the file and restart HA.
I can also confirm that the temporary fix is working, I had issues with Shelly Bulb Duo and Shelly Dimmer
To simplify it even further, remove ONLY the red lines, and leave everything else as is.
Close the file and restart HA.
I can also confirm that the temporary fix is working, I had issues with Shelly Bulb Duo and Shelly Dimmer
Unfortunately it did not worked for me :( Neither the Dimmer2 nor the Duo Hope Shelly will issue an update on this matter !
That diff is not complete, I think. You also have to delete the line which references SUPPORT_WHITE_VALUE
. I have the Dimmer 2 and it did work for me.
Same problem here
Same problem
Same here :( my fishes now lack of sunrise and moonlight :P
I have created a new release 1.0.2. Now it is in pre-release/beta mode. Can you please test and I will change it to a full release shortly.
This fix removes the white_channel for RGBW2 in color mode. We looking for a solution for this. I think the only solution is to add another entity for the white channel in parallel to the RGB entity. Does someone know a better solution? I'm very busy right now so any help is needed!
Hey! Thank you. It works for my rgbw2 and shelly dimmers. But I dont use the white channel with the rgbw2 only the rgb.
I have created a new release 1.0.2. Now it is in pre-release/beta mode. Can you please test and I will change it to a full release shortly.
Hi Hakana, I think that you made it. My Dimmer & Duo lights are back to life :) This is good news. Thanks for your quick action ! philippe
@hakana - I think that solution should be okay. Anyway I do not think anyone is using White + RGB at the same time. Even on the UI I have a single slider for brightness today which I control differently: if 'white_value > 0' I change white_value else I control brightness. In addition I have several pre-defined colors for easy change and there is one which changes brightness to '1' and white_value to 255 (so this is the white setting basically).
I've been using MQTT so far for RGBW2 but even with that the issue is the same. You could use the default light template and more or less it works, but it is not perfect.
Another workable solution I could imagine is to have a virtual 'mode' switch which needs to be set either 'white' or 'RGB' and the brightness would control the white brightness in white mode and the RGB brightness in RGB mode.
Maybe it is just time to migrate to native Shelly integration.. I thought that this integration would be up-to-date not that something is forgotten to be implemented and that author do not have time.. sorry - but this is probably something that author need to be hear..
If there is no time, no problem, but be honest and publish this and give project to someone else.. simply my humble opinion.
PS. this so called hotfix broke rgbw2 behaive as was before, so it is not hotfix but half way baked patch..
@dolenec you know they're sharing this for free, developing it in their own spare time? It's not a product you've bought. The speed with which they deployed this hotfix (even though the auther mentioned he's very busy atm) is something to thank them for, not to get annoyed at :\ Also, he repeatedly asked for help, so there's no option to 'give it to someone else' as noone has the skills and time to help.
Perhaps you'd be better off buying something off the shelves?
Another workable solution I could imagine is to have a virtual 'mode' switch which needs to be set either 'white' or 'RGB' and the brightness would control the white brightness in white mode and the RGB brightness in RGB mode.
That's actually what the new ColorMode.WHITE
is supposed to be used for. See: https://github.com/home-assistant/core/pull/51411 and https://developers.home-assistant.io/docs/core/entity/light/#color-modes
Another workable solution I could imagine is to have a virtual 'mode' switch which needs to be set either 'white' or 'RGB' and the brightness would control the white brightness in white mode and the RGB brightness in RGB mode.
That's actually what the new
ColorMode.WHITE
is supposed to be used for. See: https://github.com/home-assistant/core/pull/51411 and https://developers.home-assistant.io/docs/core/entity/light/#color-modes
Note that there is actually an enum called ColorMode.RGBW in the link.
FWIW - I purchase cheap LED strips from China, $8/15ft, I have about 15 RGBW2s, I DO USE RGB+W to change the color/temperature of the whites, There is a way to control W+RGB, the WIZ integration does this, there is also a way to factor W into the RBG in some color spaces, I haven't reviewed the details but: 1) Folks do use RGB+W; 2) There is an existing pattern (WIZ) And sorry - though I'm experienced C# dev I know/care nothing about Python so can't really contribute but THANKS to those who do!
Assuming that this broke RGBW (which I'm heavily dependent upon), it is probably time to move to the native integration - does anyone know of any reasons why/how to do this? Is one "better" than the other?
It's a trap! This integration has RGBW feature broken. And official HA integration does NOT support Shelly4pro. For me there is no fully functional integration for all shelly devices. Only way is use one or other integration and integrate unsupported device(s) some other way (REST, MQTT, ..).
FWIW - The core/shelly does have both color+white on RGBW2
@hakana - Thanks for your work, earlier you were asking for a pattern, i have confirmed that the core shelly rgbw2 works same as this used to flawlessly, I'm not a python dev, looking at their code at https://github.dev/home-assistant/core/blob/38b087d2209dbe26f90676ecebf90fc1b97836e3/homeassistant/components/shelly/light.py#L12
Environment
Describe the bug
After 2022.9.0 update, light entities of shelly dimmer 2's became unavailable.
Steps to Reproduce
Expected behavior
Screenshots
Traceback/Error logs
Logger: homeassistant.setup Source: setup.py:320 First occurred: 20:14:23 (3 occurrences) Last logged: 20:21:03
Unable to prepare setup for platform shelly.light: Platform not found (cannot import name 'ATTR_WHITE_VALUE' from 'homeassistant.components.light' (/usr/src/homeassistant/homeassistant/components/light/init.py)).
Additional context