summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/bureautomation/sensor/espeasy.nix
blob: 4b78ee84e04eaf50eaee57cedb19d8741a03247c (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
let
  espeasy_dht22 = name: [
  { platform = "mqtt";
    name = "${name} DHT22 Temperature";
    device_class = "temperature";
    state_topic = "/bam/${name}/dht22/Temperature";
    availability_topic = "/bam/${name}/tele/LWT";
    payload_available = "Online";
    payload_not_available = "Offline";
  }
  { platform = "mqtt";
    device_class = "humidity";
    name = "${name} DHT22 Humidity";
    state_topic = "/bam/${name}/dht22/Humidity";
    availability_topic = "/bam/${name}/tele/LWT";
    payload_available = "Online";
    payload_not_available = "Offline";
  }];
  espeasy_ds18 = name:
  { platform = "mqtt";
    name = "${name} DS18 Temperature";
    state_topic = "/bam/${name}/ds18/Temperature";
    availability_topic = "/bam/${name}/tele/LWT";
    payload_available = "Online";
    payload_not_available = "Offline";
  };
in
(espeasy_dht22 "easy1") ++
(espeasy_dht22 "easy2") ++ [
  (espeasy_ds18 "easy3" )
]