Perform an action before trigger is achieved

Hi

I am trying to turn lower the volume of my chromecast audio 5 seconds before the lights in my bedroom turn on.

How can I achieve this? As there is no delay in trigger.

Thanks.

What is turning the lights in your room on?

If they are automated, just add a delay in the action sequence.

If this is not part of an automation, it is rather difficult to predict when a light will be turned on.

Same as above. HA runs on triggers, as in it waits for things to happen and then reacts.
It cannot perform an action before something happens unless it knows when that something will happen…

ok thank you.