I 'm charging my electric car during night mainly for costs purposes.
The charge begin at 22:30 and finish in the morning.
When I check for daily consumption (the device is a tasmota with energy meter) I got a consumption from 22:30 to 00:00 and another from 00:00 to the morning.
I really would like to have the “whole night” current consumption but I havn’t any idea about how to do that.
Should be pretty easy. Setup a utility meter:
Figure out when you want the daily rollover to occur (e.g. 10 AM?) and figure out the cron expression for that. Here’s an online builder,
This will work if the existing sensor reports kWh, if it reports watts, then you’ll need to add the Reimann Intergration in to sum to kWh to feed the utility meter. Make sure you use the left mode,
I also like to add a template sensor to track the usage for the last period as I find this great for doing a daily graph,
sensor:
- platform: template
sensors:
dehumidifier_power_total_kwh_yesterday:
value_template: >-
{{ state_attr('sensor.dehumidifier_power_kwh_today_running','last_period') }}
unit_of_measurement: kWh