The problem: The Signal-message is only sent once after 10 seconds, but not after 20 or 30 or 40 seconds. So the sequence in the repeat is only execute once.
I tried the same with a condition:
- repeat:
sequence:
- delay: '00:00:10'
- service: notify.signal_test
data:
message: "A loop!"
until:
- condition: state
entity_id: binary_sensor.windowsensor_opening
state: "on" # Tried "off" as well just to be sure...
but it’s only running once as well.
What am I missing? No errors occur in the log, the trace shows that the loop is only running once and then is just ending quietly without any hint, why.
It’s hard to diagnose with only part of the picture, see item 11:
And post the entirety of your YAML. It could be that your value template is the problem. I can tell you that I did a quick test to see if there is a bug somewhere and this ran perfectly fine:
alias: "Automation Test"
description: ""
trigger:
- platform: state
entity_id:
- light.greatroom_hallway
to: "on"
condition: []
action:
- repeat:
count: 3
sequence:
- service: persistent_notification.create
data:
message: TEST
title: TEST
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
mode: single
and started in manually. I’m still getting only one message.
When starting the automation again manually, I’m getting the error:
WARNING (MainThread) [homeassistant.components.automation.test_loop] Test-Loop: Already running
And: When using persistent_notification.create instead of notify.signal_test, it works.
Seems to me like the Signal-service somehow crashes preventing the loop to continue… Hm.