core: Twinkly doesn't turn on

The problem

Just as in https://github.com/home-assistant/core/issues/43913 and https://github.com/home-assistant/core/issues/60144, the Twinkly integration is currently unable to turn on lights (Twinkly AWW 400, firmware 3.0.7).

In order to turn on the lights I need to use the brightness, because the on command doesn’t work. Looking at the code I think the problem is on these lines in light.py:

           brightness = int(int(kwargs[ATTR_BRIGHTNESS]) / 2.55)

           # If brightness is 0, the twinkly will only "disable" the brightness,
           # which means that it will be 100%.
           if brightness == 0:
               await self._client.turn_off()
               return

           await self._client.set_brightness(brightness)

Turning off works as expected.

What version of Home Assistant Core has the issue?

2022.11.3

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

twinkly

Link to integration documentation on our website

https://www.home-assistant.io/integrations/twinkly/

Diagnostics information

No response

Example YAML snippet

service: light.turn_on
data:
  entity_id: light.twinkly_albero

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (3 by maintainers)

Most upvoted comments

I’m having this problem too. For light.turn_on, I’ve also set the brightness_pct to 100 to work around it.