summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/lib/cheat-sheet.nix
blob: f593ef4ec10adf0ab44673ebc86632d38572ba4d (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
40
41
42
# Begin
let
in {
  services.home-assistant.config.automation =
    [
    ];
}

# example automation
    { alias = "";
      trigger = [
          {
            platform = "state";
            entity_id = "";
            to = "on";
            for.seconds = 0;
          }
      ];
      condition = [
        { condition = "state";
          entity_id = "";
          state = "off";
        }
      ];
      action =
        [
          { choose = [
            {
              conditions = {
                condition = "state";
                entity_id = "";
                state =  "on";
              };
              sequence = [{
                service = "home_assistant.turn_on";
                target.entity_id = "";
              }];
            }];
            default = { };
          }
        ];
      }