esphome-water-meter icon indicating copy to clipboard operation
esphome-water-meter copied to clipboard

Switch or button

Open velkhor opened this issue 2 months ago • 0 comments

In code we can see....

switch:

  • platform: template name: "${friendly_name} reset main counter button" icon: "mdi:restart" turn_on_action:

    • script.execute: reset_main_counter
  • platform: template name: "${friendly_name} reset secondary counter button" icon: "mdi:restart" turn_on_action:

    • script.execute: reset_secondary_counter

name is button, but you use switch :)

this looks better

button:

  • platform: template name: "reset main counter button" icon: "mdi:restart" on_press:

    • script.execute: reset_main_counter
  • platform: template name: "${friendly_name} reset secondary counter button" icon: "mdi:restart" on_press:

    • script.execute: reset_secondary_counter

in my option restart should be button too

  • platform: restart name: "restart"

velkhor avatar May 03 '24 20:05 velkhor