Help with create a button for tuya scene

Hi,
I am learning to use home assistant and i am new to this, i tried searching for a solution, didn’t find it yet, maybe someone can help me

I have integration with tuya, in tuya i created a Tap-to-run buttons for the tv remote, they show up in HA as scene

for example:

type: entities
entities:

  • scene.1z6lhmsr2pfiupsm

i don’t like how its look and wanted to create a button, so i used

type: button
entity: scene.1z6lhmsr2pfiupsm

so this is working, but when clicking on it, another window will appear and i have to click on activate, please see attached image, is there a way to create a button that will run the scene without the need of the 2 steps for every click ?

You can do this in the following way. Make sure you have selected code editor for editing card.

type: button
tap_action:
  action: call-service
  service: scene.turn_on
  service_data:
    entity_id: scene.1z6lhmsr2pfiupsm
entity: scene.1z6lhmsr2pfiupsm
3 Likes

thanks for answering, i tried it, get an error: failed to call service scene/turn_on.sequence item 0:expected str instance, optional found

there was a small spelling mistake in the code above. I have editted it, now please try it

thanks! working great

Thanks a lot sheminasalam
I used the solution too, and working.
My next try will be to make it aditionally a togle button somehow :sweat_smile: :sweat_smile: