Home Assistant becomes unresponsive at a certain time

That’s why I always like to use a loop count as an extra “get out” condition

  - repeat:
      sequence:
      - service: homeassistant.update_entity
        entity_id: media_player.viera_st50_series
      - delay: 2
      until:
      - condition: or
        conditions:
        - "{{ repeat.index >= 15 }}"
        - "{{ is_state('media_player.viera_st50_series', 'on') }}"

Just in case the entity the condition depends upon is unavailable for some reason.

Worst case the the loop does not do what is intended (and this is usually noticed and can be debugged) , but at least it does not loop for ever.

3 Likes