Automation advanced

Hello everyone. I’m new to ha. Not quite advanced with automation yet. I basically need help. I’ve set a light to trigger on with a sensor and also a text to speach feature. What is the next step I need to do because if the sensor keeps triggering it will keep executing the automation. The text to speach will keep repeating itself. Any help is greatly appreciated. Ty

Add a state condition to only run the actions if the light is off.

Thanks. I’ll give it a try.