Editing core component - keba

Hello,
I have adapted the keba-core component so that the following are also read out: start charging time, end charging time, serial number, firmware, etc.
So far so good. The values are read out every 5 seconds - this is also stated in init.py (MAX_POLLING_INTERVAL = 5)
From my point of view, however, this only makes sense if charging is also taking place, i.e. if “binary_sensor.keba_p30_charging_state = on” or another possible value such as: > 0A is drawn on phase1.
According to the documentation, there is “refresh_interval” (default at 5).
Where in the core component can I now make the change that the refresh_interval is ONLY 5 seconds if charging is also taking place - otherwise it should be 60 or 120 seconds, for example.