Time sensor broken in 0.91.1

I have been using the time sensor for a while now but after the update to 0.91.1 it seems to be behaving incorrectly and it causes my automations to not fire. The time “jumps” forward and its out of sync with the system clock

sensor time:
  - platform: time_date
display_options:
  - 'time'

{{ states('sensor.time') == (states.input_datetime.sprinklers_start_time.attributes.timestamp | int | timestamp_custom('%H:%M', False)) }} 

In this example, I am using the time to trigger an automation

Note how the system time is 03:44 (20:44 local time) and the sensor time is 20:53

The worst part is not the offset but rather that it “jumps” ahead so automation triggering is a hit / miss

Thanks

As a “fix” I am now sending the time via appdaemon but its overkill

import appdaemon.plugins.hass.hassapi as hass
import datetime
import pytz

class Time(hass.Hass):
    def initialize(self):
        self.entity = self.args['entity']
        self.update_seconds = self.args['update_seconds']

        # Schedule from now to the end of time :)
        now = datetime.datetime.now()
        now += datetime.timedelta(0,10) # Add 10 seconds just in case it does not start in time
        self.handle = self.run_every(self.run, now, self.update_seconds)
        
    def run(self, kwargs=None):
        TIME_STR_FORMAT = '%H:%M'
        tz = pytz.timezone('America/Los_Angeles')
        now = datetime.datetime.now(tz)
        time = now.strftime(TIME_STR_FORMAT)
        #self.log("Updating state of {} to {}".format(self.entity, time))
        self.set_state(entity_id=self.entity, state=time, attributes={"friendly_name": "Current time from appdaemon",
                                    "unit_of_measurement": "time"})

I don’t know if this is a problem unique to 0.91.1 but I don’t see it happening in 0.90.0. In my case, sensor.time reports the correct current time.

The one difference I noticed is that, in my case, date returns the local system time (i.e. adjusted for time zone) whereas in your example it returns UTC time. Whether that’s meaningful or not is unclear.