Hi
I am brand new to HA. I setup an automation script that is supposed to switch on the geyser (WiFi switch) when the battery SOC is above 50% and it is later than 11am.
What I am trying to understand is :
what if the battery hits 50% at 1pm, will the trigger fire?
If the geyser is switched OFF manually for some reason, BUT the conditions to switch it on are then met 10 minutes later, will HA switch the geyser on again?
thanks for helping!
Therein lies the problemā¦what I am understanding is that once the condition has been met ONCE, HA will not evaluate that condition again?
the conditions are checked when and only when the trigger for the automation occurs (goes from false to true). if the condition(s) arenāt met at that exact moment then the automation actions arenāt going to run. And the condition wonāt be checked again until the next trigger occurs.
If you want there to be more checking of the condition outside of your original trigger then you need to create another trigger that matches the conditions of the condition as noted above.
you may also need to add a second (or more) condition that matches the conditions of your original trigger.
OK, so perhaps someone can help then setup the automation logic :
The geyser must switch on when the SOC is > 50, it is after 11am AND the power draw from the grid is < 500W.
If the grid draw is> 500 the geyser much switch off (even if SOC > 50)
If the grid draw drops below 500 again (and SOC is still > 50) the geyser must switch on again
in English : I want the geyser to only use solar power and as soon as the HA detects that grid is being used the geyser must be switched off. It has the lowest load priorty
Lastly : are the āWHENā conditions OR or AND? So would my trigger āSOC > 50 , Grid Power < 500ā require BOTH to be met or either to be met in order for the action to take place?
by default, conditions (WHEN) are and. You can explicitly make them and by using the and condition, you can also use the or condition. Making it possible to mix and match and and or.
FYI to all who assisted : I found a much better solution. My PV systems exposes a āstate changeā trigger on the battery SOC. Thus I set a trigger to monitor the state from āAny Stateā to āAny Stateā. Under the Conditions I then add in the SOC & Grid power rules. This way the trigger is fired almost continually as the battery charges and discharges and thus its state changes.
I know you said you used a different method and itās working but to answer your question for next timeā¦
three triggers in one automation
you can also add the trigger(s) to switch it off to the same automation but it may make it harder to read therefore making maintenance a bit harder. So making two automations - one for on & one for off - might make more sense. Some people have an unhealthy compulsion to cram everything into one huge unwieldy automation. But thatās personal preference.