Using a helper sensor for EUR/kWh costs


I have created a template sensor, which converts the cent/kWh entity to EUR/kWh from the EPEX Spot integration.

When I add this EUR/kWh entity to the Energy dashboard, no costs are calculated, even tough the EUR/kWh entity does successfully show/contain the costs.

Does anyone know what might be the issue here?

The template for the helper sensor is the following:

{{ (states('sensor.epex_spot_data_net_price') | float) / 100 }}

Any help would be appreciated.

Best regards

The setup in the energy dashboard:

The helper sensor:

I think it’s because of the decimal places. For euros, only two decimal places are probably expected.
I tried this template and it worked:

{{ ((states('sensor.epex_spot_data_net_price') | float) / 100) | round(2) }}