Repeating automation until door sensor is closed

I am trying to setup an automation that announces that a door is open on all of my Google Homes. I have it working for one Home and it runs only once. I would like to have it announce on all the Googles and repeat until the door is closed. I am very new at this. I have tired to look through the documentation and a quick search. I did find the repeat setting on the action. Below are what I have setup in the UI for the automation. Right now, it take a bit to start, does not repeat, and almost has a stutter when it starts up. I feel that I am close. It would be greatly appreciated if anyone can point out where I went wrong.

A quick search of the community forum reveals several examples.

https://community.home-assistant.io/search?q=repeat%20until%20the%20door%20is%20closed

This is a fairly common request (and I have helped with several of them). Try one of the examples. If you get stuck, we can help.

Also please don’t post screenshots of code. Post actual properly formatted yaml text.

It makes it easier for us to help you because we don’t need to type everything out by hand. We can just edit your code as provided.

I apologize. I tried the search and looked at few that came up. I just could not figure it out. I just figured out how to get the text from yaml. I will check out the example you gave.

I appreciate you pointing me in the right direction. Also your search was better compared to mine.

I am assuming that by now you have found the solution. If you are interested, I have a solution for a similar use case… and I did it with the UI. I used the REPEAT/WHILE command and works like a charm. If someone needs it, I will more than happy to added here.

The use case, is when a door is open, send on going messages, with some intervals of time, to the google speakers. The action will last until the door is closed or when the the timeout set up by you is completed.

Again, more than happy to share a solution. Let me know. Thanks

1 Like

Hi @avellma ,

Its been a while but i am very interested. Will you share your solution with me?

Thanks in advance

Can you share the solution please. Thanks