Template seems broken since update?

Updated last night and I notice at least one of my binary sensor templates seems to be broken now.

I’ve got a sensor template which turns on the HVAC blower fan for 2 hours if the system is idle for >4 hours to move air around. Its been stuck on since the update and I don’t know why.

Theory of operation: If the fan is “idle” and also the sensor is off, after 4h it turns on. Because it references itself, the turning-on causes it to go “false” and the delay-off holds it on for 2 hours, at which point it will go off (because its going to stay false until it turns off, so it can never be true again until the delay is ended)

binary_sensor:

  - platform: template
    sensors:

      downstairs_hvac_fan_idle_cycle:
        friendly_name: "Downstairs HVAC Fan Idle Cycle"
        delay_on: '04:00:00'
        delay_off: '02:00:00'
        value_template: >-
          {{ is_state('sensor.downstairs_hvac_fan_status','Idle') and
             is_state('binary_sensor.downstairs_hvac_fan_idle_cycle','off') }}

image

From developer-template page, here’s the current state of things:

states('sensor.downstairs_hvac_fan_status'): Running

is_state('sensor.downstairs_hvac_fan_status','Idle'): False
is_state('binary_sensor.downstairs_hvac_fan_idle_cycle','off'): False

The inputs looks like its cycling reasonably between Idle and Running like it always has from the thermostat…

sensor:
  - platform: template
    sensors:

      downstairs_hvac_fan_status:
        friendly_name: "Downstairs HVAC Fan Status"
        #entity_id: sensor.time
        value_template: >-
          {{ states.climate.downstairs_thermostat_mode.attributes.fan_action }}

And the history graph looks reasonable, the input fan state has been switching between “idle” and “running” at least until it got stuck on