pepe: split in essential and normal trigger groups

This commit is contained in:
Ingolf Wagner 2020-04-14 17:49:09 +02:00
parent 700c7c4939
commit 79fb6cc061
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 52 additions and 9 deletions

View file

@ -66,14 +66,18 @@ in {
}
];
in (presents "kitchen_room" "kitchen_room_present")
++ (presents "kitchen_room_essential" "kitchen_room_essential_present")
++ (presents "living_room" "living_room_present")
++ (presents "living_essential_room" "living_room_essential_present")
++ (presents "floor_room" "floor_room_present")
++ (presents "bed_room" "bed_room_present") ++ [
++ (presents "floor_room_essential" "floor_room_essential_present")
++ (presents "bed_room" "bed_room_present")
++ (presents "bed_room_essential" "bed_room_essential_present") ++ [
];
group = let
create_room = { name, description, presentEntities ? [ ] }: {
create_room = { name, description }: {
"${name}" = {
name = description;
view = false;
@ -83,12 +87,19 @@ in {
control = "hidden";
name = "${description} Anwesend";
view = false;
entities = presentEntities;
entities = [];
};
"${name}_essential" = {
control = "hidden";
name = "${description} Minimale Beleuchtung";
view = false;
entities = [ ];
};
"${name}_essential_present" = {
control = "hidden";
name = "${description} Flüchtig Anwesend";
view = false;
entities = [ "group.${name}_present" ];
};
};
create_rooms = rooms:
@ -119,13 +130,45 @@ in {
entities = [
"group.all_lights"
"group.floor_room"
"group.floor_room_present"
"group.floor_room_essential_present"
"group.bed_room"
"group.bed_room_present"
"group.bed_room_essential_present"
"group.living_room"
"group.living_room_present"
"group.living_room_essential_present"
"group.kitchen_room"
"group.kitchen_room_present"
"group.kitchen_room_essential_present"
];
};
view_bed_room = {
name = "Schlafzimmer";
view = true;
entities = [
"group.bed_room"
"group.bed_room_essential_present"
];
};
view_living_room = {
name = "Wohnzimmer";
view = true;
entities = [
"group.living_room"
"group.living_room_essential_present"
];
};
view_kitchen_room = {
name = "Küche";
view = true;
entities = [
"group.kitchen_room"
"group.kitchen_room_essential_present"
];
};
view_floor_room = {
name = "Flur";
view = true;
entities = [
"group.floor_room"
"group.floor_room_essential_present"
];
};
@ -143,7 +186,7 @@ in {
view_overview = {
name = "Übersicht";
view = true;
entities = [ "group.today" "group.all_sensors" ];
entities = [ "group.today" ];
};
# other stuff

View file

@ -64,7 +64,7 @@ let
};
"motion_sensor_7" = {
id = "0x00158d0002f9a6aa";
room = "bed_room_present";
room = "bed_room_essential_present";
};
"motion_sensor_8" = { id = "0x00158d0002f04637"; };
};