diff options
author | lassulus <lassulus@lassul.us> | 2020-01-10 19:37:56 +0100 |
---|---|---|
committer | lassulus <lassulus@lassul.us> | 2020-01-10 19:37:56 +0100 |
commit | 4104b5d6d8e0acb80308e44e436a9cbe8863961a (patch) | |
tree | b753694bb258edace7269bce688ced3bbd4b0133 /krebs/2configs/shack/glados/sensors | |
parent | f491fac2025b2e99788be8e26181da1b26995e84 (diff) | |
parent | 5d3fbb2af9c1c7d166ca45cd9d119bd77a3acd80 (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'krebs/2configs/shack/glados/sensors')
-rw-r--r-- | krebs/2configs/shack/glados/sensors/hass.nix | 23 |
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..8de0ef391 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 (host: glados.esphome.temp {inherit host;}) [ "lounge" "werkstatt" "herrenklo" "dusche" "fablab" "whc" ]) + ++ (map (host: glados.esphome.hum {inherit host;}) [ "lounge" "werkstatt" "herrenklo" "dusche" "fablab" "whc" ]) |