Other type of virtual switch?

I defined several virtual switches like this

  - platform: command_line
          command_on: curl ""
          command_off: curl ""
          friendly_name: "Verlichting gang"

Now, I have to define other virtual switches but where command_on en command_off are in fact the same. So it is not really a switch but more a button.

Does another type of virtual switch exist or do I stay with the same definitions (with same command_on and command_off)?

Maybe you want a button then?

Yes, but how do I have to define this ?

Or maybe I have to switch to rest command, but it is not clear for me how to do this.

I define this in my configuration file (and restart HA)


How do I call this in my button ?
Sorry, it’s all new for me…

Found it, put it in a script :slight_smile: