Recorder error during connection setup

For some reason, recorder , history , logbook , and default_config are not starting. Ultimately it is ‘recorder’ which is the problem as the others depend on it. I started having this problem an update or two ago and now I am getting around to addressing it.

I see this in the logs:

Logger: homeassistant.components.recorder
Source: components/recorder/
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. Would you give me some advice on where and how to look?

I’m on a Pi 4 with Core 2021.2.3, supervisor 2021.02.6, and OS 5.11.

The easy solution is to delete the recorder database and restart home assistant to automatically create a new one.

Otherwise, if you would prefer to keep you previous history you can search the forum for database repair. There are a couple of posts on how to do this.

Thanks. I should have asked when it started happening. It worked perfect.