nixos-config/nixos/machines/pepe/home-assistant/zigbee2mqtt/temperatur.nix

34 lines
538 B
Nix
Raw Normal View History

2020-04-15 23:55:21 +02:00
{ pkgs, lib, ... }:
let
# https://www.zigbee2mqtt.io/devices/WSDCGQ11LM.html
allDevices = {
"temperature_sensor_1" = {
id = "0x00158d0002d79220";
2020-04-16 00:22:29 +02:00
groups = [ "living_room" ];
2020-04-15 23:55:21 +02:00
};
"temperature_sensor_2" = {
id = "0x00158d0002d7913d";
2020-04-16 00:22:29 +02:00
groups = [ "living_room" ];
2020-04-15 23:55:21 +02:00
};
};
2021-11-01 09:20:42 +01:00
in
{
2020-04-15 23:55:21 +02:00
2023-01-15 10:43:10 +01:00
services.zigbee2mqtt.settings = lib.mapAttrs'
2021-11-01 09:20:42 +01:00
(name:
{ id, ... }: {
name = id;
value = {
retain = false;
friendly_name = name;
};
})
allDevices;
2020-04-15 23:55:21 +02:00
2023-01-16 19:37:48 +01:00
};
2020-04-15 23:55:21 +02:00
}