Modular battery charging current on photovoltaic production and load

Hi everyone, I wanted to setup a set of automations but what I expect to happen doesn’t work. I’ll explain, I have 2 inverters, a solaridge with the photovoltaic park connected, and an easun connected in cascade with ATS
I need the EASUN inverter for off-grid management of the system and as a battery energy manager. to manage it better with home assistant I created the communication interface with esp32 excluding its cloud

Home Assistant reads the solar production values ​​of the Solar Edge and modulates the battery charging current on 4 levels which I have automated
to avoid exceeding and taking from the electricity provider when there are important loads, I have included on the automation of the first charging level, in addition to the lowest production value of the solaridge also the control of the active power in use of the inverter
the automation works without problems as soon as I turn on a significant load the automation activates and reduces the charging current to minimum
the problem is that when the load stops being there, I expected the automations linked to higher charging current values ​​on photovoltaic production to come into effect immediately, but instead nothing happens


Hi, has anyone had the same problem as me with automations?
Thank you