I’ve scoured the other posts but have not found an answer. Sorry if it’s there and I missed it :).
If I go to the history tab and select an entity, there is no history data. If I am on the history tab and select an entity, I can see history start to accumulate as soon as the state changes. If I exit the tab and come back, all the history is gone. If I reload the tab, it goes away.
I’ve tried removing the home-assistant_v2.db file. This didn’t help. I see nothing in the log file related to SQL.
I am running 2023.8.3.
I’d appreciate some help.
Did you change nthe duration nof the recorder such that it saves data longer? Look up the recorder integration (there are numerous parameters). FYI this is what I have in my configuration.yaml:
#
# Changes to the default logging (and therefore history database) parameters:
#
recorder:
#
# We leave auto-purge on (which is the default if the
# setting is not specified) - which weirdly takes place
# every day at 04:12 local time - since we don't care
# how often it is purged but rather how much data is
# kept -
# auto_purge: false
# purge_keep_days default is 10 if setting is missing
purge_keep_days: 30
#
# If not specified, the commit_interval is defaulted to 1
# (1 second) - I have decided to cut in half the number of
# commits made to the database by just changing this to 2
# (hopefuly this will help prolong the life of the ssd)
commit_interval: 2
#
# These command_line entities are called pretty often and
# are just using up too much log spece - which disrupts from
# my being able to easily anallyze the logs on the fly - and
# not worth the effort to save for any reason (unless I want
# to debug later in which case can easily be done by just
# commenting out one or more of the below lines):
exclude:
entities:
# - SENSOR.HASSIO_DNS_ERROR_COUNT_IN_LAST_10_MINUTES
- sensor.WEEWX_LAST1_SENT_TO_AWEKAS
- sensor.WEEWX_LAST1_SENT_TO_WUNDERGROUND_PWS
- sensor.WEEWX_LAST1_SENT_TO_OWM
- sensor.WEEWX_LAST1_SENT_TO_METEOSERVICES
- sensor.WEEWX_LAST1_SENT_TO_PWSWEATHER
- sensor.WEEWX_LAST1_SENT_TO_WINDY
- sensor.WEEWX_LAST1_SENT_TO_WINDGURU
- sensor.WEEWX_LAST1_SENT_TO_WOW
- sensor.WEEWX_LAST1_SENT_TO_CWOP
- sensor.WEEWX_LAST1_SENT_TO_WEATHER365
- sensor.WEEWX_LAST1_SENT_TO_WEATHERCLOUD
- sensor.WEEWX_LAST1_REST_CALL_FAILURE
- sensor.SYSLOG1_ERRORS
- sensor.CONSOLE_LAST1_SENT_TO_WEATHERUNDERGROUND
- sensor.CONSOLE_LAST1_SENT_TO_WEATHERCLOUD
- sensor.CONSOLE_LAST1_SENT_TO_AMBIENTWEATHER
# ...and the uptime sensor counters shouldn't be logged....
- sensor.rpi_uptime
# ...and we don't need to care about past ink levels...
- sensor.epson_wf_3730_series_black_ink
- sensor.epson_wf_3730_series_cyan_ink
- sensor.epson_wf_3730_series_magenta_ink
- sensor.epson_wf_3730_series_yellow_ink
Thanks so much for the quick reply. It was unintentionally brilliant :).
So, no, I didn’t change the interval. But, your question and the mention of recorder made me go look at my config file. I did add this some time ago (which is now commented out):
#recorder:
# include:
# entities:
# - sensor.lms_battery_level_update_time
# - sensor.pms_battery_level_update_time
# - sensor.leak_hbls_battery_level_update_time
# - sensor.leak_hbrs_battery_level_update_time
I did this when I was trying to force battery operated z-wave devices to update their battery level entities (and trying to debug why it wasn’t working). Obviously, I had no idea that this would interact with the history. Even more obviously, I’m just a bit clueless about how all this works and need to do a little more studying :).
Suffice it to say that now history is working. I will have to think some on why what I did broke it though. Feel free to clue me in if you want to take the time. Perhaps I ended up telling recorder just to keep history for those four entities?? I think I really need to understand better what recorder does :).
Thanks!
Yes I think you did just that - told it to record only those
Ok, makes sense.