I figured this was probably better asked in configuration rather than ESPHome.
Home Assistant Glow has an entity that tracks both power consumption and total energy. Is it possible to have total energy start at a defined value (i.e. what the current meter reading is) rather than starting at 0?
thats utility meter functioning. It has calibrate service
see Utility Meter - Home Assistant
Ah i guess i need to create a separate utility meter entity for Glow, at the moment it seems to track this through esphome with:
total:
name: '${friendly_name} - Total energy'
unit_of_measurement: 'kWh'
icon: mdi:circle-slice-3
# last_reset_type: auto
state_class: measurement
device_class: energy
accuracy_decimals: 3
filters:
# multiply value = 1 / imp value
# - multiply: 0.001
- lambda: return x * (1.0 / ${pulse_rate});
Using the Utility Meter calibrate service for the above entity doesn’t seem to work.
you could probably tweak the reset button to make it sync:
replace “0” with correct calculated number.
button:
- platform: restart
name: "Restart - Glow"
- platform: template
name: "Reset - Total Energy"
id: button_reset_total
on_press:
- pulse_meter.set_total_pulses:
id: sensor_energy_pulse_meter
value: 0