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.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
allRooms =
@ -103,9 +118,25 @@ in {
to = "off";
};
condition = {
condition = "state";
entity_id = "input_select.situation";
state = situation;
condition = "and";
conditions = [
{
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 = [
{
@ -319,6 +350,7 @@ in {
name = "Räume";
view = true;
entities = [
"group.today"
"group.floor_room"
"group.bed_room"
"group.living_room"
@ -337,7 +369,11 @@ in {
control = "hidden";
name = "Today";
view = false;
entities = [ "input_select.situation" ];
entities = [
"input_select.situation"
"input_select.room_present"
"input_boolean.alone"
];
};
view_overview = {
name = "Übersicht";

View file

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