Sensor state not updating unless restart HASS

I’m glad it’s not just me then :wink:
I’ll leave it running for a day and check back tomorrow. Thanks again !

A couple of days in and so far so good !
Sensor is updating @ midnight without having to restart HASS.
Thanks @petro for the solution ! :pray:

Still puzzled why it didn’t work straight away the first few days .

1 Like

hello,

it is a old topic but i get this:

The error message is complaining about this template because it is attempting to subtract a string and a datetime object (which is an invalid operation).

{{ (due - day).days }}

That’s because this template produced a string instead of a datetime object.

{% set due = strptime(dstring, '%Y-%m-%dT%H:%M:%S') %}

It produced a string probably because strptime’s pattern %Y-%m-%dT%H:%M:%S failed to convert the value of sensor.omrin_papier from string to datetime object.

Post an example of the value of sensor.omrin_papier so we can see its format.