mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
initial push
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
alias: 'Ebin Away'
|
||||
id: automation_ebin_away
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.ebin_home
|
||||
to: "off"
|
||||
- platform: time_pattern
|
||||
minutes: "/5"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.ebin_home
|
||||
@@ -0,0 +1,25 @@
|
||||
alias: 'Ebin Home'
|
||||
id: automation_ebin_home
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.ebin_home
|
||||
to: "on"
|
||||
- platform: time_pattern
|
||||
minutes: "/5"
|
||||
condition:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.have_custody
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: person.kristy
|
||||
state: 'home'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.ebin_travelling
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.ebin_home
|
||||
@@ -0,0 +1,41 @@
|
||||
alias: Ebin In Bed
|
||||
id: automation_ebin_in_bed
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:05:00'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:05:00'
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id:
|
||||
- input_boolean.ebin_home
|
||||
- input_boolean.kids_bedtime
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
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
|
||||
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
@@ -0,0 +1,17 @@
|
||||
alias: 'Ebin Location Update'
|
||||
id: automation_ebin_location_update
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
# I've moved
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_select.ebin_status_dropdown
|
||||
- input_boolean.ebin_home
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
|
||||
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.ebin_travel_sensor
|
||||
@@ -0,0 +1,46 @@
|
||||
alias: Ebin Status at Startup
|
||||
id: automation_ebin_status_at_startup
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_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.ebin_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.ebin_is_awake
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '21:00:00'
|
||||
before: '06:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.ebin_in_bed
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.ebin_is_awake
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.ebin_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.ebin_is_awake
|
||||
Reference in New Issue
Block a user