Closed uphillbattle closed 2 years ago
tibber documentation tibber source (message by IssueLinks)
Hey there @danielhiversen, mind taking a look at this issue as it has been labeled with an integration (tibber
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
The problem
Regularly, after restarting HA or reloading the Tibber integration, there is a hiccup in the energy cost calculation in the energy component. Typically, the Energy cost calculation is way too high after a restart/reload.
Here's the setup:
sensor.accumulated_consumption_xxx
from the Tibber integration as the consumption sensor in the Energy component.sensor.strompris_xxx
that is the sum of the grid tariffsensor.nettleie_xxx
and electricity pricesensor.electricity_price_xxx
; the latter is a sensor from the Tibber integration, the former is set by an Appdaemon app.The price template sensor
sensor.strompris_xxx
is defined as follows:The template sensor has a couple of
if
checks before actually setting the sensor - to avoid "transients" due to the source sensors taking a bit of time before getting their values after the restart. The sensor does, however, seem to be undefined through the restart (not easy to see, but there is a 37-seconds long "gap" in the curve from 10:51:02 to 10:51:39):In the database, the two relevant variables are these:
For
sensor.accumulated_consumption_xxx
I get nothing of interest around the time of the restart:For
sensor.accumulated_consumption_xxx_cost
, however, there is a reset about 6 minutes after the restart (08:57:23 below), and the sum is increased by the state (instead of by the difference between the last two states) at that time :I can manually fix the cost hiccup in the database, but it's annoying that I have to.
I'm not sure why this happens, if there is something with my sensors, if its the Tibber integration that is the source of it, or if it's the Energy component. If the
sensor.strompris_xxx
sensor is not defined for a few seconds during restart, can this reset the cost calculation?What version of Home Assistant Core has the issue?
core-2022.4.0
What was the last working version of Home Assistant Core?
Has been like this for several months (and I always run the latest version)
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Tibber or Energy
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tibber/
Diagnostics information
Tibber diagnostics:
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response