My virtual assistant setting failed

I want to use my system as an off grid system but as ess only when batteries are low soc or full. I programmed ve config, virtual assistant, general flag, ingnore AC in. I the set general flag as a programable relay to turn on and off the general flag, ignore ACin.
I set programmable relay, general flag, to off when soc is lower than 20% (this this should deactivate the “ignore ac in” and turn AC in back on) i then made a new assistant and set programmable relay to genel flag, on, when soc is higher than 21% (to ignore AC in again)
Today for tje first times in many days after programming it, the soc did go below 20%, but the AC in did not get switched back on by the programmable relay, so the batteries would continue to discharge.
What do ypu think i did wrong in the programming?
Is it essential also to add an “on” and a seperate “off” assistant, or does a single assistant turn the relay on and off at a set soc point?
But more to the point, why didnt my inverter cancel the AC ignore command at the low soc?