Multiple actions with different conditions after one event

Hi,

I’d like to perform multiple actions based on one event, but each action should have different conditions.

I want to turn light1 to 50% brightness if it is on.
I want to turn light2 to 50% brightness if it is on.

As it stands conditions apply to all subsequent service requests within an action (https://home-assistant.io/docs/automation/action/) so I’m not sure how to configure what I want. Can anyone advise?

Use a FOR loop with an IF statement?

1 Like

This thread resolved a similar issue, except this person wanted to do this for all of their lights. Take a look for inspiration anyways. Help with light automation

If you have more than two lights, instead you should use a data_template for entity_id that is a simple if statement that checks if the light is on. Check the docs out for examples of templating, and you can test yours under developer tools /templating on the front end!

1 Like

Thanks both, for your replies. I managed this with template as suggested by dolores and using scripts to do each light or set of lights individually. Seems very flexible to do it this way.