home-assistant: improved presents tracking
This commit is contained in:
parent
3576374285
commit
858f2fb2d9
2 changed files with 15 additions and 4 deletions
|
@ -213,12 +213,13 @@ in {
|
|||
|
||||
allRoomPresentGroups = map (name: "${name}_present") allRooms;
|
||||
|
||||
foo =
|
||||
switchPresentsTracking =
|
||||
# group to determine presents
|
||||
presentGroup:
|
||||
let
|
||||
otherRoomPresentGroups =
|
||||
builtins.filter (name: name != presentGroup) allRoomPresentGroups;
|
||||
(builtins.filter (name: name != presentGroup)
|
||||
allRoomPresentGroups) ++ [ "outside" ];
|
||||
in [
|
||||
{
|
||||
alias =
|
||||
|
@ -293,7 +294,8 @@ in {
|
|||
}];
|
||||
}
|
||||
];
|
||||
in flatMap foo allRoomPresentGroups;
|
||||
in (flatMap switchPresentsTracking allRoomPresentGroups)
|
||||
++ (switchPresentsTracking "outside");
|
||||
|
||||
# change light scene in rooms when changing situation
|
||||
# ---------------------------------------------------
|
||||
|
@ -540,6 +542,7 @@ in {
|
|||
"group.living_room"
|
||||
"group.kitchen_room"
|
||||
"group.bath_room"
|
||||
"group.outside"
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -551,9 +554,17 @@ in {
|
|||
"group.living_room_present"
|
||||
"group.kitchen_room_present"
|
||||
"group.bath_room_present"
|
||||
"group.outside"
|
||||
];
|
||||
};
|
||||
|
||||
outside = {
|
||||
control = "hidden";
|
||||
name = "Draußen";
|
||||
view = false;
|
||||
entities = [ ];
|
||||
};
|
||||
|
||||
# overview
|
||||
# --------
|
||||
all_sensors = {
|
||||
|
|
|
@ -9,7 +9,7 @@ let
|
|||
};
|
||||
"door_sensor_2" = {
|
||||
id = "0x00158d000316d5bf";
|
||||
groups = [ "floor_room" "floor_room_present" ];
|
||||
groups = [ "outside" ];
|
||||
};
|
||||
"window_sensor_3" = {
|
||||
id = "0x00158d0002f9516f";
|
||||
|
|
Loading…
Reference in a new issue