I have a switch that sends wake on LAN/shutdown commands to my pc depending on its respective on/off state. However, if I switch off the pc any other way i.e. via the start menu, the switch's state doesn't change to off.
I can do this using a device tracker's state as a condition but I just want to change the state without sending a command.
At the moment if the pc is offline then it changes the switch state to off which also sends a shutdown command that gets backlogged. It only arrives when the pc is back online, causing it to receive a shutdown command the next time I switch it on. This obviously leaves me in an infinite loop of an unusable pc.