mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-08 10:38:44 +00:00
Include Guest Bedroom in house mode
This commit is contained in:
@@ -17,7 +17,7 @@ trigger:
|
|||||||
|
|
||||||
condition:
|
condition:
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: input_select.bedroom_mode
|
entity_id: sensor.house_mode
|
||||||
state: "day"
|
state: "day"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ cards:
|
|||||||
- input_boolean.routine_welcome_home
|
- input_boolean.routine_welcome_home
|
||||||
- automation.presence_georgi_arrival_detection
|
- automation.presence_georgi_arrival_detection
|
||||||
- automation.presence_player_2_arrival_detection
|
- automation.presence_player_2_arrival_detection
|
||||||
|
- automation.presence_georgi_leaving
|
||||||
|
- automation.presence_player_2_leaving
|
||||||
- automation.presence_coming_home
|
- automation.presence_coming_home
|
||||||
- automation.presence_leaving_home
|
- automation.presence_leaving_home
|
||||||
- automation.routine_coming_home_left_work
|
- automation.routine_coming_home_left_work
|
||||||
@@ -60,7 +62,7 @@ cards:
|
|||||||
- automation.living_room_desk_switch
|
- automation.living_room_desk_switch
|
||||||
- automation.bedroom_opple
|
- automation.bedroom_opple
|
||||||
- automation.bedroom_bedside_switch
|
- automation.bedroom_bedside_switch
|
||||||
- automation.bedroom_aqara_switch
|
- automation.guest_bedroom_aqara_switch
|
||||||
- automation.bathroom_switch
|
- automation.bathroom_switch
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
@@ -134,7 +136,9 @@ cards:
|
|||||||
entities:
|
entities:
|
||||||
- automation.bedroom_mode_set_to_day
|
- automation.bedroom_mode_set_to_day
|
||||||
- automation.bedroom_mode_set_to_bed
|
- automation.bedroom_mode_set_to_bed
|
||||||
- automation.bedroom_mode_set_to_night
|
- automation.guest_bedroom_mode_set_to_night
|
||||||
|
- automation.house_mode_set_to_day
|
||||||
|
- automation.house_mode_set_to_night
|
||||||
- automation.bedroom_mode_set_to_day_if_bedroom_door_was_opened
|
- automation.bedroom_mode_set_to_day_if_bedroom_door_was_opened
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
|
|||||||
@@ -38,10 +38,20 @@
|
|||||||
- type: custom:decluttering-card
|
- type: custom:decluttering-card
|
||||||
template: v3_section_title
|
template: v3_section_title
|
||||||
variables:
|
variables:
|
||||||
- title: Lights
|
- title: Controls
|
||||||
- type: horizontal-stack
|
- type: horizontal-stack
|
||||||
cards:
|
cards:
|
||||||
- type: custom:button-card
|
- type: custom:button-card
|
||||||
template: v3_button_light
|
template: v3_button_light
|
||||||
entity: light.light_lohas_6
|
entity: light.light_lohas_6
|
||||||
name: Night stand
|
name: Night stand
|
||||||
|
- type: custom:button-card
|
||||||
|
template: v3_button
|
||||||
|
entity: input_select.guest_bedroom_mode
|
||||||
|
icon: mdi:bed
|
||||||
|
name: Mode
|
||||||
|
tap_action:
|
||||||
|
action: call-service
|
||||||
|
service: input_select.select_next
|
||||||
|
service_data:
|
||||||
|
entity_id: input_select.guest_bedroom_mode
|
||||||
|
|||||||
@@ -80,6 +80,15 @@
|
|||||||
template: v3_button
|
template: v3_button
|
||||||
entity: input_boolean.guest_bedroom
|
entity: input_boolean.guest_bedroom
|
||||||
name: G. Bedroom Occupied
|
name: G. Bedroom Occupied
|
||||||
|
- type: custom:button-card
|
||||||
|
template: v3_button
|
||||||
|
entity: input_select.guest_bedroom_mode
|
||||||
|
name: G. Bedroom
|
||||||
|
tap_action:
|
||||||
|
action: call-service
|
||||||
|
service: input_select.select_next
|
||||||
|
service_data:
|
||||||
|
entity_id: input_select.guest_bedroom_mode
|
||||||
|
|
||||||
- type: custom:decluttering-card
|
- type: custom:decluttering-card
|
||||||
template: v3_section_title
|
template: v3_section_title
|
||||||
@@ -118,3 +127,17 @@
|
|||||||
- input_number.toshiba_heat_temp
|
- input_number.toshiba_heat_temp
|
||||||
- input_number.toshiba_cool_temp
|
- input_number.toshiba_cool_temp
|
||||||
- input_number.toshiba_trigger_temp
|
- input_number.toshiba_trigger_temp
|
||||||
|
|
||||||
|
|
||||||
|
- type: custom:decluttering-card
|
||||||
|
template: v3_section_title
|
||||||
|
variables:
|
||||||
|
- title: Monitoring
|
||||||
|
- type: horizontal-stack
|
||||||
|
cards:
|
||||||
|
- type: custom:button-card
|
||||||
|
template: v3_button
|
||||||
|
entity: binary_sensor.someone_sleeping
|
||||||
|
- type: custom:button-card
|
||||||
|
template: v3_button
|
||||||
|
entity: binary_sensor.someone_home
|
||||||
|
|||||||
@@ -18,29 +18,3 @@ sensor:
|
|||||||
icon: "mdi:signal"
|
icon: "mdi:signal"
|
||||||
unit_of_measurement: "lqi"
|
unit_of_measurement: "lqi"
|
||||||
value_template: "{{ value_json.linkquality }}"
|
value_template: "{{ value_json.linkquality }}"
|
||||||
|
|
||||||
script:
|
|
||||||
bed_led_on:
|
|
||||||
sequence:
|
|
||||||
- delay: "00:00:01"
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.bed_led
|
|
||||||
- delay: "00:00:03"
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.bed_led
|
|
||||||
data_template:
|
|
||||||
brightness_pct: "{{ brightness_pct | default(100) }}"
|
|
||||||
|
|
||||||
bed_led_toggle:
|
|
||||||
sequence:
|
|
||||||
- choose:
|
|
||||||
- conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: light.bed_led
|
|
||||||
state: "off"
|
|
||||||
sequence:
|
|
||||||
- service: script.bed_led_on
|
|
||||||
|
|
||||||
default:
|
|
||||||
- service: light.turn_off
|
|
||||||
entity_id: light.bed_led
|
|
||||||
|
|||||||
@@ -35,11 +35,8 @@ automation:
|
|||||||
button_2_single:
|
button_2_single:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: light.master_bedroom
|
entity_id:
|
||||||
brightness_pct: >-
|
- light.master_bedroom
|
||||||
{% if not is_state('input_select.bedroom_mode', 'day') %} 40 {% else %} 100 {% endif %}
|
|
||||||
- service: script.bed_led_on
|
|
||||||
data_template:
|
|
||||||
brightness_pct: >-
|
brightness_pct: >-
|
||||||
{% if not is_state('input_select.bedroom_mode', 'day') %} 40 {% else %} 100 {% endif %}
|
{% if not is_state('input_select.bedroom_mode', 'day') %} 40 {% else %} 100 {% endif %}
|
||||||
|
|
||||||
@@ -70,6 +67,7 @@ automation:
|
|||||||
data_template:
|
data_template:
|
||||||
entity_id:
|
entity_id:
|
||||||
- light.bedside
|
- light.bedside
|
||||||
|
- light.bed_led
|
||||||
brightness_pct: >-
|
brightness_pct: >-
|
||||||
|
|
||||||
{% if not is_state('input_select.bedroom_mode', 'day') %}
|
{% if not is_state('input_select.bedroom_mode', 'day') %}
|
||||||
@@ -77,7 +75,6 @@ automation:
|
|||||||
{% else %}
|
{% else %}
|
||||||
100
|
100
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- service: script.bed_led_on
|
|
||||||
|
|
||||||
button_3_single:
|
button_3_single:
|
||||||
- service: media_player.media_play_pause
|
- service: media_player.media_play_pause
|
||||||
|
|||||||
+21
-12
@@ -16,24 +16,33 @@ sensor:
|
|||||||
|
|
||||||
|
|
||||||
automation:
|
automation:
|
||||||
- alias: Bedroom · Aqara Switch
|
- alias: Guest Bedroom · Aqara Switch
|
||||||
use_blueprint:
|
use_blueprint:
|
||||||
path: aqara_switch.yaml
|
path: aqara_switch.yaml
|
||||||
input:
|
input:
|
||||||
z2m_topic: "z2m_deconz/bedroom_wall_switch"
|
z2m_topic: "z2m_deconz/bedroom_wall_switch"
|
||||||
click:
|
click:
|
||||||
- service: script.apply_bedroom_pink
|
- choose:
|
||||||
- service: script.music_play
|
- conditions:
|
||||||
data:
|
- condition: state
|
||||||
playlist: "Songs for a Romantic Evening"
|
entity_id: input_select.guest_bedroom_mode
|
||||||
volume: 0.1
|
state: 'night'
|
||||||
shuffle: false
|
sequence:
|
||||||
- service: script.sonos_volume_10
|
- service: light.toggle
|
||||||
|
entity_id: light.light_lohas_6
|
||||||
|
data:
|
||||||
|
brightness_pct: 10
|
||||||
|
default:
|
||||||
|
- service: light.toggle
|
||||||
|
entity_id: light.light_lohas_6
|
||||||
|
data:
|
||||||
|
brightness_pct: 100
|
||||||
|
|
||||||
double_click:
|
double_click:
|
||||||
- service: input_select.select_next
|
- service: light.toggle
|
||||||
entity_id: input_select.light_color_mode
|
entity_id: light.light_lohas_6
|
||||||
|
|
||||||
hold:
|
hold:
|
||||||
- service: media_player.media_play_pause
|
- service: script.guest_bedroom_bedside_confirm
|
||||||
entity_id: media_player.master_bedroom
|
- service: input_select.select_next
|
||||||
|
entity_id: input_select.guest_bedroom_mode
|
||||||
@@ -26,6 +26,10 @@ automation:
|
|||||||
platform: state
|
platform: state
|
||||||
entity_id: input_select.hallway_dashboard_mode
|
entity_id: input_select.hallway_dashboard_mode
|
||||||
to: "Leaving"
|
to: "Leaving"
|
||||||
|
condition:
|
||||||
|
condition: state
|
||||||
|
entity_id: input_boolean.guest_bedroom
|
||||||
|
state: "off"
|
||||||
action:
|
action:
|
||||||
- service: script.say
|
- service: script.say
|
||||||
data:
|
data:
|
||||||
@@ -40,5 +44,6 @@ automation:
|
|||||||
- service: script.say
|
- service: script.say
|
||||||
data:
|
data:
|
||||||
message: "Goodbye!"
|
message: "Goodbye!"
|
||||||
|
# TODO: add conditions
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
entity_id: input_boolean.georgi_home
|
entity_id: input_boolean.georgi_home
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ automation:
|
|||||||
entity_id: light.living_room_main
|
entity_id: light.living_room_main
|
||||||
brightness_pct: >-
|
brightness_pct: >-
|
||||||
|
|
||||||
{% if is_state('input_select.bedroom_mode', 'night') %}
|
{% if is_state('sensor.house_mode', 'night') %}
|
||||||
40
|
40
|
||||||
{% else %}
|
{% else %}
|
||||||
100
|
100
|
||||||
@@ -39,7 +39,7 @@ automation:
|
|||||||
entity_id: light.living_room_ambient
|
entity_id: light.living_room_ambient
|
||||||
brightness_pct: >-
|
brightness_pct: >-
|
||||||
|
|
||||||
{% if is_state('input_select.bedroom_mode', 'night') %}
|
{% if is_state('sensor.house_mode', 'night') %}
|
||||||
40
|
40
|
||||||
{% else %}
|
{% else %}
|
||||||
100
|
100
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ automation:
|
|||||||
to: "off"
|
to: "off"
|
||||||
condition:
|
condition:
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: input_select.bedroom_mode
|
entity_id: sensor.house_mode
|
||||||
state: "day"
|
state: "day"
|
||||||
action:
|
action:
|
||||||
- service: script.sonos_join_bedroom
|
- service: script.sonos_join_bedroom
|
||||||
|
|||||||
@@ -2,11 +2,15 @@
|
|||||||
input_select:
|
input_select:
|
||||||
bedroom_mode:
|
bedroom_mode:
|
||||||
name: Bedroom mode
|
name: Bedroom mode
|
||||||
icon: mdi:home-analytics
|
|
||||||
options:
|
options:
|
||||||
- day
|
- day
|
||||||
- bed
|
- bed
|
||||||
- night
|
- night
|
||||||
|
guest_bedroom_mode:
|
||||||
|
name: Guest Bedroom mode
|
||||||
|
options:
|
||||||
|
- day
|
||||||
|
- night
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: template
|
- platform: template
|
||||||
@@ -24,6 +28,37 @@ binary_sensor:
|
|||||||
mdi:weather-night
|
mdi:weather-night
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
someone_sleeping:
|
||||||
|
friendly_name: Someone sleeping
|
||||||
|
value_template: >-
|
||||||
|
|
||||||
|
{% if is_state('input_boolean.guest_bedroom', 'off') %}
|
||||||
|
{{ is_state('input_boolean.bedroom_mode', 'night') }}
|
||||||
|
{% else %}
|
||||||
|
{{ is_state('input_select.bedroom_mode', 'night') or is_state('input_select.guest_bedroom_mode', 'night') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: template
|
||||||
|
sensors:
|
||||||
|
house_mode:
|
||||||
|
friendly_name: House mode
|
||||||
|
value_template: >-
|
||||||
|
|
||||||
|
{% if is_state('input_boolean.guest_bedroom', 'off') %}
|
||||||
|
{% if is_state('input_select.bedroom_mode', 'night') %}
|
||||||
|
night
|
||||||
|
{% else %}
|
||||||
|
day
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
{% if is_state('input_select.bedroom_mode', 'night') and is_state('input_select.guest_bedroom_mode', 'night') %}
|
||||||
|
night
|
||||||
|
{% else %}
|
||||||
|
day
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
automation:
|
automation:
|
||||||
- alias: Bedroom mode · Set to day
|
- alias: Bedroom mode · Set to day
|
||||||
@@ -32,7 +67,7 @@ automation:
|
|||||||
entity_id: input_select.bedroom_mode
|
entity_id: input_select.bedroom_mode
|
||||||
to: "day"
|
to: "day"
|
||||||
action:
|
action:
|
||||||
- service: script.routine_waking_up
|
- service: script.routine_bedroom_morning
|
||||||
|
|
||||||
- alias: Bedroom mode · Set to bed
|
- alias: Bedroom mode · Set to bed
|
||||||
trigger:
|
trigger:
|
||||||
@@ -40,12 +75,29 @@ automation:
|
|||||||
entity_id: input_select.bedroom_mode
|
entity_id: input_select.bedroom_mode
|
||||||
to: "bed"
|
to: "bed"
|
||||||
action:
|
action:
|
||||||
- service: script.routine_bedtime
|
- service: script.routine_bedroom_bedtime
|
||||||
|
|
||||||
- alias: Bedroom mode · Set to night
|
- alias: Guest Bedroom mode · Set to night
|
||||||
trigger:
|
trigger:
|
||||||
platform: state
|
platform: state
|
||||||
entity_id: input_select.bedroom_mode
|
entity_id: input_select.guest_bedroom_mode
|
||||||
|
to: "night"
|
||||||
|
action:
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.light_lohas_6
|
||||||
|
|
||||||
|
- alias: House mode · Set to day
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: sensor.house_mode
|
||||||
|
to: "day"
|
||||||
|
action:
|
||||||
|
- service: script.routine_waking_up
|
||||||
|
|
||||||
|
- alias: House mode · Set to night
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: sensor.house_mode
|
||||||
to: "night"
|
to: "night"
|
||||||
action:
|
action:
|
||||||
- service: script.routine_good_night
|
- service: script.routine_good_night
|
||||||
@@ -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
|
# Turn on in Day Mode
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_select.bedroom_mode
|
entity_id: binary_sensor.someone_sleeping
|
||||||
state: 'day'
|
state: "off"
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
entity_id:
|
entity_id:
|
||||||
@@ -41,9 +41,9 @@ automation:
|
|||||||
- choose:
|
- choose:
|
||||||
# Turn off in Day Mode
|
# Turn off in Day Mode
|
||||||
- conditions:
|
- conditions:
|
||||||
condition: state
|
- condition: state
|
||||||
entity_id: input_select.bedroom_mode
|
entity_id: binary_sensor.someone_sleeping
|
||||||
state: 'day'
|
state: 'off'
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id: light.hallway
|
entity_id: light.hallway
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ automation:
|
|||||||
# Turn on in Day Mode
|
# Turn on in Day Mode
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_select.bedroom_mode
|
entity_id: sensor.house_mode
|
||||||
state: 'day'
|
state: 'day'
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
@@ -57,7 +57,7 @@ automation:
|
|||||||
condition: not
|
condition: not
|
||||||
conditions:
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_select.bedroom_mode
|
entity_id: sensor.house_mode
|
||||||
state: 'day'
|
state: 'day'
|
||||||
action:
|
action:
|
||||||
# Turn off in Night Mode
|
# Turn off in Night Mode
|
||||||
@@ -85,7 +85,7 @@ automation:
|
|||||||
minutes: 15
|
minutes: 15
|
||||||
condition:
|
condition:
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: input_select.bedroom_mode
|
entity_id: sensor.house_mode
|
||||||
state: 'day'
|
state: 'day'
|
||||||
action:
|
action:
|
||||||
# Turn off in Day Mode
|
# Turn off in Day Mode
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ light:
|
|||||||
- light.living_room
|
- light.living_room
|
||||||
- light.master_bedroom
|
- light.master_bedroom
|
||||||
- light.hallway
|
- light.hallway
|
||||||
|
- light.light_lohas_6
|
||||||
|
|
||||||
- platform: group
|
- platform: group
|
||||||
name: Ceiling
|
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(',')}}"
|
# 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
|
qos: 1
|
||||||
retain: false
|
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
|
# - platform: mqtt
|
||||||
# name: "light_lohas_3"
|
# 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(',')}}"
|
# 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
|
qos: 1
|
||||||
retain: false
|
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"
|
- platform: "mqtt"
|
||||||
name: "ledvance_1"
|
name: "ledvance_1"
|
||||||
|
|||||||
@@ -39,10 +39,14 @@ script:
|
|||||||
sonos_join_bedroom:
|
sonos_join_bedroom:
|
||||||
alias: Sonos · Join to Bedroom
|
alias: Sonos · Join to Bedroom
|
||||||
sequence:
|
sequence:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_select.bedroom_mode
|
||||||
|
state: "day"
|
||||||
- service: sonos.join
|
- service: sonos.join
|
||||||
entity_id: group.all_sonos
|
entity_id: group.all_sonos
|
||||||
data:
|
data:
|
||||||
master: media_player.master_bedroom
|
master: media_player.master_bedroom
|
||||||
|
|
||||||
sonos_join_tv:
|
sonos_join_tv:
|
||||||
alias: Sonos · Join to TV
|
alias: Sonos · Join to TV
|
||||||
sequence:
|
sequence:
|
||||||
@@ -54,6 +58,7 @@ script:
|
|||||||
entity_id: media_player.living_room
|
entity_id: media_player.living_room
|
||||||
data:
|
data:
|
||||||
source: TV
|
source: TV
|
||||||
|
|
||||||
sonos_bathroom_up:
|
sonos_bathroom_up:
|
||||||
alias: Sonos · Bathroom up
|
alias: Sonos · Bathroom up
|
||||||
sequence:
|
sequence:
|
||||||
@@ -61,6 +66,7 @@ script:
|
|||||||
entity_id: media_player.bathroom
|
entity_id: media_player.bathroom
|
||||||
data:
|
data:
|
||||||
volume_level: 0.5
|
volume_level: 0.5
|
||||||
|
|
||||||
sonos_bathroom_down:
|
sonos_bathroom_down:
|
||||||
alias: Sonos · Bathroom down
|
alias: Sonos · Bathroom down
|
||||||
sequence:
|
sequence:
|
||||||
@@ -68,6 +74,7 @@ script:
|
|||||||
entity_id: media_player.bathroom
|
entity_id: media_player.bathroom
|
||||||
data:
|
data:
|
||||||
volume_level: 0.2
|
volume_level: 0.2
|
||||||
|
|
||||||
sonos_volume_10:
|
sonos_volume_10:
|
||||||
alias: Sonos · Volume 10
|
alias: Sonos · Volume 10
|
||||||
sequence:
|
sequence:
|
||||||
@@ -79,6 +86,7 @@ script:
|
|||||||
- media_player.living_room
|
- media_player.living_room
|
||||||
data:
|
data:
|
||||||
volume_level: 0.1
|
volume_level: 0.1
|
||||||
|
|
||||||
sonos_volume_20:
|
sonos_volume_20:
|
||||||
alias: Sonos · Volume 20
|
alias: Sonos · Volume 20
|
||||||
sequence:
|
sequence:
|
||||||
|
|||||||
@@ -119,6 +119,26 @@ automation:
|
|||||||
person: person.player_2
|
person: person.player_2
|
||||||
input_boolean: input_boolean.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
|
- alias: Presence · Leaving home
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ automation:
|
|||||||
to: "on"
|
to: "on"
|
||||||
condition:
|
condition:
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: input_select.bedroom_mode
|
entity_id: sensor.house_mode
|
||||||
state: "night"
|
state: "night"
|
||||||
action:
|
action:
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ script:
|
|||||||
- condition: not
|
- condition: not
|
||||||
conditions:
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_select.bedroom_mode
|
entity_id: sensor.house_mode
|
||||||
state: 'night'
|
state: 'night'
|
||||||
# Combine partials for speech message.
|
# Combine partials for speech message.
|
||||||
- service: script.say_discretely
|
- service: script.say_discretely
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
script:
|
script:
|
||||||
routine_bedtime:
|
routine_bedroom_bedtime:
|
||||||
alias: Routine · Bedtime
|
alias: Routine · Bedroom · Bedtime
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: sonos.unjoin
|
||||||
|
entity_id:
|
||||||
|
- media_player.living_room
|
||||||
|
- media_player.kitchen
|
||||||
|
- media_player.bathroom
|
||||||
|
|
||||||
- service: script.say_discretely
|
- service: script.say_discretely
|
||||||
data:
|
data:
|
||||||
message: "Entering bed time."
|
message: "Entering bed time."
|
||||||
@@ -15,41 +21,14 @@ script:
|
|||||||
option: "sleep"
|
option: "sleep"
|
||||||
|
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
entity_id: light.bedside
|
entity_id:
|
||||||
- service: script.bed_led_on
|
- light.bedside
|
||||||
|
- light.bed_led
|
||||||
|
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id: light.master_bedroom_main
|
entity_id: light.master_bedroom_main
|
||||||
- service: sonos.unjoin
|
|
||||||
entity_id:
|
|
||||||
- media_player.living_room
|
|
||||||
- media_player.kitchen
|
|
||||||
- media_player.bathroom
|
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
entity_id: media_player.master_bedroom
|
entity_id: media_player.master_bedroom
|
||||||
data:
|
data:
|
||||||
volume_level: 0.15
|
volume_level: 0.15
|
||||||
|
|
||||||
# Turn off everything else
|
|
||||||
- service: media_player.media_stop
|
|
||||||
entity_id:
|
|
||||||
- media_player.living_room
|
|
||||||
- media_player.kitchen
|
|
||||||
- media_player.bathroom
|
|
||||||
- service: homeassistant.turn_off
|
|
||||||
entity_id:
|
|
||||||
- media_player.nvidia_shield
|
|
||||||
- media_player.living_room_tv
|
|
||||||
- light.master_bedroom_main
|
|
||||||
- light.living_room_ceiling
|
|
||||||
- light.kitchen_main
|
|
||||||
- light.kitchen_secondary
|
|
||||||
- light.hallway_main
|
|
||||||
- light.hallway_entrance
|
|
||||||
- switch.titanium
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id:
|
|
||||||
- light.browser_kitchen
|
|
||||||
- light.browser_hallway
|
|
||||||
data:
|
|
||||||
brightness_pct: 1
|
|
||||||
|
|||||||
@@ -22,9 +22,9 @@ script:
|
|||||||
- light.browser_hallway
|
- light.browser_hallway
|
||||||
- light.living_room_ambient
|
- light.living_room_ambient
|
||||||
- light.bedside
|
- light.bedside
|
||||||
|
- light.bed_led
|
||||||
data:
|
data:
|
||||||
brightness_pct: 100
|
brightness_pct: 100
|
||||||
- service: script.bed_led_on
|
|
||||||
|
|
||||||
# Cameras
|
# Cameras
|
||||||
- service: switch.turn_on
|
- service: switch.turn_on
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ script:
|
|||||||
message: "Entering night mode. Good night!"
|
message: "Entering night mode. Good night!"
|
||||||
|
|
||||||
# Prepare Bed LED brightness to be turned on during night time
|
# Prepare Bed LED brightness to be turned on during night time
|
||||||
- service: script.bed_led_on
|
- service: light.turn_on
|
||||||
|
entity_id: light.bed_led
|
||||||
data:
|
data:
|
||||||
brightness_pct: 40
|
brightness_pct: 40
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ script:
|
|||||||
- light.kitchen_secondary
|
- light.kitchen_secondary
|
||||||
- light.hallway_main
|
- light.hallway_main
|
||||||
- light.hallway_entrance
|
- light.hallway_entrance
|
||||||
|
- light.light_lohas_6
|
||||||
- media_player.nvidia_shield
|
- media_player.nvidia_shield
|
||||||
- media_player.living_room_tv
|
- media_player.living_room_tv
|
||||||
- switch.titanium
|
- switch.titanium
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ script:
|
|||||||
|
|
||||||
- service: media_player.media_stop
|
- service: media_player.media_stop
|
||||||
entity_id: group.all_sonos
|
entity_id: group.all_sonos
|
||||||
|
- service: script.dashboards_light_down
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
entity_id: input_select.hallway_dashboard_mode
|
entity_id: input_select.hallway_dashboard_mode
|
||||||
data:
|
data:
|
||||||
|
|||||||
@@ -2,19 +2,6 @@ script:
|
|||||||
routine_waking_up:
|
routine_waking_up:
|
||||||
alias: Routine · Waking up
|
alias: Routine · Waking up
|
||||||
sequence:
|
sequence:
|
||||||
- service: fan.turn_off
|
|
||||||
entity_id: fan.philips_airpurifier
|
|
||||||
|
|
||||||
- service: media_player.media_stop
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
|
|
||||||
- delay: 00:00:01
|
|
||||||
|
|
||||||
- service: script.routine_morning_briefing
|
|
||||||
- wait_template: "{{ is_state('input_boolean.sarah_talking', 'off') }}"
|
|
||||||
timeout: 00:02:00
|
|
||||||
- delay: 00:00:01
|
|
||||||
|
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
entity_id: light.hallway
|
entity_id: light.hallway
|
||||||
data:
|
data:
|
||||||
@@ -23,21 +10,43 @@ script:
|
|||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
entity_id:
|
entity_id:
|
||||||
- light.living_room_ambient
|
- light.living_room_ambient
|
||||||
- light.bed_led
|
|
||||||
- light.bedside
|
|
||||||
|
|
||||||
- service: script.open_living_room_cover
|
- service: script.open_living_room_cover
|
||||||
- service: script.shield_screensaver
|
- service: script.shield_screensaver
|
||||||
|
|
||||||
- condition: state
|
# Only when no guests are present
|
||||||
entity_id: input_boolean.guest_mode
|
- condition: and
|
||||||
state: "off"
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.guest_mode
|
||||||
|
state: "off"
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.guest_bedroom
|
||||||
|
state: "off"
|
||||||
- service: script.say
|
- service: script.say
|
||||||
data:
|
data:
|
||||||
message: "Here's some music to start the day!"
|
message: "Here's some music to start the day!"
|
||||||
- delay: 00:00:02
|
- delay: 00:00:02
|
||||||
- service: script.music_play
|
- service: script.music_play
|
||||||
|
|
||||||
|
|
||||||
|
routine_bedroom_morning:
|
||||||
|
alias: Routine · Bedroom · Morning
|
||||||
|
sequence:
|
||||||
|
- service: fan.turn_off
|
||||||
|
entity_id: fan.philips_airpurifier
|
||||||
|
- service: media_player.media_stop
|
||||||
|
entity_id: media_player.master_bedroom
|
||||||
|
- delay: 00:00:01
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id:
|
||||||
|
- light.bed_led
|
||||||
|
- light.bedside
|
||||||
|
- service: script.routine_morning_briefing
|
||||||
|
- wait_template: "{{ is_state('input_boolean.sarah_talking', 'off') }}"
|
||||||
|
timeout: 00:02:00
|
||||||
|
- delay: 00:00:01
|
||||||
|
|
||||||
routine_morning_briefing:
|
routine_morning_briefing:
|
||||||
alias: Routine · Morning Briefing
|
alias: Routine · Morning Briefing
|
||||||
sequence:
|
sequence:
|
||||||
|
|||||||
Reference in New Issue
Block a user