summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/glados/automation/ampel.nix
blob: 4be92a328e8ef4e694364ca09ba3374e5792f920 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# needs:
#   binary_sensor.lounge_ampel_status
#   light.lounge_ampel_licht_rot

let
  glados = import ../lib;
in
{
  services.home-assistant.config.automation =
  [
    {
      alias = "Ampel Rotes Licht";
      initial_state = true;
      trigger = {
        platform = "state";
        entity_id = "binary_sensor.lounge_ampel_status";
      };
      action = { service = "light.turn_on";
        data.entity_id = "light.lounge_ampel_licht_rot";
      };
    }
  ];
}