You could trigger on the power state being above 0.
That means the plug could be on and you plug in the device and the automation does it’s thing.
But at some point it needs to reset to turn on the switch again
Actually thats a good point i.e. trigger above 0. Is that by changing float(0) to float(>0). Now don’t laugh if thats not right. ![]()
You could use a numeric trigger instead of the state trigger.
I suggest you set it to above 5 or 10 or something to not get noise interference.
But that depends on what kind of values it actually is when in use.
You could use a template trigger also as you say but there is no need to complicate things
This syntax just provides a default value in case the states function returns an unavailable or unknown state. That’s why Hellis’ suggestion will work.
Thanks for those suggestions. I’ve a lot to learn but you have given me a great starting ground, and a solution that works out of the box. Will play around with it over time.