Hi HA Community
I have a switch (below) using command_on and command_off. When I click the button to turn it off (command_off), it shuts down properly but then immediately turns back on (command_on).
All commands below (on, off, state) all work below.
I tried changing the Mac address for command_on to an invalid Mac, and it no longer turns on. So it appears HA is triggering the command_off then immediately firing the command_on.
- platform: command_line
switches:
desktoppc:
friendly_name: Desktop PC
command_on: /usr/bin/wakeonlan XX:XX:XX:XX:XX:XX
command_off: /usr/bin/curl --max-time 3 -u user:pass -k http://Desktop-PC.local.lan:8000/?action=System.Shutdown
command_state: /usr/bin/curl --max-time 3 -u user:pass -k http://Desktop-PC.local.lan:8000 >/dev/null 2>&1