initial push

This commit is contained in:
CeeWeasel
2024-04-14 14:08:56 -04:00
commit 53bf393d14
1111 changed files with 71730 additions and 0 deletions
@@ -0,0 +1,17 @@
alias: 'Marshall Away'
id: automation_marshall_away
mode: restart
trigger:
- platform: state
entity_id: device_tracker.nmap_tracker_fe_cf_82_b2_22_e0
to: 'not_home'
condition:
- condition: state
entity_id: input_boolean.marshall_home
state: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.marshall_home
@@ -0,0 +1,34 @@
alias: 'Marshall Home'
id: automation_marshall_home
mode: restart
trigger:
- platform: homeassistant
event: start
- platform: state
entity_id:
- group.person_marshall
- device_tracker.nmap_tracker_fe_cf_82_b2_22_e0
to: 'home'
- platform: event
event_type: automation_reloaded
condition:
- alias: 'They were previously considered away'
condition: state
entity_id: input_boolean.marshall_home
state: 'off'
- alias: 'At least one tracker is home'
condition: numeric_state
entity_id: group.person_marshall
above: 0
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_marshall', 'entity_id'))|list)|groupby('state'))['home']|count }}"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.marshall_travelling
- service: input_boolean.turn_on
entity_id: input_boolean.marshall_home
@@ -0,0 +1,20 @@
alias: 'Marshall Location Update'
id: automation_marshall_location_update
mode: restart
trigger:
# I've moved
- platform: state
entity_id:
- input_select.marshall_status_dropdown
- input_boolean.marshall_home
condition:
- condition: template
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
- condition: state
entity_id: script.marshall_travel_sensor
state: 'off'
action:
- service: script.turn_on
entity_id: script.marshall_travel_sensor
@@ -0,0 +1,46 @@
alias: Marshall Status at Startup
id: automation_marshall_status_at_startup
mode: restart
trigger:
- platform: homeassistant
event: start
condition:
- condition: state
entity_id: input_boolean.marshall_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.marshall_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.marshall_is_awake
- conditions:
- condition: time
after: '23:00:00'
before: '06:00:00'
sequence:
- service: input_boolean.turn_on
entity_id:
- input_boolean.marshall_in_bed
- service: input_boolean.turn_off
entity_id:
- input_boolean.marshall_is_awake
default:
- service: input_boolean.turn_off
entity_id:
- input_boolean.marshall_in_bed
- service: input_boolean.turn_on
entity_id:
- input_boolean.marshall_is_awake