I have mini-graph-card installed with HACS and it has been working just fine for a long time. During a recent Home Assistant update, I lost all the lovelace graphs that use this card. I checked in HACS, it is still installed and I re-installed just in case. I checked in the community directory folder and it is there. My ui-lovelace.yaml file refers to it properly as a resource.
I’m not sufficiently proficient with HA to know where else to look, although I have enough skills to go fishing if pointed in the right direction. If it helps I am running Home Assistant on a Pi 4 and the OS, supervisor, and all else is current.
Yea this happened a version or two ago and I was just living with the issue. Thanks for the heads up, there is conflicting documentation out there. I am still having problems. I took the following out of ui-lovelace.yaml:
And that did not work. I changed /hacsfiles/ to /local/ and that did not work. The file is located in /config/www/community/mini-graph-card/mini-graph-card-bundle.js. Am I doing something wrong with the url?
oh! I think I have a completely different underlying problem.
For some reason, recorder, history, logbook, and default_config are not starting. mini-graph-card I bet relies on history to make the graphs.
So, I see this in the logs:
Logger: homeassistant.components.recorder
Source: components/recorder/__init__.py:279
Integration: recorder (documentation, issues)
First occurred: 5:05:59 AM (9 occurrences)
Last logged: 5:06:23 AM
Error during connection setup: unsupported operand type(s) for +: 'NoneType' and 'datetime.timedelta' (retrying in 3 seconds)
I gather this is why recorder is not starting and is where my problems begin. However, I need some help for where to look next. The error isn’t giving me much insight.
I’m newish to HA and a while ago I installed the Mini-Graph-Card to try to get some nice multi axis SOLAR and LOAD graphing working on my UI.
I have the card displayed with two flat lines but the correct numerical values. However the same entities are reporting correct values and being used elsewhere for different dial card displays. Searching the forum for a possible solution, I came across this thread and thought it might be a good place to post my issue.
My HA installation and core are all up to date.
You can see that the current Energy Consumption is 946w frm the entity and that the card displays correctly with 0.9kW. However on the graph line of the entity it always shows the same 524w.
For the production graph:
you can see the similar thing, that the Entity value is being correctly reported, here at 3912w and on the graph card as 3.9kW. But again the entity graph value is always show as -4 (negative 4).
EDIT: I jut notice my value_factor was incorrect and changed it from -4 to -3 to correct the Card display kW units but the main problem is still unresolved:
I have the same issue. A mini-graph-card with multiple entities. Was working perfectly for months, a now all I get are flat lines. The values are correct when I move my mouse over the various entities, but all lines are flat.
I think that I might have found the cause/solution as per other advice found in the forum.
Ensure that your configuration.yaml has the following lines (I had unintentionally deleted my earlier without realising it:
# Enable Sensor History
history:
# Enable the Default Logger
logger:
default: error
Then delete the current db file from your config folder:
home-assistant_v2.db
Then go to configuration and server_controls and check your configuration to get the green check mark.
Then restart your server under Serfver Management
When your HA has restarted go to the History tab in the left hand side menu and you should (will) see all your history start to build from there.
The cause of a corrupt (malformed) db file is when we restore a snapshot of HA
Thanks. That was not my problem but it pointed me to it
I did a snapshot restore the other day, after trying to upgrade to the new zwave component but facing a bug with it (wouldn’t install because of versioning problems they still have to solve).
Just stopped my server, delete the db file then restarted it and all came fine.
I just wonder why a snapshot restore doesn’t just create by default a new db file. As far as I can remember I always had to manually delete this file after a restore.