Need to turn on light twice to set color

LocalTuya integration with a generic Tuya bulb. I can set RGB color just fine in UI but if I call the light.turn_on service and enter color (regardless the method), it always turns on with neutral (white) light first, and only changes to the desired color on second call, with a short delay in between.

Any idea how to fix this? Nothing in log.

I have run into something similar to this before, and it came down to some bulb integrations are not capable of this. So now time to think outside the box. The solution that I came up with was not to turn the bulb off, sounds silly right. Instead, when I want to turn the bulb off I do this:

        - service: light.turn_on
          data:
            brightness: 0
            transition: 2
          target:
            entity_id: 
              - light.upstairs_hallway

Now that we have that, when I want to turn the light on with a certain color I do this:

        - service: light.turn_on
          data:
            brightness: 45
            rgb_color: [255,0,0]
            transition: 2
          target:
            entity_id: light.upstairs_hallway

This is the only way that I could find to accomplish this, so I hope this helps you in your situation.

1 Like

Thank you. I can live with my kludge that has the light turn on first, wait one second and THEN it is capable of turning the correct color.