nixos-config/nixos/machines/pepe/home-assistant/zigbee2mqtt/temperatur.nix
2023-01-15 21:39:16 +01:00

33 lines
540 B
Nix

{ pkgs, lib, ... }:
let
# https://www.zigbee2mqtt.io/devices/WSDCGQ11LM.html
allDevices = {
"temperature_sensor_1" = {
id = "0x00158d0002d79220";
groups = [ "living_room" ];
};
"temperature_sensor_2" = {
id = "0x00158d0002d7913d";
groups = [ "living_room" ];
};
};
in
{
services.zigbee2mqtt.settings = lib.mapAttrs'
(name:
{ id, ... }: {
name = id;
value = {
retain = false;
friendly_name = name;
};
})
allDevices;
};
}