HA entities in HTML code

Hi guys, i’ve recently added this custom lovelace card:
https://github.com/PiotrMachowski/Home-Assistant-Lovelace-HTML-Jinja2-Template-card

and i can style some CSS and have something like this:
image

I use templating to get the sensor values as displaied.
What i would like to do is to add to the incon a function, for example when i click the icon i can call a service or show more information about the sensor like normal Home Assistant cards.
A normal HA card is a < hui-glance-card> with inner divs with < div class=“entities”>, that are the clickable entities.
Is there a way to manually create a div with that class with all the information needed so i can call it when i click the custom icon or the custom text?
Thanks.