Quantcast
Viewing all articles
Browse latest Browse all 106313

Create button entity

Hi, is it possible to create a button entity from configuration.yaml that calls this service with service_data?
I know it is possible to do it via a script, but is it possible to do it directly by creating a new entity?

button:
  - platform: template
    buttons:
      reboot_router:
        name: "Router Restart"
        icon: mdi:restart
        service: ssh_command.exec_command
        service_data:
          command: reboot
          host: 192.168.1.1
          port: 22
          user: root
          pass: pass

Thanks

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106313

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>