Include Guest Bedroom in house mode

This commit is contained in:
2021-10-18 23:28:42 +03:00
parent af5e969c2b
commit c4e977b345
25 changed files with 241 additions and 119 deletions
@@ -0,0 +1,20 @@
script:
guest_bedroom_bedside_confirm:
sequence:
- service: scene.create
data:
scene_id: guest_bedroom_before_confirm
snapshot_entities:
- light.light_lohas_6
- service: light.turn_on
entity_id: light.light_lohas_6
data:
rgb_color: [110, 255, 0]
- delay: 00:00:02
- service: light.turn_on
entity_id: light.light_lohas_6
data:
color_temp: "{{ 400 if is_state('sun.sun', 'above_horizon') else 500 }}"
- service: scene.turn_on
entity_id: scene.guest_bedroom_before_confirm
- delay: 00:00:01
@@ -13,8 +13,8 @@ automation:
# Turn on in Day Mode
- conditions:
- condition: state
entity_id: input_select.bedroom_mode
state: 'day'
entity_id: binary_sensor.someone_sleeping
state: "off"
sequence:
- service: light.turn_on
entity_id:
@@ -41,9 +41,9 @@ automation:
- choose:
# Turn off in Day Mode
- conditions:
condition: state
entity_id: input_select.bedroom_mode
state: 'day'
- condition: state
entity_id: binary_sensor.someone_sleeping
state: 'off'
sequence:
- service: light.turn_off
entity_id: light.hallway
@@ -13,7 +13,7 @@ automation:
# Turn on in Day Mode
- conditions:
- condition: state
entity_id: input_select.bedroom_mode
entity_id: sensor.house_mode
state: 'day'
sequence:
- service: light.turn_on
@@ -57,7 +57,7 @@ automation:
condition: not
conditions:
- condition: state
entity_id: input_select.bedroom_mode
entity_id: sensor.house_mode
state: 'day'
action:
# Turn off in Night Mode
@@ -85,7 +85,7 @@ automation:
minutes: 15
condition:
condition: state
entity_id: input_select.bedroom_mode
entity_id: sensor.house_mode
state: 'day'
action:
# Turn off in Day Mode
@@ -151,6 +151,7 @@ light:
- light.living_room
- light.master_bedroom
- light.hallway
- light.light_lohas_6
- platform: group
name: Ceiling
@@ -135,6 +135,10 @@ light:
# rgb_value_template: "{{ (value_json.Color[0:2]|int(base=16),value_json.Color[2:4]|int(base=16),value_json.Color[4:6]|int(base=16)) | join(',')}}"
qos: 1
retain: false
effect_command_topic: "cmnd/light_lohas_2/Scheme"
effect_state_topic: "tele/light_lohas_2/STATE"
effect_value_template: "{{value_json.Scheme}}"
effect_list: [0, 1, 2, 3, 4]
# - platform: mqtt
# name: "light_lohas_3"
@@ -246,6 +250,10 @@ light:
# rgb_value_template: "{{ (value_json.Color[0:2]|int(base=16),value_json.Color[2:4]|int(base=16),value_json.Color[4:6]|int(base=16)) | join(',')}}"
qos: 1
retain: false
effect_command_topic: "cmnd/light_lohas_6/Scheme"
effect_state_topic: "tele/light_lohas_6/STATE"
effect_value_template: "{{value_json.Scheme}}"
effect_list: [0, 1, 2, 3, 4]
- platform: "mqtt"
name: "ledvance_1"
+8
View File
@@ -39,10 +39,14 @@ script:
sonos_join_bedroom:
alias: Sonos · Join to Bedroom
sequence:
- condition: state
entity_id: input_select.bedroom_mode
state: "day"
- service: sonos.join
entity_id: group.all_sonos
data:
master: media_player.master_bedroom
sonos_join_tv:
alias: Sonos · Join to TV
sequence:
@@ -54,6 +58,7 @@ script:
entity_id: media_player.living_room
data:
source: TV
sonos_bathroom_up:
alias: Sonos · Bathroom up
sequence:
@@ -61,6 +66,7 @@ script:
entity_id: media_player.bathroom
data:
volume_level: 0.5
sonos_bathroom_down:
alias: Sonos · Bathroom down
sequence:
@@ -68,6 +74,7 @@ script:
entity_id: media_player.bathroom
data:
volume_level: 0.2
sonos_volume_10:
alias: Sonos · Volume 10
sequence:
@@ -79,6 +86,7 @@ script:
- media_player.living_room
data:
volume_level: 0.1
sonos_volume_20:
alias: Sonos · Volume 20
sequence:
+20
View File
@@ -119,6 +119,26 @@ automation:
person: person.player_2
input_boolean: input_boolean.player_2
- alias: Presence · Georgi leaving
trigger:
- platform: state
entity_id: person.georgi
from: "home"
to: "not_home"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.georgi_home
- alias: Presence · Player 2 leaving
trigger:
- platform: state
entity_id: person.player_2
from: "home"
to: "not_home"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.player_2_home
- alias: Presence · Leaving home
trigger:
- platform: state
+1 -1
View File
@@ -33,7 +33,7 @@ automation:
to: "on"
condition:
condition: state
entity_id: input_select.bedroom_mode
entity_id: sensor.house_mode
state: "night"
action:
- service: light.turn_on
+1 -1
View File
@@ -33,7 +33,7 @@ script:
- condition: not
conditions:
- condition: state
entity_id: input_select.bedroom_mode
entity_id: sensor.house_mode
state: 'night'
# Combine partials for speech message.
- service: script.say_discretely