I want to run what seems to be a super simple automation, but can’t seem to make it work. I think it is the trigger that I am not understanding. I have tried plenty triggers, the one in the code was just my last ditch attempt.
I would like to start my poop pump when certain conditions are met. In my mind it is easiest to apply an IFTTT in the “Action”
It seems like the trigger on the other hand only run once, if the trigger happened and the conditions are not met then the automation doesn’t run. I need the trigger to be “Open” (for lack of a better word)
I need my pool pump to switch on when there is enough power available from my PV system, when cloud cover is less than 60%, Battery SOC above 80% and after sun rise (I know this will already be covered in the Power condition). Below is my code, how can I make this work?
This is a common technique to handle the situation where multiple things must be true (“enough power available from my PV system, when cloud cover is less than 60%, Battery SOC above 80% and after sun rise”) before an action can occur.
Thank you, I will try this. I am really keen to make this work, this will be my first major automation other than the small “When gate opens, switch on garage light”
How would I go about switching the pump off again later in the day when PV power is not enough anymore? But also keep it off. Example:
Let’s say it is after 4pm, check if PV Power is enough, if Yes, then stay on, Else Off, but stay off until the next morning where “Pool Pump_New” will run again
Absolutely, but I meant to ask was. Let’s say the Off Automation triggered, how do I prevent the On to trigger again to prevent the pool from switching on and off every 5 minutes as the PV power might fluctuate.
Apologies, I am really learning as I am going here. But really keen to get stuck into this.
So the requirements are as follows for a full automation experience:
Turn on the pump when those conditions are met
Stop running the trigger in a loop once it it turned on. (I see in the logs that it keeps on triggering even if the pump is on already after the modifications suggested earlier by @tom_l)
Switch off the pump when PV production is low and then keep the pump off by not running point 1 again. The reason is that PV power might fluctuate on cloudy days or when equipment in the house gets switched on and off. To prevent the pump switching on and off, the first point should run again after point 3 triggered within the same day…tomorrow point 1 can test and run again.
I hope I making sense, this is the way I envisage it
3.
Yes the automation exists. “this.automation.pool_pump_new” comes from the explanation @123 gave. I wasn’t sure if I should use “this.automation.pool_pump_new” or just “automation.pool_pump_new”. So I tested both, hence 2 screenshot errors.
Damn, I need to learn the language! Thanks it works. Now I just need to get the automation to work. The template is returning “False”, which is actually expected, it will only return “True” if the automation actually executed the actions, but it can’t execute due to the “False” value.