diff options
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..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" ]) |