mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
Refactor bed occupancy sensors and related automations
- Updated nursery automation to use input booleans for bed occupancy instead of binary sensors. - Changed conditions in nursery automation to improve readability and consistency. - Modified binary sensor configurations for master bedroom and nursery to use input booleans. - Removed unused input number configurations related to master bed load cells. - Updated UI configurations to reflect changes in entity types from binary sensors to input booleans. - Cleaned up camera view configurations and adjusted styles for better layout. - Removed deprecated master bed YAML configuration and archived it for future reference. - Enhanced ESPHome configurations for white and black beds, including improved logging and diagnostics.
This commit is contained in:
@@ -5,12 +5,12 @@ mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:10:00'
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
to: "on"
|
||||
for: "00:10:00"
|
||||
- platform: state
|
||||
entity_id: input_boolean.kids_bedtime
|
||||
to: 'on'
|
||||
to: "on"
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
@@ -19,17 +19,17 @@ condition:
|
||||
entity_id:
|
||||
- input_boolean.bridget_home
|
||||
- input_boolean.kids_bedtime
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id:
|
||||
- binary_sensor.white_bed_occupied
|
||||
state: 'on'
|
||||
for: '00:10:00'
|
||||
- input_boolean.white_bed_occupied
|
||||
state: "on"
|
||||
for: "00:10:00"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: 'off'
|
||||
state: "off"
|
||||
#- condition: state
|
||||
# entity_id: binary_sensor.white_bed_occupied
|
||||
# entity_id: input_boolean.white_bed_occupied
|
||||
# state: 'on'
|
||||
# for:
|
||||
# minutes: 5
|
||||
|
||||
@@ -5,7 +5,7 @@ id: automation_clint_in_bed
|
||||
trigger:
|
||||
# Bed in master bedroom is occupied
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: 'on'
|
||||
# Radio playing
|
||||
- platform: state
|
||||
@@ -63,7 +63,7 @@ condition:
|
||||
|
||||
- alias: "The bed is occupied"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
|
||||
@@ -10,7 +10,7 @@ trigger:
|
||||
entity_id: media_player.great_room
|
||||
to: 'idle'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
- platform: state
|
||||
@@ -36,7 +36,7 @@ condition:
|
||||
after: '04:00:00'
|
||||
before: '22:00:00'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'off'
|
||||
for: '00:01:00'
|
||||
action:
|
||||
|
||||
@@ -8,7 +8,7 @@ trigger:
|
||||
entity_id: binary_sensor.morning
|
||||
to: 'on'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
@@ -16,7 +16,7 @@ condition:
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.morning
|
||||
|
||||
@@ -4,13 +4,13 @@ mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:05:00'
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
to: "on"
|
||||
for: "00:05:00"
|
||||
- platform: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:05:00'
|
||||
to: "on"
|
||||
for: "00:05:00"
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
@@ -19,22 +19,22 @@ condition:
|
||||
entity_id:
|
||||
- input_boolean.ebin_home
|
||||
- input_boolean.kids_bedtime
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "on"
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "on"
|
||||
for:
|
||||
minutes: 5
|
||||
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
|
||||
@@ -4,7 +4,7 @@ id: automation_kristy_in_bed
|
||||
trigger:
|
||||
# Bed in master bedroom is occupied
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: 'on'
|
||||
# Radio playing
|
||||
- platform: state
|
||||
@@ -31,7 +31,7 @@ condition:
|
||||
|
||||
- alias: "The bed is occupied"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
|
||||
@@ -11,7 +11,7 @@ trigger:
|
||||
- input_boolean.clint_is_awake
|
||||
- input_boolean.kristy_in_bed
|
||||
- input_boolean.kristy_is_awake
|
||||
- binary_sensor.master_bed_right_occupied
|
||||
- input_boolean.master_bed_occupied
|
||||
|
||||
- platform: time
|
||||
id: wake_clint
|
||||
@@ -38,7 +38,7 @@ condition:
|
||||
- condition: trigger
|
||||
id: wake_clint
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'off'
|
||||
for: '00:10:00'
|
||||
- condition: and
|
||||
|
||||
@@ -163,13 +163,13 @@ action:
|
||||
- choose:
|
||||
- conditions: "{{is_state('input_boolean.emmett_home','on') or is_state('input_boolean.bridget_home','on')}}"
|
||||
sequence:
|
||||
- service: media_player.turn_off
|
||||
target:
|
||||
entity_id: media_player.ytube_music_player
|
||||
|
||||
- delay: "00:00:05"
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_boolean.nursery_asleep
|
||||
|
||||
- delay: "00:00:05"
|
||||
|
||||
- service: media_player.turn_off
|
||||
target:
|
||||
entity_id: media_player.ytube_music_player
|
||||
|
||||
@@ -1,167 +0,0 @@
|
||||
alias: 'Goodnight Kids TTS'
|
||||
id: automation_goodnight_kids_tts
|
||||
initial_state: off
|
||||
trigger:
|
||||
platform: time
|
||||
at: input_datetime.kids_bedtime_announcement_time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.announce_bedtime
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.kids_bedtime
|
||||
|
||||
- service: media_player.volume_set
|
||||
data_template:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
- media_player.bathroom_mini
|
||||
- media_player.front_room_hub
|
||||
- media_player.kitchen
|
||||
- media_player.nursery_hub
|
||||
- media_player.master_bedroom_clock
|
||||
volume_level: 0.7
|
||||
|
||||
- delay: '00:00:01'
|
||||
|
||||
- service: tts.google_translate_say
|
||||
entity_id: media_player.all_speakers
|
||||
data_template:
|
||||
message: >
|
||||
It is time for bed.
|
||||
{% if is_state('input_boolean.emmett_home', 'on') %}
|
||||
Good night Emmett
|
||||
{% if is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
Good night Bridget and good night Ebin
|
||||
{% else %}
|
||||
and good night Bridget
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.ebin_home','on') %}
|
||||
and good night Ebin
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
Good night Bridget and good night Ebin
|
||||
{% else %}
|
||||
Good Night Bridget
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.ebin_home', 'on') %}
|
||||
Good night Ebin
|
||||
{% endif %}
|
||||
- delay: '00:00:10'
|
||||
|
||||
- service: homeassistant.turn_off
|
||||
entity_id:
|
||||
- media_player.all_speakers
|
||||
- media_player.front_room_tv
|
||||
- media_player.downstairs_roku
|
||||
#- switch.shelly_projector
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: Dimmed
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id:
|
||||
- light.black_bed_wled
|
||||
- light.white_bed_wled
|
||||
brightness_pct: 50
|
||||
effect: random
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: 'Nightlight'
|
||||
|
||||
- delay: "00:15:00"
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: 'Off'
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
|
||||
#- service: input_select.select_option
|
||||
# data:
|
||||
# entity_id: input_select.google_home
|
||||
# option: 'Nursery'
|
||||
#- service: input_select.select_option
|
||||
# data:
|
||||
# entity_id: input_select.ambient_sound
|
||||
# option: 'Random Kids Noise'
|
||||
#- service: input_number.set_value
|
||||
# data:
|
||||
# entity_id: input_number.volume_ambientsounds
|
||||
# value: '0.40'
|
||||
#- service: script.ambientsounds
|
||||
- delay: "00:30:00"
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
- service: light.turn_off
|
||||
data:
|
||||
entity_id:
|
||||
- light.black_bed_wled
|
||||
- light.white_bed_wled
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: 'Off'
|
||||
+169
-171
@@ -11,97 +11,96 @@ trigger:
|
||||
- input_boolean.ebin_is_awake
|
||||
- input_boolean.kids_away
|
||||
- binary_sensor.morning
|
||||
to: 'on'
|
||||
|
||||
to: "on"
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.black_bed_occupied
|
||||
- binary_sensor.white_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
- input_boolean.white_bed_occupied
|
||||
to: "off"
|
||||
for: "00:05:00"
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- alias: "Kids should only be considered awake if they get out of bed after 6:00 AM and before 7:00 PM"
|
||||
condition: time
|
||||
before: '19:00:00'
|
||||
after: '06:00:00'
|
||||
before: "19:00:00"
|
||||
after: "06:00:00"
|
||||
- alias: "Go through all the kids that are considered home and see if their bed is occupied"
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "off"
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "unavailable"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "off"
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "unavailable"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'unavailable'
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "off"
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "unavailable"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "unavailable"
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
@@ -109,108 +108,107 @@ action:
|
||||
- input_boolean.kids_asleep
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'unavailable'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "unavailable"
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'unavailable'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "unavailable"
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'unavailable'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "unavailable"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "unavailable"
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.nursery_mode
|
||||
state: 'Manual'
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Away'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: Auto
|
||||
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: "unavailable"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
state: "unavailable"
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.nursery_mode
|
||||
state: "Manual"
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: "Away"
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: Auto
|
||||
|
||||
@@ -4,66 +4,66 @@ id: automation_baby_monitor_on_hub
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:00:03'
|
||||
to: "off"
|
||||
for: "00:00:03"
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:00:03'
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
to: "off"
|
||||
for: "00:00:03"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.kids_at_home
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: group.kids_in_bed
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.front_room_person_occupancy
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_hub
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_hub
|
||||
state: 'idle'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_hub
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_hub
|
||||
state: "idle"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: timer.nursery_camera_on_hub
|
||||
state: 'idle'
|
||||
sequence:
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
volume_level: 0.1
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: timer.nursery_camera_on_hub
|
||||
state: "idle"
|
||||
sequence:
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
volume_level: 0.1
|
||||
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.front_room_hub
|
||||
data:
|
||||
media_content_id: camera-casting-yml/nursery-camera
|
||||
media_content_type: lovelace
|
||||
metadata:
|
||||
title: Nursery Camera
|
||||
thumbnail: https://brands.home-assistant.io/_/lovelace/logo.png
|
||||
media_class: app
|
||||
children_media_class: null
|
||||
navigateIds:
|
||||
- {}
|
||||
- media_content_type: lovelace
|
||||
media_content_id: ''
|
||||
- media_content_type: lovelace
|
||||
media_content_id: camera-casting-yml
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.front_room_hub
|
||||
data:
|
||||
media_content_id: camera-casting-yml/nursery-camera
|
||||
media_content_type: lovelace
|
||||
metadata:
|
||||
title: Nursery Camera
|
||||
thumbnail: https://brands.home-assistant.io/_/lovelace/logo.png
|
||||
media_class: app
|
||||
children_media_class: null
|
||||
navigateIds:
|
||||
- {}
|
||||
- media_content_type: lovelace
|
||||
media_content_id: ""
|
||||
- media_content_type: lovelace
|
||||
media_content_id: camera-casting-yml
|
||||
|
||||
- service: timer.start
|
||||
data:
|
||||
entity_id: timer.nursery_camera_on_hub
|
||||
- service: timer.start
|
||||
data:
|
||||
entity_id: timer.nursery_camera_on_hub
|
||||
|
||||
@@ -4,69 +4,69 @@ id: automation_baby_monitor_on_tv
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:00:03'
|
||||
to: "off"
|
||||
for: "00:00:03"
|
||||
- platform: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:00:03'
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
to: "off"
|
||||
for: "00:00:03"
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.front_room_occupied
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
state: 'standby'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
state: "standby"
|
||||
- condition: state
|
||||
entity_id: input_boolean.computer_area_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
state: 'off'
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bedroom_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
state: "on"
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: "on"
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: "on"
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
@@ -78,17 +78,17 @@ condition:
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
attribute: source
|
||||
state: 'IP Camera Viewer - Pro'
|
||||
state: "IP Camera Viewer - Pro"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: timer.nursery_camera_on_hub
|
||||
state: 'idle'
|
||||
sequence:
|
||||
- service: rest_command.nursery_on_roku_1
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: timer.nursery_camera_on_hub
|
||||
state: "idle"
|
||||
sequence:
|
||||
- service: rest_command.nursery_on_roku_1
|
||||
|
||||
- service: timer.start
|
||||
data:
|
||||
entity_id: timer.nursery_camera_on_tv
|
||||
- service: timer.start
|
||||
data:
|
||||
entity_id: timer.nursery_camera_on_tv
|
||||
|
||||
@@ -13,7 +13,7 @@ trigger:
|
||||
for: '00:00:30'
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:00:05'
|
||||
|
||||
@@ -40,7 +40,7 @@ condition:
|
||||
entity_id: sensor.pixel_7_charger_type
|
||||
state: 'wireless'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'on'
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ id: automation_master_bedroom_awake
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:10:00'
|
||||
|
||||
@@ -25,7 +25,7 @@ condition:
|
||||
|
||||
- alias: "No one on master bed"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'off'
|
||||
|
||||
- alias: "The boolean is currently on"
|
||||
|
||||
@@ -24,7 +24,7 @@ condition:
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id:
|
||||
- binary_sensor.master_bed_right_occupied
|
||||
- input_boolean.master_bed_occupied
|
||||
state:
|
||||
- 'off'
|
||||
- 'unavailable'
|
||||
|
||||
@@ -4,7 +4,7 @@ id: automation_master_bedroom_status
|
||||
trigger:
|
||||
- id: master_bed_not_occupied
|
||||
platform: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:10:00'
|
||||
|
||||
@@ -21,7 +21,7 @@ trigger:
|
||||
|
||||
- id: master_bed_right_occupied
|
||||
platform: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:00:05'
|
||||
|
||||
@@ -54,7 +54,7 @@ condition:
|
||||
|
||||
- alias: "No one on master bed"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'off'
|
||||
|
||||
- alias: "Is the room asleep?"
|
||||
@@ -82,7 +82,7 @@ condition:
|
||||
|
||||
- alias: "Someone on master bed"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
@@ -110,7 +110,7 @@ action:
|
||||
|
||||
- alias: "No one on master bed"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
@@ -139,7 +139,7 @@ action:
|
||||
|
||||
- alias: "Someone on master bed"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_right_occupied
|
||||
entity_id: input_boolean.master_bed_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- choose:
|
||||
|
||||
@@ -13,7 +13,7 @@ action:
|
||||
# option: 'Off'
|
||||
- action: media_player.volume_set
|
||||
data:
|
||||
volume_level: 0.3
|
||||
volume_level: 0.25
|
||||
target:
|
||||
device_id: d534ab473e271021b537397cbc6fe700
|
||||
|
||||
@@ -29,7 +29,7 @@ action:
|
||||
- action: media_player.repeat_set
|
||||
metadata: {}
|
||||
data:
|
||||
repeat: all
|
||||
repeat: "off"
|
||||
target:
|
||||
device_id: d534ab473e271021b537397cbc6fe700
|
||||
- action: music_assistant.play_media
|
||||
@@ -40,4 +40,11 @@ action:
|
||||
enqueue: replace
|
||||
target:
|
||||
device_id: d534ab473e271021b537397cbc6fe700
|
||||
- action: music_assistant.play_media
|
||||
target:
|
||||
device_id: d534ab473e271021b537397cbc6fe700
|
||||
data:
|
||||
media_id: library://track/101
|
||||
media_type: track
|
||||
enqueue: add
|
||||
|
||||
|
||||
@@ -4,42 +4,42 @@ id: automation_nursery_into_bed
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:00:30'
|
||||
to: "on"
|
||||
for: "00:00:30"
|
||||
- platform: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:00:30'
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
to: "on"
|
||||
for: "00:00:30"
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_select.nursery_mode
|
||||
state: 'Nightlight'
|
||||
state: "Nightlight"
|
||||
- condition: state
|
||||
entity_id: light.nursery_hue
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
|
||||
@@ -1,73 +1,72 @@
|
||||
alias: 'Nursery Not Occupied'
|
||||
alias: "Nursery Not Occupied"
|
||||
id: automation_nursery_not_occupied
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
from: "on"
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.home_occupied
|
||||
- binary_sensor.nursery_occupied
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
to: "off"
|
||||
for: "00:05:00"
|
||||
|
||||
# - platform: time_pattern
|
||||
# minutes: "/5"
|
||||
|
||||
condition:
|
||||
|
||||
- condition: state
|
||||
entity_id: input_boolean.lights_off_manually
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id:
|
||||
- binary_sensor.white_bed_occupied
|
||||
- input_boolean.white_bed_occupied
|
||||
- binary_sensor.black_bed_occupied
|
||||
state:
|
||||
- 'off'
|
||||
- 'unavailable'
|
||||
- "off"
|
||||
- "unavailable"
|
||||
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.nursery_person_occupancy
|
||||
state: 'off'
|
||||
state: "off"
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: binary_sensor.nursery_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
for:
|
||||
minutes: 5
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Manual'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "off"
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: "Manual"
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
|
||||
@@ -10,78 +10,78 @@ trigger:
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for: '00:00:05'
|
||||
from: "on"
|
||||
to: "off"
|
||||
for: "00:00:05"
|
||||
- platform: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for: '00:00:05'
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
from: "on"
|
||||
to: "off"
|
||||
for: "00:00:05"
|
||||
- platform: state
|
||||
entity_id: binary_sensor.nursery_door
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
condition:
|
||||
- alias: "Do we want to be alerted?"
|
||||
condition: state
|
||||
entity_id: input_boolean.out_of_bed_alert
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
- alias: "Is the home occupied or in guest mode?"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: "on"
|
||||
|
||||
- alias: "Are any of the kids considered home?"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "on"
|
||||
|
||||
- alias: "Is at a time of day when the kids should be sleeping?"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.evening
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.late_evening
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.night
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.early_morning
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.evening
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.late_evening
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.night
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.early_morning
|
||||
state: "on"
|
||||
|
||||
- alias: "Is Nursery Light Cycle turned off?"
|
||||
condition: state
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
state: 'off'
|
||||
state: "off"
|
||||
|
||||
- alias: "Are the kids asleep?"
|
||||
condition: state
|
||||
entity_id: input_boolean.kids_asleep
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
- alias: "Is an adult awake?"
|
||||
condition: state
|
||||
entity_id: binary_sensor.adults_asleep
|
||||
state: 'off'
|
||||
state: "off"
|
||||
|
||||
variables:
|
||||
computer_area: "{{ states('binary_sensor.computer_area_person_occupancy') }}"
|
||||
@@ -90,42 +90,42 @@ variables:
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: script.blink_garage_lights
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_occupied
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: script.blink_garage_lights
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.computer_area_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
url: rtsp_cam08_sub
|
||||
force: true
|
||||
extra:
|
||||
mode: webrtc
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.computer_area_occupied
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
url: rtsp_cam08_sub
|
||||
force: true
|
||||
extra:
|
||||
mode: webrtc
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.front_room_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
url: rtsp_cam08_sub
|
||||
force: true
|
||||
extra:
|
||||
mode: webrtc
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.front_room_occupied
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
url: rtsp_cam08_sub
|
||||
force: true
|
||||
extra:
|
||||
mode: webrtc
|
||||
|
||||
- delay: '00:10:00'
|
||||
- delay: "00:10:00"
|
||||
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.front_room_hub, media_player.computer_area_hub
|
||||
|
||||
Reference in New Issue
Block a user