New sensor help

Hello

I am trying to pull a sensor from influxdb so I can then create a graph that shows the daily cost of various items, 1 being a wall heater. In influx it is recording the daily KW and on days where it is zero it is showing zero, but when I use that sensor in HA it appears to be keeping older values and not showing days with zero… I hope that makes sense? How would I get it to show the true values please?

  - platform: influxdb
    host: localhost
    queries:
      - name: heater daily
        where: '"entity_id" = ''heater_energy_yesterday'''
        measurement: '"kWh"'
  - platform: template
    sensors:
      heater1234_cost:
        friendly_name: Heater Cost
        unit_of_measurement: '£'
        value_template: "{{ (states('sensor.heater_daily') | float * 0.16653) | round(4) }}"

image
last 4 days should be zero… like they are below.

anyone able to assist with this please? Cheers

You’re not giving enough info. You’re showing us a graph in influx and comparing it to a calculated value, i.e. comparing apples to oranges. Show the value in influx and the result in HA without the calculation. Also, no one has any idea if the where clause is correct or not because you didn’t show any relevant information on the influx side that would point to that.