-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Fibaro light/rgbw controller brightness controls throwing exceptions, making the entity unusable #55386
Comments
fibaro documentation |
Workaround (for light devices that have the ability to set brightness): as a (very ugly, if I might add) workaround, if you run into this issue:
Once you've done that, you should at least get the basic functionality from the device in Home Assistant ;) (Beware though, this will only work for actual lights, not for switches, if you have this problem with a switch, make sure its |
Bump. Waiting for PR to come through, waiting for maintainer to approve CI workflow? |
Very keen to see this fixed too. |
FYI, this was released in 2021.11.0, confirmed fixed as of that version :) |
I’ve been watching closely too. Confirming working here in 2021.10.7 too. Thanks again for your work. |
The problem
Main problem
Fibaro rgbw lights brightness control broken, will throw an exception about
NoneType
not being aninteger
Expected behavior
Light works as intended and shows on/off, brightness and color controls*
Actual behavior
Light either does not function at all or will only operate the on/off and color functions*
thrown exception (excerpt):
'>' not supported between instances of 'nonetype' and 'int'
*see details and gifs below for more clarity
Details:
Whilst setting up a new system we got to including the existing Fibaro stuff (which is running on an Home Center 3, latest software as of this writing, which is 5.080.x), however, this starts throwing exceptions regarding the brightness attribute.
Although the system did actually register the devices, we're not able to control them.
That is to say: sometimes it'll pop on and will give on/off and color controls, but it won't give brightness controls. Other times, it simply refuses to turn on at all.
In both cases, an exception gets thrown when the code tries to set the brightness level.
In all fairness, there's only one that I'll get to turn on, which is only because I've tinkered with it through the developer tools to "force" it's brightness value to 100, once I'd do that, I'd get on/off and color control (although it remains flaky, at best).
Now, in another location, we have similar setup, but on that location the entire setup works flawesly.
There's 2 differences on that location: 1) uses an HC3 Lite instead of a full-fledged HC3, 2) the Fibaro software version is 5.070.x, e.g. one minor lower.
What was tried to fix it
Now, I've tried the following things in an effort to fix the issue (none of them worked):
The exceptions
(this is the 'brightness-uncontrollable-exception')
(this is the 'cannot-be-added-to-system-exception')
Pretty gifs and pictures for clarity :)
Note how the light will just "turn off again" (no, I did not click it again ;) it turns off by itself)
![light_wont_turn_on](https://user-images.githubusercontent.com/10909193/131227090-83c1e055-0179-4c00-abe7-ea0a456ec520.gif)
Here you can see the one light that actually gives on/off and color control, but the brightness control does not work.
![light_on_no_bri_control](https://user-images.githubusercontent.com/10909193/131227133-76605914-12fa-4902-b947-f04c0ef84f50.gif)
this is the debug logging that rolled out of that, note how it seems to constantly call "turn_on" even if the light is already on (this would happen if we'd move the brightness slider):
![log_from_gifs](https://user-images.githubusercontent.com/10909193/131227189-a8ec62a3-3294-41bf-9e82-b4a046ef3299.png)
Personally I suspect Fibaro has changed something in their REST API which is causing these problems (since an older version of the same device does not have these issues), but I'm just not well versed enough in the home assistant code nor python to fix this myself :(
Could anyone help with this problem? (if anything is missing from the issue, please let me know so I can add it)
What is version of Home Assistant Core has the issue?
core-2021.8.8
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Fibaro
Link to integration documentation on our website
https://www.home-assistant.io/integrations/fibaro/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 451, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 500, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 857, in state_attributes data[ATTR_BRIGHTNESS] = self.brightness File "/usr/src/homeassistant/homeassistant/components/fibaro/light.py", line 82, in brightness return scaleto255(self._brightness) File "/usr/src/homeassistant/homeassistant/components/fibaro/light.py", line 25, in scaleto255 if value > 98: TypeError: '>' not supported between instances of 'NoneType' and 'int' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 587, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 711, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 464, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 500, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 857, in state_attributes data[ATTR_BRIGHTNESS] = self.brightness File "/usr/src/homeassistant/homeassistant/components/fibaro/light.py", line 82, in brightness return scaleto255(self._brightness) File "/usr/src/homeassistant/homeassistant/components/fibaro/light.py", line 25, in scaleto255 if value > 98: TypeError: '>' not supported between instances of 'NoneType' and 'int'
Additional information
No response
The text was updated successfully, but these errors were encountered: