home-assistant: turn of presents_tracking when opening door
This commit is contained in:
parent
93fa05acd8
commit
308ba8463b
2 changed files with 27 additions and 9 deletions
|
@ -60,7 +60,6 @@ in {
|
|||
"bed_room_present"
|
||||
"floor_room_present"
|
||||
"bath_room_present"
|
||||
"outside"
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -219,7 +218,7 @@ in {
|
|||
let
|
||||
otherRoomPresentGroups =
|
||||
(builtins.filter (name: name != presentGroup)
|
||||
allRoomPresentGroups) ++ [ "outside" ];
|
||||
allRoomPresentGroups);
|
||||
in [
|
||||
{
|
||||
alias =
|
||||
|
@ -294,8 +293,7 @@ in {
|
|||
}];
|
||||
}
|
||||
];
|
||||
in (flatMap switchPresentsTracking allRoomPresentGroups)
|
||||
++ (switchPresentsTracking "outside");
|
||||
in (flatMap switchPresentsTracking allRoomPresentGroups);
|
||||
|
||||
# change light scene in rooms when changing situation
|
||||
# ---------------------------------------------------
|
||||
|
@ -461,6 +459,30 @@ in {
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
# trigger outside
|
||||
{
|
||||
alias = "set essential";
|
||||
trigger = [
|
||||
{
|
||||
platform = "state";
|
||||
entity_id = "group.outside";
|
||||
from = "off";
|
||||
to = "on";
|
||||
}
|
||||
{
|
||||
platform = "state";
|
||||
entity_id = "group.outside";
|
||||
from = "on";
|
||||
to = "off";
|
||||
}
|
||||
];
|
||||
action = {
|
||||
service = "input_boolean.turn_off";
|
||||
data.entity_id = "input_boolean.presents_tracking";
|
||||
};
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
group = let
|
||||
|
@ -542,7 +564,6 @@ in {
|
|||
"group.living_room"
|
||||
"group.kitchen_room"
|
||||
"group.bath_room"
|
||||
"group.outside"
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -554,14 +575,11 @@ in {
|
|||
"group.living_room_present"
|
||||
"group.kitchen_room_present"
|
||||
"group.bath_room_present"
|
||||
"group.outside"
|
||||
];
|
||||
};
|
||||
|
||||
outside = {
|
||||
control = "hidden";
|
||||
name = "Draußen";
|
||||
view = false;
|
||||
entities = [ ];
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ let
|
|||
};
|
||||
"door_sensor_2" = {
|
||||
id = "0x00158d000316d5bf";
|
||||
groups = [ "outside" ];
|
||||
groups = [ "floor_room" "floor_room_present" "outside" ];
|
||||
};
|
||||
"window_sensor_3" = {
|
||||
id = "0x00158d0002f9516f";
|
||||
|
|
Loading…
Reference in a new issue