What is the most standard way to display a button in lovelace, fire a bunch of curls when pressed?

Hello,

I have read many ways to display button cards in lovelace. Many use custom cards which I don’t feel I need. I am looking for the most standard, simple solution to this issue.

The button is for preheating water pipes. There is an Arduino to which I can GET a URL to switch the pump on. There is a different Arduino to which I can GET a URL to open a solenoid valve. The latter is needed to avoid preheating all the pipes in the house.

So far, I have tried the following. I create an ugly button with this code:

type: entity-button
tap_action:
  action: none
hold_action:
  action: none
show_icon: true
show_name: true
entity: automation.precalentar_agua

Then I got lost on the automation

alias: Precalentar agua
trigger:
  platform: state
  entity_id: binary_sensor.precalentar
  to: 'on'
action:
  service: notify.pushbullet
  data:
    title: ""
    message: "Calentando"

But I never see the message when I press the button in lovelace.

What I actually need to do is to GET the above mentioned two URLs, wait for some minutes, then GET the power down/close counterparts.

Any pointers and help appreciated. Thanks!

The tap action should be ‘toggle’?

What you’re describing would be better executed with a script and shell commands:

and

1 Like

Toggle would be ideal, but just activation would be good enough.

Toggle would enable the user to cancel the action for whatever reason (wrong button pressed, pipes already warm enough, change of mind…) but warming up a few meters of pipe is not a terrible waste of energy, so in any event there is no big harm in just letting it be.

Thanks! I’ll go study and be back!