mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
alias: Bridget Asleep
|
||||
id: automation_bridget_asleep
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
id: in_bed
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
to: 'on'
|
||||
for: '00:20:00'
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id:
|
||||
- input_boolean.bridget_home
|
||||
- input_boolean.kids_bedtime
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
state: 'on'
|
||||
- condition: trigger
|
||||
id: "in_bed"
|
||||
|
||||
action:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
@@ -0,0 +1,21 @@
|
||||
alias: "Bridget Away"
|
||||
id: automation_bridget_away
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.bridget_home
|
||||
to: "off"
|
||||
- platform: time_pattern
|
||||
minutes: "/5"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.bridget_home
|
||||
state: "off"
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.bridget_home
|
||||
@@ -0,0 +1,23 @@
|
||||
alias: "Bridget Home"
|
||||
id: automation_bridget_home
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.bridget_home
|
||||
to: "on"
|
||||
- platform: time_pattern
|
||||
minutes: "/5"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.bridget_home
|
||||
state: "on"
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.bridget_travelling
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.bridget_home
|
||||
@@ -0,0 +1,38 @@
|
||||
alias: Bridget In Bed
|
||||
id: automation_bridget_in_bed
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:10:00'
|
||||
- platform: state
|
||||
entity_id: input_boolean.kids_bedtime
|
||||
to: 'on'
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id:
|
||||
- input_boolean.bridget_home
|
||||
- input_boolean.kids_bedtime
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id:
|
||||
- binary_sensor.white_bed_occupied
|
||||
state: 'on'
|
||||
for: '00:10:00'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: 'off'
|
||||
#- condition: state
|
||||
# entity_id: binary_sensor.white_bed_occupied
|
||||
# state: 'on'
|
||||
# for:
|
||||
# minutes: 5
|
||||
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
@@ -0,0 +1,26 @@
|
||||
initial_state: "on"
|
||||
alias: "Bridget Location Update"
|
||||
id: automation_bridget_location_update
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
# Bridget moved
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_select.bridget_status_dropdown
|
||||
- input_boolean.bridget_home
|
||||
# Clint moved
|
||||
- input_select.clint_status_dropdown
|
||||
- input_boolean.clint_home
|
||||
# Custody changed
|
||||
- binary_sensor.have_custody
|
||||
# Sleeping status changed
|
||||
- input_boolean.bridget_is_awake
|
||||
- input_boolean.bridget_in_bed
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
|
||||
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.bridget_travel_sensor
|
||||
@@ -0,0 +1,47 @@
|
||||
alias: Bridget Status at Startup
|
||||
id: automation_bridget_status_at_startup
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '20:00:00'
|
||||
before: '21:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.bridget_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.bridget_is_awake
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '21:00:00'
|
||||
before: '06:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.bridget_in_bed
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.bridget_is_awake
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.bridget_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.bridget_is_awake
|
||||
|
||||
Reference in New Issue
Block a user