summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/bureautomation/automation/hass-restart.nix
blob: be16f69663f85f8a290b94269e32358ead7d7f85 (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
[
  { alias = "State on HA start-up";
  trigger = {
      platform = "homeassistant";
      event = "start";
    };
    action = [
      # Startup State
      { service = "mqtt.publish";
        data = {
          topic = "/bam/sonoffs/cmnd/state";
          payload = "";
        };
      }
      # Firmware Version
      { service = "mqtt.publish";
        data = {
          topic = "/bam/sonoffs/cmnd/status";
          payload = "2";
        };
      }
      # Will trigger restart of all devices!
      #{ service = "mqtt.publish";
      #  data = {
      #    topic = "sonoffs/cmnd/SetOption59"; # configure sending state on power change
      #    payload = "1";
      #  };
      #}
    ];
  }
]