There is a lot to learn in Home Assistant and template helpers are not the easiest thing. I recommend getting familiar with the history and logbook functionality of home assistant using the HA documentation and community cookbook.
This should show you the various entities and their states when charging or not charging. I use “sensor.zappi_charger_status”. I might have renamed the entity, so your entity can have a different name.
