-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] light unavailable after 2022.9.0 upadate #713
Comments
second this |
third with same problem |
Second this too. I thought I was the only one with issue, until I just found this bug. Have this notification: shelly.light (Show logs) Looking into logs, nothing to find there. |
Same problem after I updated to HA 20220907-0 today. Logger: homeassistant.setup
|
Same issue after todays upgrade. Logger: homeassistant.setup 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: |
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 |
Same issue |
same issue |
any solution or we are waiting for a new release? |
I have the same problem. Logger: homeassistant.setup 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)). |
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 basnijholt/adaptive-lighting#336 |
Just remove this lines from light.py
as speciifed in this url: ca4b860 and restart HA |
can you tell me what is the path to this file? |
config\custom_components\shelly\light.py |
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? |
To those wanting to correct it by themselves, keep the second line of this block above (as specified in the original fix: ca4b860). |
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). |
That diff is not complete, I think. You also have to delete the line which references |
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. |
Hey! Thank you. It works for my rgbw2 and shelly dimmers. But I dont use the white channel with the rgbw2 only the rgb. |
Hi Hakana, I think that you made it. My Dimmer & Duo lights are back to life :) This is good news. |
@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? |
That's actually what the new |
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 |
How is it working in core integration. Is there two entities, one for rgb and one for white channel? Can you take a screen shot?
…________________________________
From: doug62 ***@***.***>
Sent: Saturday, September 17, 2022 5:07:05 AM
To: StyraHem/ShellyForHASS ***@***.***>
Cc: Håkan Åkerberg ***@***.***>; Mention ***@***.***>
Subject: Re: [StyraHem/ShellyForHASS] [BUG] light unavailable after 2022.9.0 upadate (Issue #713)
@hakana<https://github.com/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
—
Reply to this email directly, view it on GitHub<#713 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAI5KDSOIFQW7ZDCEJJZQ63V6UYVTANCNFSM6AAAAAAQHBGP5Q>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I have a more or less working setup with MQTT default light schema, if you want to use it just change the mqtt:
light:
- name: "ledstrip"
qos: 2
rgbw_command_topic: "shellies/shellyrgbw2-<deviceId>/color/0/set"
rgbw_state_topic: "shellies/shellyrgbw2-<deviceId>/color/0/status"
rgbw_command_template: >
{"red": {{ red }}, "green": {{ green }}, "blue": {{ blue }}, "white": {{ white }} }
rgbw_value_template: >
{{value_json.red|int}},{{value_json.green|int}},{{value_json.blue|int}},{{value_json.white|int}}
brightness_scale: 100
brightness_command_topic: "shellies/shellyrgbw2-<deviceId>/color/0/set"
brightness_state_topic: "shellies/shellyrgbw2-<deviceId>/color/0/status"
brightness_command_template: >
{%- if value == 1 -%}
{ "gain": 0 }
{%- else -%}
{ "gain": {{ value }} }
{%- endif -%}
brightness_value_template: "{{ value_json.gain }}"
command_topic: "shellies/shellyrgbw2-<deviceId>/color/0/command"
state_topic: "shellies/shellyrgbw2-<deviceId>/color/0/status"
payload_on: "on"
payload_off: "off"
state_value_template: >
{%- if value_json.ison -%}
on
{%- else -%}
off
{%- endif -%}
effect_list:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
effect_command_topic: "shellies/shellyrgbw2-<deviceId>/color/0/set"
effect_state_topic: "shellies/shellyrgbw2-<deviceId>/color/0/status"
effect_command_template: >
{"effect": {{ value }} }
effect_value_template: "{{ value_json.effect }}" The way this works is the following:
Update 9/29/2022:I realized I had a bug in the above code, so I updated the post with the working one. After fixing some of the issues, I can confirm that I can control the white value with a slider using slider-entity-row. Using the above I have a working setup which does the exact same as before. Also please note that the |
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
The text was updated successfully, but these errors were encountered: