Uptime Sensor Broken

First off I want to thank everyone for the help in advance. I have been racking my brain for about an hour trying to figure this one out on my I own. :anguished:

When I installed the latest version of Home Assistant Core I got an error about it.

I had a sensor in my YAML that converted the time since the last restart to minutes. When I use Node Red I usually have each flow do a quick check to make sure the system has been online for at least 2 minutes before executing a flow.

I would like to be able to figure out how to create a new template sensor that is compatible with Home Assistant Core 10.1 that shoots out the time online in minutes again.

The new uptime sensor seems to just expose a date string.

My goal is to simply see how many minutes since the last restart.

Thanks again everyone.

It’s just the first one that is the issue, not the second template sensor.
So just remove it as it says and recreate it in UI integrations.

1 Like

@Hellis81 thanks for the quick response. I can’t believe it was that easy. :upside_down_face:

For anyone else that runs into this issue. The solution is just to erase the information in the red box.

Do you only use this sensor for that application you mentioned?

In that case perhaps use a boolean instead to not save an entity with how many minutes HA has been up?

You could use an automation that triggers on home assistant started event and delay 2 minutes then turn on a boolean.
Then have another to listen for home assistant stopped event and turn it off.

2 Likes

Thanks for the tip. :+1: I use it with node red. All of my flows/automations have a condition that checks that home assistant has been up for at least two minutes before they are allowed to proceed.

Yes but if that is all then why have a counter that counts up every minute and floods the database with nonsense values?
If you just turn on a boolean, that is “one row” in the database.