I’m trying to setup an automation to alert me when the water sensor gets wet. So far, I have the sensor registered and I can create an automation that says to turn on the lights when the sensor becomes moist for 5 seconds.
First, I tried to setup to “flash” the lights but that didn’t work so I just set it to turn on the lights.
I then created an automation to turn off the lights if the sensor becomes dry.
So far, that works. But, I’m assuming I’m doing this all wrong and it could be combined into one action and also should be able to flash the lights while the sensor is wet.
Also, while I can go into the device for the light and change the color, during the automation setup, I don’t have color as an option to flash. I’m guessing that parameter is not exposed to the automation process. I’m also guessing that if I setup some other type of “custom” entity that has the living room light already red, that I could use that entity to flash.
So please let me know where I’m wrong and what I’m missing. Is there a way to have an automation run while the trigger is still the same? Basically loop until?
Yes, you can use a repeat_while/ repeat_until to do that (docs here). Just make sure you add a suitable delay in between each loop, otherwise you’ll flood your system with constant light.turn_on commands.
@fleskefjes Appreciate the advice. I’m guessing you don’t want screen shots so could you point me to the instructions for capturing the correct data to paste in here? Thanks!!
Yes I believe I am. All of the tutorials I’ve found only showed those types of automation Thanks for the other link. I’ll have to do a lot of reading and making mistakes along the way.
Is there a way to trace the automation after it’s created? I’m thinking like single-step debug mode when writing code.
It’s not quite single-step debug mode, but it’s close. Click the 3 dots in your automation and check the traces. Here, this doc will bring you up to speed on how to debug Troubleshooting automations - Home Assistant