I need to power off the evse if my house load is above 4.000W and after power on when it’s lower 800W. I’m trying this automation but it never re power on when house load is less than 800W.
Ok, your script work well but I need also to give priority to the manual toggle. What I mean is that the automation has to work only if the toggle was pravilusly on. Now if the toggle is off and power is below 800W it start to charge.
I mean that the automation has to work only if “switch.evse” was previously on. This because sometime happens that I connect the ev charger when I come to home but I need to start to charge the car during night.
Yes and as I said that is a vague statement. Previously on when?
If it has ever been previously on then that is not a condition at all and the automation will always fire.
Do you mean previously on in the last hour, day or year?
Also, as the automation changes the state of the switch it can affect this.
So you may be better off with an “enable” input boolean. Unless you have a way to determine if the switch was switched on manually, or by the automation. I don’t.
My guess would be that OP is expecting the EV to start charging immediately after they turn the input_boolean on, but none of the triggers fires.
I’d also expect the input_boolean to only affect the turn on and not the turn off. Otherwise switch.evse might get stuck in the on state. Maybe OR the input_boolean condition with trigger id off.
Great, now I can power on the charger with the boolean input toggle but it isn’t able also to swich off the relay. The fourth trigger seem right but dosn’t work.