Automation motion after sunset

it’s quite hard to help debug a screenshot of an automation, especially with all the substantive information collapsed. if you want help with it, you should post the yaml AND format it correctly.

however what you’re trying to do has a ton of blueprints that just does it right for you. here’s one example:

but if you want help with your code and don’t want to use the blueprint, please take a look at how to post yaml here: