Merge branch 'master' of ssh://git.ingolf-wagner.de:443/palo/nixos-config
This commit is contained in:
commit
e9120345ea
3 changed files with 70 additions and 13 deletions
|
@ -159,16 +159,22 @@ in {
|
||||||
];
|
];
|
||||||
onOffArguments = flatMap (name: [
|
onOffArguments = flatMap (name: [
|
||||||
{
|
{
|
||||||
roomGroup = "${name}_lights";
|
|
||||||
presentsGroup = "${name}_present";
|
presentsGroup = "${name}_present";
|
||||||
|
roomGroup = "${name}_lights";
|
||||||
situation = "dark";
|
situation = "dark";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
roomGroup = "${name}_essential";
|
|
||||||
turnOffGroup = "${name}_lights";
|
|
||||||
presentsGroup = "${name}_present";
|
|
||||||
situation = "essential";
|
|
||||||
brightness = 30;
|
brightness = 30;
|
||||||
|
presentsGroup = "${name}_present";
|
||||||
|
roomGroup = "${name}_essential";
|
||||||
|
situation = "essential";
|
||||||
|
turnOffGroup = "${name}_lights";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
presentsGroup = "${name}_present";
|
||||||
|
roomGroup = "${name}_bright";
|
||||||
|
turnOffGroup = "${name}_lights";
|
||||||
|
situation = "bright";
|
||||||
}
|
}
|
||||||
]) allRooms;
|
]) allRooms;
|
||||||
in (flatMap roomPresents onOffArguments);
|
in (flatMap roomPresents onOffArguments);
|
||||||
|
@ -252,6 +258,7 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
allArguments = flatMap (name: [
|
allArguments = flatMap (name: [
|
||||||
|
# essential <-> dark
|
||||||
{
|
{
|
||||||
presentsGroup = "${name}_present";
|
presentsGroup = "${name}_present";
|
||||||
fromSituation = "dark";
|
fromSituation = "dark";
|
||||||
|
@ -267,6 +274,37 @@ in {
|
||||||
fromRoomGroup = "${name}_essential";
|
fromRoomGroup = "${name}_essential";
|
||||||
toRoomGroup = "${name}_lights";
|
toRoomGroup = "${name}_lights";
|
||||||
}
|
}
|
||||||
|
# bright <-> dark
|
||||||
|
{
|
||||||
|
presentsGroup = "${name}_present";
|
||||||
|
fromSituation = "dark";
|
||||||
|
toSituation = "bright";
|
||||||
|
fromRoomGroup = "${name}_lights";
|
||||||
|
toRoomGroup = "${name}_bright";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
presentsGroup = "${name}_present";
|
||||||
|
fromSituation = "bright";
|
||||||
|
toSituation = "dark";
|
||||||
|
fromRoomGroup = "${name}_bright";
|
||||||
|
toRoomGroup = "${name}_lights";
|
||||||
|
}
|
||||||
|
# bright <-> essential
|
||||||
|
{
|
||||||
|
presentsGroup = "${name}_present";
|
||||||
|
fromSituation = "bright";
|
||||||
|
toSituation = "essential";
|
||||||
|
fromRoomGroup = "${name}_bright";
|
||||||
|
toRoomGroup = "${name}_essential";
|
||||||
|
brightness = 30;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
presentsGroup = "${name}_present";
|
||||||
|
fromSituation = "essential";
|
||||||
|
toSituation = "bright";
|
||||||
|
fromRoomGroup = "${name}_essential";
|
||||||
|
toRoomGroup = "${name}_bright";
|
||||||
|
}
|
||||||
]) allRooms;
|
]) allRooms;
|
||||||
in flatMap situationSwitch allArguments;
|
in flatMap situationSwitch allArguments;
|
||||||
|
|
||||||
|
@ -332,14 +370,21 @@ in {
|
||||||
view = false;
|
view = false;
|
||||||
entities = [ ];
|
entities = [ ];
|
||||||
};
|
};
|
||||||
|
"${name}_bright" = {
|
||||||
|
control = "hidden";
|
||||||
|
name = "${description} Tages Beleuchtung";
|
||||||
|
view = false;
|
||||||
|
entities = [ ];
|
||||||
|
};
|
||||||
"view_${name}" = {
|
"view_${name}" = {
|
||||||
name = description;
|
name = description;
|
||||||
view = true;
|
view = true;
|
||||||
entities = [
|
entities = [
|
||||||
"group.${name}"
|
"group.${name}"
|
||||||
|
"group.${name}_bright"
|
||||||
|
"group.${name}_essential"
|
||||||
"group.${name}_lights"
|
"group.${name}_lights"
|
||||||
"group.${name}_present"
|
"group.${name}_present"
|
||||||
"group.${name}_essential"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,7 +5,7 @@ let
|
||||||
"pal01" = {
|
"pal01" = {
|
||||||
label = "Schlafzimmer Lampe Links";
|
label = "Schlafzimmer Lampe Links";
|
||||||
icon = "mdi:lightbulb";
|
icon = "mdi:lightbulb";
|
||||||
groups = [ "all_lights" "bed_room_lights" "bed_room" ];
|
groups = [ "all_lights" "bed_room_lights" "bed_room_bright" "bed_room" ];
|
||||||
};
|
};
|
||||||
"pal02" = {
|
"pal02" = {
|
||||||
label = "Nummer 2";
|
label = "Nummer 2";
|
||||||
|
@ -19,7 +19,7 @@ let
|
||||||
"pal04" = {
|
"pal04" = {
|
||||||
label = "Schlafzimmer Lampe Rechts";
|
label = "Schlafzimmer Lampe Rechts";
|
||||||
icon = "mdi:lightbulb";
|
icon = "mdi:lightbulb";
|
||||||
groups = [ "all_lights" "bed_room_lights" "bed_room" ];
|
groups = [ "all_lights" "bed_room_lights" "bed_room_bright" "bed_room" ];
|
||||||
};
|
};
|
||||||
"pal05" = {
|
"pal05" = {
|
||||||
label = "TV";
|
label = "TV";
|
||||||
|
@ -32,9 +32,10 @@ let
|
||||||
icon = "mdi:lightbulb";
|
icon = "mdi:lightbulb";
|
||||||
groups = [
|
groups = [
|
||||||
"all_lights"
|
"all_lights"
|
||||||
"kitchen_room_lights"
|
|
||||||
"kitchen_room_essential"
|
|
||||||
"kitchen_room"
|
"kitchen_room"
|
||||||
|
"kitchen_room_bright"
|
||||||
|
"kitchen_room_essential"
|
||||||
|
"kitchen_room_lights"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
"pal07" = { label = "Nummer 7"; };
|
"pal07" = { label = "Nummer 7"; };
|
||||||
|
|
|
@ -5,7 +5,12 @@ let
|
||||||
allDevices = {
|
allDevices = {
|
||||||
"light_1" = {
|
"light_1" = {
|
||||||
id = "0x7cb03eaa0a0347b5";
|
id = "0x7cb03eaa0a0347b5";
|
||||||
groups = [ "floor_room" "floor_room_essential" "floor_room_lights" ];
|
groups = [
|
||||||
|
"floor_room"
|
||||||
|
"floor_room_bright"
|
||||||
|
"floor_room_essential"
|
||||||
|
"floor_room_lights"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
"light_2" = {
|
"light_2" = {
|
||||||
id = "0x7cb03eaa0a0387b9";
|
id = "0x7cb03eaa0a0387b9";
|
||||||
|
@ -17,14 +22,20 @@ let
|
||||||
};
|
};
|
||||||
"light_4" = {
|
"light_4" = {
|
||||||
id = "0x7cb03eaa0a04aabf";
|
id = "0x7cb03eaa0a04aabf";
|
||||||
groups = [ "bath_room" "bath_room_essential" "bath_room_lights" ];
|
groups = [
|
||||||
|
"bath_room"
|
||||||
|
"bath_room_bright"
|
||||||
|
"bath_room_essential"
|
||||||
|
"bath_room_lights"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
"light_5" = { id = "0x7cb03eaa0a0346e4"; };
|
"light_5" = { id = "0x7cb03eaa0a0346e4"; };
|
||||||
"light_6" = { id = "0x7cb03eaa0a034b46"; };
|
"light_6" = { id = "0x7cb03eaa0a034b46"; };
|
||||||
"light_7" = { id = "0x7cb03eaa0a033b4f"; };
|
"light_7" = { id = "0x7cb03eaa0a033b4f"; };
|
||||||
"light_8" = {
|
"light_8" = {
|
||||||
id = "0x7cb03eaa0a0384d3";
|
id = "0x7cb03eaa0a0384d3";
|
||||||
groups = [ "bed_room" "bed_room_essential" "bed_room_lights" ];
|
groups =
|
||||||
|
[ "bed_room" "bed_room_essential" "bed_room_lights" "bed_room_bright" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue