Anyone had this error and know how to fix it!
Predbat Error
It could well be anything. My guess is either (a) a transitory error, letting predbat re-run 5 minutes later and it clears itself, or (b) a mis-configuration most likely in apps.yaml that’s caused Predbat to fail.
Or (less likely) (c) you’ve encountered a real coding bug in Predbat.
Is it still showing this error in the predbat status? I do find that Predbat can crash but restart OK 5 minutes later when I’ve recently upgraded something in Home Assistant and HA is restarting so Predbat can’t access something it wants to.
If still occurring can you extract a section of the logfile and paste it in so we can see where the error came from
Details of the logfile location is in the predbat documentation: https://springfall2008.github.io/batpred/output-data/#predbat-logfile
It’s been like that all day with a thousand restarts.
I’ve fixed it now by removing Predbat, deleting all the associated files and putting it back on again.
Might not have been the right fix but I was stuck!
As it’s only been on a day or so I guessed that if the usage history is recorded within the add on then I’ve just gone back a day.
Chaz I suspect there was a corruption/bad structuring in apps.yaml then. It’s easy to mess it up, get something shifted slightly to the left or right, its invalid YAML and predbat doesn’t like it.
Predbat doesn’t have any day to day memory so you’ve lost nothing. Home Assistant keeps all the sensor history
That’s great then cheers mate.
Here's my error to add to the collection. (Same error twice now)
Has anyone else seen this? I have flagged the error as an issue in GitHub.

Predbat freezes.
I have rebooted HA and refreshed my server (Raspberry Pi4) to bring Predbat back. Phew.
Rob

Rbor I've had this before but it stopped after a restart. Not come back since but I've now got the error notifications set up (I think!) so I will know if it happens again
How do you set up error notifications?
Chaz There’s two things: if you install the Home Assistant companion app on your mobile, tablet etc and turn on notifications in predbat you will get a notification every time Predbat changes its status (Idle, Charging, Discharging, etc), you will also get notifications when the status turns to error.
However Predbat is keen on sending notifications, you will get lots.
And/ or option 2, I have written some Home Assistant automation scripts that send you a priority alert if either GivTCP or predbat fails and stays failed for 15 minutes - see the documentation https://springfall2008.github.io/batpred/output-data/#automated-monitoring-that-predbat-and-givtcp-are-running-ok