This is probably going to be very easy for someone to answer and it feels like a very beginner issue, but ive tried to make this sensor at least 20 times with history stats and utility meter and and it either returns 0 or unknown as a result.
The sensor name is sensor.energy_monitor_summation_delivered
Its one of two sensors from a zigbee smart meter LED reader that gives live KwH, and total increasing summation delivered data.
Im trying to create a sensor that will track the KwH usage of "today". Meaning from midnight to midnight. I have a "Last 24 hours" sensor that i created from statistics and that works great, but i cant get one working to only show from "00:00 to now". I tried a history stats with a start of {{ today_at('00:00') }} & end of {{ now() }}, but it just shows 0 no matter what.
I can get the exact result i want from a statistics card with this code:
type: statistic period: calendar: period: day stat_type: change entity: sensor.energy_monitor_summation_delivered name: Today's Grid Usage
But i want it as a sensor so i can style in different dashboards.
Here are the "sensor.energy_monitor_summation_delivered" attributes:
state_class: total_increasing
status: NO_ALARMS
zcl_unit_of_measurement: 0
device_type: Electric Metering
unit_of_measurement: kWh
device_class: energy
friendly_name: Energy Monitor Summation delivered
Can someone please tell me what extremely newbie thing im doing wrong?