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,20 @@
|
||||
alias: 'Tess Away'
|
||||
id: automation_tess_away
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- person.kristy
|
||||
to: 'not_home'
|
||||
- platform: state
|
||||
entity_id:
|
||||
- person.tess
|
||||
to: 'not_home'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.tess_home
|
||||
@@ -0,0 +1,29 @@
|
||||
alias: 'Tess Home'
|
||||
id: automation_tess_home
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: event
|
||||
event_type: automation_reloaded
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- group.person_tess
|
||||
- device_tracker.apple_17_a6_78
|
||||
to: 'home'
|
||||
condition:
|
||||
- alias: 'They were previously considered away'
|
||||
condition: state
|
||||
entity_id: input_boolean.tess_home
|
||||
state: 'off'
|
||||
|
||||
- alias: 'At least one tracker is home'
|
||||
condition: numeric_state
|
||||
entity_id: group.person_tess
|
||||
above: 0
|
||||
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_tess', 'entity_id'))|list)|groupby('state'))['home']|count }}"
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.tess_travelling
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.tess_home
|
||||
@@ -0,0 +1,20 @@
|
||||
alias: 'Tess Location Update'
|
||||
id: automation_tess_location_update
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
# I've moved
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_select.tess_status_dropdown
|
||||
- input_boolean.tess_home
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
|
||||
- condition: state
|
||||
entity_id: script.tess_travel_sensor
|
||||
state: 'off'
|
||||
action:
|
||||
|
||||
- service: script.turn_on
|
||||
entity_id: script.tess_travel_sensor
|
||||
@@ -0,0 +1,46 @@
|
||||
alias: Tess Status at Startup
|
||||
id: automation_tess_status_at_startup
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_home
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '22:00:00'
|
||||
before: '23:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.tess_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.tess_is_awake
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '23:00:00'
|
||||
before: '06:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.tess_in_bed
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.tess_is_awake
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.tess_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.tess_is_awake
|
||||
Reference in New Issue
Block a user