Multiple Devices on dashboard button localtuya

I have two string lights I am trying to set scenes for right. Right now it’s a dashboard button, but I hope to re-use what I figure out here for automation’s as well. I am trying to send the command to two different strings. Is there a way I can do this with two device id’s, or is there a better way to write this button? I found this elsewhere and adapted it so it’s not mine.

      - type: custom:button-card
        aspect_ratio: 2/1
        name: Multi
        tap_action:
          action: call-service
          service: localtuya.set_dp
          service_data:
            value: scene9
            device_id: <device_id>
            dp: 2

Just create a script with two service calls and use it on dashboard

Works perfectly, thanks!

1 Like