Hendrik Sokolowski
6c7d9704bd
All checks were successful
continuous-integration/drone/push Build is passing
27 lines
592 B
Nix
27 lines
592 B
Nix
let
|
|
mapSegments = [
|
|
{id = 1; name = "Hendrik";}
|
|
{id = 2; name = "Schlafzimmer";}
|
|
{id = 3; name = "Badezimmer";}
|
|
{id = 4; name = "Toilette";}
|
|
{id = 5; name = "Flur";}
|
|
{id = 6; name = "Vorratsraum";}
|
|
{id = 7; name = "Küche";}
|
|
{id = 8; name = "Caro";}
|
|
{id = 9; name = "Wohnzimmer";}
|
|
];
|
|
|
|
mkCustomize = id: [
|
|
{
|
|
name = "input_boolean.vacuum_segment_${toString id}";
|
|
value = {
|
|
room_id = id;
|
|
};
|
|
}
|
|
];
|
|
|
|
mkCustomizes = ms: builtins.concatMap (s: (mkCustomize s.id)) ms;
|
|
|
|
in
|
|
builtins.listToAttrs (mkCustomizes mapSegments)
|