diff options
author | lassulus <lass@xerxes.r> | 2019-09-06 15:37:58 +0200 |
---|---|---|
committer | lassulus <lass@xerxes.r> | 2019-09-06 15:37:58 +0200 |
commit | ed97000b20623a952e41e808756ea8c8dfb666e6 (patch) | |
tree | f039f642bc03388704a66d94fc8ace402b583945 /krebs/2configs/shack/glados/sensors/hass.nix | |
parent | c2773285ebf8165fd725065047df7a58da01fb42 (diff) | |
parent | fce2c4275caf7df064fb13a4280291a9aefaef1f (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'krebs/2configs/shack/glados/sensors/hass.nix')
-rw-r--r-- | krebs/2configs/shack/glados/sensors/hass.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/krebs/2configs/shack/glados/sensors/hass.nix b/krebs/2configs/shack/glados/sensors/hass.nix new file mode 100644 index 000000000..634758701 --- /dev/null +++ b/krebs/2configs/shack/glados/sensors/hass.nix @@ -0,0 +1,22 @@ +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"; + }; +in + (map esphome_temp [ "lounge" "werkstatt" "herrenklo" "dusche" "fablab" "whc" ]) + ++ (map esphome_hum [ "lounge" "werkstatt" "herrenklo" "dusche" "fablab" "whc" ]) |