Template Trigger not working with state change

This used to update sensor.my_todo_list_items every time the state changed, but now it is updating the sensor only once an hour or at HA reset. Can anyone please help why the template is not triggered when the state of the todo.todo_list increases by 1 when adding a todo item? Thank you.

- trigger:
    - platform: state
      entity_id: todo.todo_list
    - platform: time_pattern
      hours: /1      
    - platform: homeassistant
      event: start
  action:
    - service: todo.get_items
      data:
        status: needs_action
      target:
        entity_id: todo.to_do_list
      response_variable: my_list
  sensor:
    - name: My To Do List Items
      unique_id: my_todo_list_items
      state: >
        {{ now().isoformat() }}
      attributes: 
        todo_items: >
          {% set tdate = ((now().date()) + timedelta(days=3)) | string %}
          {{ my_list['todo.to_do_list']['items'] 
                    | selectattr('due','defined')
                    | selectattr('due','<=',tdate)
                    | sort(false,attribute='due')
                    | map(attribute='summary')  
                    | join("<br>") 
          }}  

In case someone else encounters this, when I removed:

    - platform: homeassistant
      event: start

from the template, and restarted, the code started working as intended. I am too much of a novice to explain this, but the start event was not needed because all is fine after restart.

Sorry, but you were led astray, I’m removing your solution tag to not mislead others who come into this thread.

Removing that trigger only removes the update on restart. Everything else behaves the same way. You’ll likely run into the actual issue again in the future.

It would be best if you posted your logs when the issue occurred.

You’re right. I checked the logs and I had several errors at startup from different templates. These errors have been around for a while and ignored without noticeable impact. After correcting all the errors, the event was added again

    - platform: homeassistant
      event: start

It seems that this is triggering as expected now. Thank you.