i am starting to automate some things around the house and I want my heat pump for the pool to use excessive PV power.
The heat pump is controlled by a shelly that provide a circuit breaker, circuit open will get the heat pump to power off.
In order not to have the heat pump power on and off I use the PV production rather than the real excessive value. I only use the pool during spring to autumn and the battery of the PV system can tolerate, if I use some of the capacity during late afternoon hours.
I also want the trigger to only fire after 8 am not to disturb the neighbours.
Here is the code, that I did with the automation assistant (not enough in yaml yet).
That is the code for switching on (I have a separate one for switching off, that i might merge in another step, but I want to start it easy):
Problem is that it does not fire. My suspicion is that, if the sun is up providing enough power before 8, the trigger does not fire because it does not get triggered after 8.
I tried the other way around that the trigger is 8 óclock but then it only checks at a certain time, but during cloudy days I want it start start then as soon as the 1500W PV power are crossed.
Like you said yourself, this will only trigger when it gets past that point. It will not trigger again. At least not in the spring/summer time.
You will want to add another trigger that is time based at 8:00 and then check if the power is above 1500W
If its not the first trigger will eventually go above 1500W and start the automation (keeping the 8:00 check ofc)
so trigger when 0800, and separately trigger when generation > 1500W
then check if it’s later than 0800 AND generation is > 1500W and if so then execute
trigger will execute when one or other triggers are true…with both triggers replicated as conditions one of them is immediately true so you are only actually checking the second one (eg when time is 0800 then automation triggers and by default the condition of 0800 is true so you are only checking the > 1500W one)…does that make sense?
Ok, so the trigger fires when one turns true - that would make them linked OR, wouldn’t it?
The way you explained makes sense, just that my understanding of the two triggers is different - but as said I’m a newbie in automation so I’ll have a lot to learn on triggers and combinations…
yeah…triggers are independent of each other and fire when any one is true (so OR)…conditions default to AND
There may be a better way to do it and there are plenty on here who know more than I do, but that should work fine…I’ve a few setup similarly at my end and they do the job…
I am not overly dogmatic on neat and clean coding - especially at my level of experience and skill
So whatever does the job I am fine and in my experience its better to start easy and get more complicated step by step rather than failing with a too complex setup instantly…