33 lines
538 B
Nix
33 lines
538 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;
|
|
|
|
|
|
};
|
|
|
|
}
|