hass.io: working on room presents

This commit is contained in:
Ingolf Wagner 2020-05-02 00:45:54 +02:00
parent 5d946306a2
commit 13de526bc3
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 41 additions and 5 deletions

View file

@ -50,6 +50,21 @@ in {
input_boolean.bed_room_buttons.icon = "mdi:toggle-switch"; input_boolean.bed_room_buttons.icon = "mdi:toggle-switch";
input_boolean.situation_toggle.icon = "mdi:toggle-switch"; input_boolean.situation_toggle.icon = "mdi:toggle-switch";
# room presents when I'm alone
input_boolean.alone.icon = "mdi:account";
input_select.room_present = {
icon = "mdi:map-marker";
options = [
"kitchen_room_present"
"bath_room_present"
"living_room_present"
"bed_room_present"
"floor_room_present"
"bath_room_present"
"outside"
];
};
automation = let automation = let
allRooms = allRooms =
@ -103,9 +118,25 @@ in {
to = "off"; to = "off";
}; };
condition = { condition = {
condition = "state"; condition = "and";
entity_id = "input_select.situation"; conditions = [
state = situation; {
condition = "template";
value_template =
"{{ states( 'input_select.room_present' ) != '${presentsGroup}' }}";
}
{
condition = "template";
value_template =
"{{ states( 'input_boolean.alone' ) == 'on' }}";
}
{
condition = "template";
value_template =
"{{ states( 'input_select.situation' ) == '${situation}' }}";
}
];
}; };
action = [ action = [
{ {
@ -319,6 +350,7 @@ in {
name = "Räume"; name = "Räume";
view = true; view = true;
entities = [ entities = [
"group.today"
"group.floor_room" "group.floor_room"
"group.bed_room" "group.bed_room"
"group.living_room" "group.living_room"
@ -337,7 +369,11 @@ in {
control = "hidden"; control = "hidden";
name = "Today"; name = "Today";
view = false; view = false;
entities = [ "input_select.situation" ]; entities = [
"input_select.situation"
"input_select.room_present"
"input_boolean.alone"
];
}; };
view_overview = { view_overview = {
name = "Übersicht"; name = "Übersicht";

View file

@ -10,7 +10,7 @@ let
"pal02" = { "pal02" = {
label = "Wohnzimmer Lampe"; label = "Wohnzimmer Lampe";
icon = "mdi:lightbulb"; icon = "mdi:lightbulb";
groups = [ "all_lights" "living_room_lights" "living_room" ]; groups = [ ];
}; };
"pal03" = { "pal03" = {
label = "Wohnzimmer Lampe"; label = "Wohnzimmer Lampe";