Hi,
I’m trying to track how much energy the charging of my car took each night. Only the power is measured by my charger, so I created a utility meter based on the sensor I have available.
sensor:
- platform: integration
source: sensor.etrel_active_power_total
name: E_last_session
unit_prefix: k
round: 2
utility_meter:
energy:
source: sensor.E_last_session
name: total_energy_charging
I’ve made an automation to reset (service UTILITY_METER.CALIBRATE) the value to zero when a new charge cycle starts.
- alias: "Reset laadenergie"
trigger:
- platform: state
entity_id:
- sensor.etrel_status
to: "Wacht op verbinden voertuig"
condition: []
action:
- service: utility_meter.calibrate
data:
value: "0"
target:
entity_id: sensor.total_energy_charging
The automation is initiated as is should, but the utility meter is never reset to exactly zero, but to a (to me) random value.
Stangely. If I run the automation a second time manually, the utility meter IS set to exactly zero. See example below:
- automatic reset at 19/09 18h20
- manual reset at 19/09 20h40