Template sensors stopped working after upgrading to 0.66.x

Anyone having issues after upgrading to 0.66.x with template sensors? Mine stopped working and pool pump hours always show 0.

## Pool pump status sensor as switch is hidden:
- platform: template
  sensors:
    pool_pump_status:
      value_template: '{% if is_state("switch.pool_pump", "on") %}Running{% else %}Stopped{% endif %}'
      friendly_name: 'Pool Pump Status'

## Creates a history sensor based on how long the pool pump has been in a
## status of 'running' defined in the aboved value template:
- platform: history_stats
  name: Pool Pump running today
  entity_id: sensor.pool_pump_status
  state: 'Running'
  type: time
  start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
  end: '{{ now() }}'

## Look for the attribute named 'value' from the above sensor to create
## a new sensor using that attribute:
- platform: template
  sensors:
    pool_pump_time_on:
      value_template: '{{ states.sensor.pool_pump_running_today.attributes.value }}'
      friendly_name: 'Pool Pump Hours Running'

All sorted! History Graph not working after 0.66.x