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 https://github.com/Godhart/hass-lights-control

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:

  1. https://github.com/Godhart/hass-lights-control/blob/e3b5e4c987c7c991260ba41f84944cd9c70c86f2/example_config/example1/lights_control.yaml
  2. https://github.com/Godhart/hass-lights-control/blob/e3b5e4c987c7c991260ba41f84944cd9c70c86f2/example_config/example1/lights_control_with_annotations.yaml (same as 1st but with annotations)