Closed MartinTheBruce closed 1 year ago
I think I may be having a similar issue. There is a suggestion to change the template to discount an extra few mins after midnight as a workaround until the root cause is identified if I read the HA thread correctly. I just don't know how to do that with this version via HACS.
This is a smart metering issue. If you use the. "sensor.smart_meter_gas_import" HA is capable of using the forever increasing integer to work out use per period. Give a much more accurate tracking.
However this in its own right can be problematic if any MQTT packets are lost or the CAD stops sending data for a period. It will then dump all the missed usage into next available period. (however this is a HA issue with any meter type, so not specific to this integration)
I would suggest this issue be closed as not a bug. More a deficiency in the daily smart metering data provided.
Would it be better to configure the HA Energy dashboard to use the "Smart Meter Electricity: Import Unit Rate" entity, and then HA will calculate the daily costs.
This ignores the daily standing charge, which seems to be a limitation of the current HA energy dashboard implementation - maybe we could raise that as a feature request in HA?
This integration will only show information it receives from the IHD. If your IHD is incorrect, then this integration's sensors will also be incorrect.
The IHD does not grantee to send an MQTT update on the stroke of midnight. This means that the sensors "Smart Meter Gas: Cost (Today)" and "Smart Meter Electric: Cost (Today)" both read the value from the previous day during the turn of midnight.
When these sensors are then used in the energy dashboard as the input which provides cost monitoring, it causes a double count issue, i.e. at stroke of midnight, the sensor reads say £5 (the cost from the previous day) - and this is instantly added to the today costs (i.e. Home Assistant Energy thinks your standing charge is £5) - and then the costs start again, but Home Assistant seems to then integrate the increases in cost, but not the "reset" which occurs some time after midnight.
Ideally, on the stroke of midnight via callback, the integration should zero all sensor outputs.