Script light.turn_off or on doesn't trigger Tuya LED lights

I’ve set up a simple script to turn lights off on the ground floor. All lights are triggered except 3 different Tuya LED lights (a fairy light and two led strips). All these lights are confirmed in the areas associated with the floor.

alias: Lights - Turn Off on Ground
sequence:
  - action: light.turn_off
    metadata: {}
    data: {}
    target:
      floor_id: ground
description: ""
icon: mdi:lightbulb-off

Looking at the traces, it doesn’t list any of the 3 led lights in the Timeline Trace. It does work on other Tuya lightbulbs (and Zigbee and ESPHome lights etc).

Am I missing something here? Lights don’t seem to have a differentiator between bulbs or led strips.

My thoughts go straight to the Tuya integration as being the root cause. I’m guessing the other lights, not being Tuya based, are fine. Are all the lights being targeted cloud based or local or a mix of both?

I wonder (but doubt) if using a scene instead of a script makes any difference.

The Tuya lights are via the cloud integration (not LocalTuya). The other integrations controlling lights are a mixture of cloud and local.

I’d assume that HA treats any Tuya integration entity with lights.x the same?

Scenes can’t be targeted to floors by the looks. I was wanting a simple script to turn the lights off downstairs when we head up at night time.

Using the developer tool template I can list out all the lights (including the LED lights that don’t turn on) so I know HA recognises them on that floor.

{{ floor_areas('Ground') 
  | map('area_devices') | sum(start=[]) 
  | map('device_entities') | sum(start=[])
  | select('match', 'light') | list }}

Getting even more basic, if I use developer tools action to just call light.turn_on it won’t turn a Tuya LED light on when you target the Device. It will turn on a Tuya lightbulb when you add the Device.

If I target the Entity, it will turn on a Tuya LED light.

Can others replicate this to confirm it’s a bug? I assume when targeting Floor or Area the service is using the Device not the Entity.

This issue seems to have resolved itself. I was using version 2025.1.0 when I set up the script, and updating to 2025.1.2 it now works. I’m unsure if it would work on 2024.12.x but leaving this last comment for reference.