Hi,
I have a Shelly 1PM controlling an air compressor that lives in a shed behind my workshop. Idea is that via HA I can turn it on when I’m in the shop, and have it turn off again some period of time later so I don’t have to think about it. This in itself isn’t an issue - Switch starts timer, timer runs and then turns switch off.
To add some complexity, I don’t want the compressor to be turned off if it is running - it needs to complete the cycle and unload the compressor head before I turn the power off. Again, I didn’t think this would be too much of an issue - have the output of the timer fed into a “current state node” that would read the power draw from the Shelly PM. If it is drawing power say about 500w, then delay 5 minutes and loop back into the current state node, if below 500w then turn off. This all seems to work ok in theory, but i am struggling to control it from HA.
What I would like to be able to do is use a button / switch to turn the compressor on from the Dashboard in HA. The dashboard would then show me that the compressor had power. If was to turn the switch off from the dash board, and the compressor was running, I would see that the switch was off but the compressor was still running, and then when the cycle had finished, it would show that it was off.
Is this a bridge too far, and should I just use the dashboard to turn it on, and then tell the members of the household not to turn it off via HA but let it time out instead, or is there a way to display both the selected state of a switch, and the current state?