summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/automation/flurlicht.nix
blob: d40022540df3afac96e66efcedbacf3e9b6e990d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
let
  licht = "light.flur_statuslight";
in
{
  services.home-assistant.config.automation =
  [
    { alias = "Nachtlicht im Flur an";
      trigger = {
        platform = "sun";
        event = "sunset";
      };
      action =
      [
        {
          service = "light.turn_on";
          target.entity_id = licht;
          data = {
            brightness = 87;
            rgbw_color = [ 255 190 0 0 ]; # ein dunkles rot
            #effect = "None";
          };
        }
      ];
    }
    { alias = "Nachtlicht in Flur aus";
      trigger = {
        platform = "sun";
        event = "sunrise";
      };
      action =
      [
        {
          service = "light.turn_off";
          entity_id = licht;
        }
      ];
    }
  ];
}