Button card question

I am a total noob with HA and am trying to kick of a sequence in NodeRed. I found this link which explains exactly what I want to do.

I get to the bit “and a button in Lovelace” with the following code (below)… I have no clue how to add this to configuration.yaml, everything I seem to try is not working. That coupled with long reboot times is making this very tedious to say the least. I am sure this is very easy once you know how…

Any help would be appreciated…

- type: entity-button
  entity: script.good_morning
  name: "Good Morning"
  icon: mdi:coffee
  tap_action:
    action: call-service
    service: script.turn_on
    service_data:
      entity_id: script.good_morning

thanks,

Nick

You add it in your user interface.

Watch the video on this link

I tried doing that but it told me that the UI doesn’t accept “Service_data” which I need to be sent down to NodeRed to determine what script was used.

You have to switch the card to yaml mode. There’s a button at the bottom of every card.

Also, you can call a script without turning it on directly:

- type: entity-button
  entity: script.good_morning
  name: "Good Morning"
  icon: mdi:coffee
  tap_action:
    action: call-service
    service: script.good_morning

2020-10-23_12-23-10

Got it to work…

Thanks for the assistance!!