I’m trying to start a repeat in a script with a specific count:
alias: Ziggo Next Startup
sequence:
- if:
- condition: state
entity_id: switch.rack_pdu_ziggo_next
state: "off"
then:
- data: {}
target:
entity_id:
- switch.rack_pdu_ziggo_next
action: switch.turn_on
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- repeat:
count: 20
sequence:
- choose:
- conditions:
- condition: state
entity_id: media_player.mediabox
state:
- unknown
sequence:
- delay:
hours: 0
minutes: 0
seconds: 20
milliseconds: 0
- conditions:
- condition: state
entity_id: media_player.mediabox
state:
- unavailable
sequence:
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- conditions:
- condition: state
entity_id: media_player.mediabox
state:
- "off"
sequence:
- action: media_player.turn_on
metadata: {}
target:
entity_id: media_player.mediabox
data: {}
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- conditions:
- condition: state
entity_id: media_player.mediabox
state:
- standby
sequence:
- action: media_player.turn_on
metadata: {}
target:
entity_id: media_player.mediabox
data: {}
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- conditions:
- condition: or
conditions:
- condition: state
entity_id: media_player.mediabox
state:
- "on"
- condition: state
entity_id: media_player.mediabox
state:
- playing
sequence: []
default:
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
continue_on_error: true
mode: restart
icon: mdi:auto-fix
But I don’t ever see the count reaching 20.
Sometimes it does not even start the repeat
It went through the repeat just once
Most I saw 9 times…
I don’t see anything weird in the trace or logs. Where to troubleshoot any further?


