I have a suspend command that works well the problem I noticed is when the command executes the mqtt payload/status is set to retained. This means the switch stays on in HA and the next time I want to use it I cant because its already on. I have been deleting the entry in MQTT Explorer so it removes the entity and add its again.
Here is my command
{"Type":"CustomCommand","Id":"d46ae83d-5bcf-44de-845f-d16a4f7c31d8","Name":"MikePC Sleep","Command":"rundll32.exe powrprof.dll,SetSuspendState 0,1,0","KeyCode":0}
I have a suspend command that works well the problem I noticed is when the command executes the mqtt payload/status is set to retained. This means the switch stays on in HA and the next time I want to use it I cant because its already on. I have been deleting the entry in MQTT Explorer so it removes the entity and add its again.
Here is my command {"Type":"CustomCommand","Id":"d46ae83d-5bcf-44de-845f-d16a4f7c31d8","Name":"MikePC Sleep","Command":"rundll32.exe powrprof.dll,SetSuspendState 0,1,0","KeyCode":0}