New to this so may be being very silly… would appreciate your thoughts on what may be wrong. I have a smart plug attached to a vacuum cleaner. To try out automation, I am wanting to write a script that turns off the smart plug when it goes below a certain power threshold (basically protect the batteries from going above 80% charge). In my case thats 15 watts. So I have two entities;
The switch itself, “switch.X”
The power reported by the switch “sensor.Y”
I wrote the following, however whilst the charger is well above 15 watts, when I click to run the automation it switches the power off straight away every time… so does not appear to be monitoring the request to switch off only after 1 minute of below 15w
The trigger will only fire when the state crosses the threshold. Meaning, it will need to go from 16+ to less than 15, then if it stays below 15 for 1 minute, you’ll get the trigger.
It will not trigger if the threshold is not crossed. I.e. if your state is 14 and it changes to 13, it will not trigger.
Thanks, noted. Its kind of weird in that it was at 15.4w when I press ‘Run’ on the rule and it immediately turned off… (obviously I am expecting to observe it turn off after falling below 15). But, now I have left it alone (ie the rule is still ‘ON’, I did not press ‘Run’ again)… I turned on the switch and it left it alone and it worked!
Sorry I am with you both now. For a novice, it does seem a little confusing that clicking run on a automation would skip part of the rules you have written.