Closed majacob1 closed 8 months ago
I modified light.py to only send 'on' command only if there's no dimming value specified, otherwise it sets the light to 100% - for my setup this is working, but I'm not sure, if this is also working for other dimmable lights:
--- light.py.2.6.1 2023-10-08 09:56:25.708239798 +0200
+++ light.py 2023-10-08 10:21:59.319111660 +0200
@@ -216,12 +216,13 @@
async def async_turn_on(self, **kwargs):
"""Instruct the light to turn on."""
- await self.async_set_value_by_id(self._on_off_attr.id, 1)
if ATTR_BRIGHTNESS in kwargs and self._dimmer_attr is not None:
await self.async_set_value_by_id(
self._dimmer_attr.id, kwargs[ATTR_BRIGHTNESS] / 2.55
)
+ else:
+ await self.async_set_value_by_id(self._on_off_attr.id, 1)
if ATTR_COLOR_TEMP in kwargs and self._temp_attr is not None:
await self.async_set_value_by_id(
self._temp_attr.id,
Can you provide me with an info log as described in the readme?
The fix you propose is dependant on how lights handle the brightness setting. If every light turns on, when receiving a brightness value, this will work. I'll have a look how other integrations handle this.
Another approach would be to add logging of the brightness value which is passed to the turn_on function, to see, why in your case it is erroneously set to 10%
Can you provide me with an info log as described in the readme?
The fix you propose is dependant on how lights handle the brightness setting. If every light turns on, when receiving a brightness value, this will work. I'll have a look how other integrations handle this.
Another approach would be to add logging of the brightness value which is passed to the turn_on function, to see, why in your case it is erroneously set to 10%
I totally agree! Since I only own the Warema-Lights, I'm not sure if this is the 'normal' homee behaviour. I don't think it's an error with the library, since it's the same with the homee app: When I switch on the light using the on/off switch, it automatically goes directly to 100%, no matter what's the last dimming value - if I want to switch it on with e.g. 50%, I have to use the dimming slider.
It looks like all lights turn on if a dimming value is sent - so I try to change it according to your suggestion.
It's in the new beta release.
fixed with #49
Type of problem
Version
2.6.1
Detailed description
I'm using homee with the Warema Cube and want to control dimmable lights. When I set the dimming level to e.g. 10% it randomly jumps to 100%. This behaviour can not be observed when using the homee app.