mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
blue_room to boys_room
This commit is contained in:
@@ -1,26 +1,25 @@
|
||||
alias: Kristy Asleep
|
||||
id: automation_kristy_asleep
|
||||
|
||||
initial_state: 'on'
|
||||
initial_state: "on"
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
to: 'on'
|
||||
to: "on"
|
||||
for:
|
||||
minutes: 15
|
||||
condition:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
- condition: time
|
||||
after: '20:30:00'
|
||||
before: '04:00:00'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: "on"
|
||||
- condition: time
|
||||
after: "20:30:00"
|
||||
before: "04:00:00"
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
- action: input_boolean.turn_off
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
to: "off"
|
||||
for: "00:05:00"
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
- action: input_boolean.turn_on
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
|
||||
- service: script.turn_on
|
||||
- action: script.turn_on
|
||||
entity_id: script.kristy_travel_sensor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
alias: 'Kristy Away'
|
||||
alias: "Kristy Away"
|
||||
id: automation_kristy_away
|
||||
mode: restart
|
||||
|
||||
@@ -6,32 +6,30 @@ trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- device_tracker.kristy_s_phone
|
||||
from: 'home'
|
||||
from: "home"
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
|
||||
- condition: state
|
||||
entity_id: device_tracker.kristy_s_phone
|
||||
state: 'not_home'
|
||||
state: "not_home"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: device_tracker.kristy_s_phone
|
||||
state: 'not_home'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.kristy_home
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: device_tracker.kristy_s_phone
|
||||
state: "not_home"
|
||||
sequence:
|
||||
- action: input_boolean.turn_off
|
||||
entity_id: input_boolean.kristy_home
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.allow_announcements
|
||||
- action: input_boolean.turn_on
|
||||
entity_id: input_boolean.allow_announcements
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.out_of_bed_alert
|
||||
|
||||
- delay: '00:00:30'
|
||||
- action: input_boolean.turn_on
|
||||
entity_id: input_boolean.out_of_bed_alert
|
||||
|
||||
- delay: "00:00:30"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
alias: 'Kristy Home'
|
||||
alias: "Kristy Home"
|
||||
id: automation_kristy_home
|
||||
mode: restart
|
||||
|
||||
@@ -10,32 +10,32 @@ trigger:
|
||||
entity_id:
|
||||
- group.person_kristy
|
||||
- device_tracker.nmap_tracker_d6_28_7a_58_b8_da
|
||||
to: 'home'
|
||||
to: "home"
|
||||
|
||||
- platform: event
|
||||
event_type: automation_reloaded
|
||||
|
||||
condition:
|
||||
- alias: 'They were previously considered away'
|
||||
- alias: "They were previously considered away"
|
||||
condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'off'
|
||||
state: "off"
|
||||
|
||||
- alias: 'At least one tracker is home'
|
||||
- alias: "At least one tracker is home"
|
||||
condition: numeric_state
|
||||
entity_id: group.person_kristy
|
||||
above: 0
|
||||
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_kristy', 'entity_id'))|list)|groupby('state'))['home']|count }}"
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
- action: input_boolean.turn_off
|
||||
entity_id: input_boolean.kristy_travelling
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
- action: input_boolean.turn_on
|
||||
entity_id: input_boolean.kristy_home
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
- action: input_boolean.turn_off
|
||||
entity_id: input_boolean.allow_announcements
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
- action: input_boolean.turn_off
|
||||
entity_id: input_boolean.out_of_bed_alert
|
||||
|
||||
@@ -5,35 +5,34 @@ trigger:
|
||||
# Bed in master bedroom is occupied
|
||||
- platform: state
|
||||
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_left
|
||||
to: 'on'
|
||||
to: "on"
|
||||
# Radio playing
|
||||
- platform: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
to: 'playing'
|
||||
to: "playing"
|
||||
- platform: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
to: 'idle'
|
||||
to: "idle"
|
||||
# Light on
|
||||
- platform: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
to: 'on'
|
||||
to: "on"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
state: "on"
|
||||
- alias: "Its between 8:30PM and 5AM"
|
||||
condition: time
|
||||
after: '20:30:00'
|
||||
before: '05:00:00'
|
||||
after: "20:30:00"
|
||||
before: "05:00:00"
|
||||
|
||||
- alias: "The bed is occupied"
|
||||
condition: state
|
||||
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_left
|
||||
state: 'on'
|
||||
state: "on"
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
- action: input_boolean.turn_on
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
alias: 'Kristy Location Update'
|
||||
alias: "Kristy Location Update"
|
||||
id: automation_kristy_location_update
|
||||
mode: restart
|
||||
|
||||
@@ -11,8 +11,8 @@ trigger:
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
|
||||
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
|
||||
|
||||
action:
|
||||
- service: script.turn_on
|
||||
- action: script.turn_on
|
||||
entity_id: script.kristy_travel_sensor
|
||||
|
||||
@@ -9,41 +9,41 @@ trigger:
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '23:30:00'
|
||||
before: '00:00:00'
|
||||
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_in_bed
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: "23:30:00"
|
||||
before: "00:00:00"
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_is_awake
|
||||
sequence:
|
||||
- action: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_in_bed
|
||||
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '00:00:00'
|
||||
before: '06:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_in_bed
|
||||
- action: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_is_awake
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.kristy_is_awake
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: "00:00:00"
|
||||
before: "06:00:00"
|
||||
sequence:
|
||||
- action: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_in_bed
|
||||
|
||||
- action: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.kristy_is_awake
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
- action: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.kristy_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
- action: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_is_awake
|
||||
- input_boolean.kristy_is_awake
|
||||
|
||||
Reference in New Issue
Block a user