Hi All,
I have a question on historic values.
Based on a gas meter sensor which reads the meter continuously, I’m trying to create a sensor that calculates the gas usage today until now. So in the value template I would like to use the sensor value from yesterday 00:00. Any ideas how I can get this value from history?
- platform: template
sensors:
gas_today:
value_template: "{{ states('sensor.dsmr_gas_delivered') | float - states('sensor.dsmr_gas_delivered............') | float
}}"
Thx,
PPee