Utility Meter from Template is false

Hi,

I have an issue that makes me crazy, maybe someone can help me to understand :slight_smile:

First of all, I have a Zlinky module to record my electricity in HA, everything is working well.
I created a sensor to reflect Zlinky because if I use it directly after a Z2M restart, Energy Tab is completely false because of Zlinky sensor going back to 0 while restarting.
I have a Tesla Wall Connector that sends energy in HA too.
In order to have details in Energy Tab, I created a template to subtract Tesla Wall Connector from Zlinky.

So I have 4 sensors :

  • sensor.lixee_zlinky_easf01 (which is total energy used and come from Zlinky)
  • sensor.consommation_electricite_hc (which reflect “sensor.lixee_zlinky_easf01”)
  • sensor.tesla_wall_connector_hc (which is energy used by Tesla and come from Wall Connector)
  • sensor.lixee_zlinky_energie_hc_sans_tesla (which is my subtract template)

Here is my template :
{{ states('sensor.consommation_electricite_hc') | float(0) - states('sensor.tesla_wall_connector_hc') | float(0) }}

Everything is working well, graphs are good, Energy Tab is correct.

Now problems are coming… I wanted to create a new Utility Meter Sensor with a daily reset to have Daily stats from this template so I created it in Helpers Tab from “sensor.lixee_zlinky_energie_hc_sans_tesla” but…

This daily sensor doesn’t reflect at all my template but it reflects my total energy sensor, subtract isn’t done on this one.
I tried to completely remove those sensors and create it again, but the issue is still the same.

Does someone have an idea ?
I really don’t understand.