summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/glados/sensors
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-01-07 16:52:31 +0100
committermakefu <github@syntax-fehler.de>2020-01-07 16:52:31 +0100
commit4ad85faacedc755fd25b7edd0df41234c98876f0 (patch)
tree06f501161bdb8927987d438093e185803f14a46d /krebs/2configs/shack/glados/sensors
parent479ce8c4c5747d6da60d2d907d662e7a5708bfd7 (diff)
shack/glados: init hass config
Diffstat (limited to 'krebs/2configs/shack/glados/sensors')
-rw-r--r--krebs/2configs/shack/glados/sensors/hass.nix23
1 files changed, 3 insertions, 20 deletions
diff --git a/krebs/2configs/shack/glados/sensors/hass.nix b/krebs/2configs/shack/glados/sensors/hass.nix
index 634758701..ced6d9752 100644
--- a/krebs/2configs/shack/glados/sensors/hass.nix
+++ b/krebs/2configs/shack/glados/sensors/hass.nix
@@ -1,22 +1,5 @@
let
- esphome_temp = name:
- { platform = "mqtt";
- name = "${name} Temperature";
- device_class = "temperature";
- state_topic = "glados/${name}/sensor/temperature/state";
- availability_topic = "glados/${name}/status";
- payload_available = "online";
- payload_not_available = "offline";
- };
- esphome_hum = name:
- { platform = "mqtt";
- device_class = "humidity";
- name = "${name} Humidity";
- state_topic = "glados/${name}/sensor/humidity/state";
- availability_topic = "glados/${name}/status";
- payload_available = "online";
- payload_not_available = "offline";
- };
+ glados = import ../lib;
in
- (map esphome_temp [ "lounge" "werkstatt" "herrenklo" "dusche" "fablab" "whc" ])
- ++ (map esphome_hum [ "lounge" "werkstatt" "herrenklo" "dusche" "fablab" "whc" ])
+ (map glados.esphome.temp [ "lounge" "werkstatt" "herrenklo" "dusche" "fablab" "whc" ])
+ ++ (map glados.esphome.hum [ "lounge" "werkstatt" "herrenklo" "dusche" "fablab" "whc" ])