Declarative way for lights automation

Hi there!
Just wanted to share my approach to automate lighting and switches for my setup.
It uses a declarative way to define automation so less code is required to set up and it’s easy to understand what’s happening IMHO.
You may find code, examples, and description at

Hope someone finds it useful too. Maybe there is more HASSish way to do the same things without a lot of code, please let me know!

1 Like

BTW. Here are links to checkout how declarative config looks like:

  2. (same as 1st but with annotations)