alias: Returned Home id: automation_returned_home mode: queued trigger: - platform: state entity_id: binary_sensor.front_door_contact to: "on" - platform: state entity_id: binary_sensor.garage_door to: "on" # - platform: state # entity_id: binary_sensor.outer_garage_door # to: 'on' - platform: state entity_id: binary_sensor.outer_garage_door_contact to: "on" # People just got home - platform: state entity_id: - input_select.clint_status_dropdown - input_select.emmett_status_dropdown - input_select.bridget_status_dropdown - input_select.kristy_status_dropdown - input_select.marshall_status_dropdown - input_select.tess_status_dropdown - input_select.ebin_status_dropdown - input_select.guest_status_dropdown to: "Just Arrived" # Should also include some travel time magic here # Basically, travel time < 15 for 10 minutes, travelling towards home condition: condition: and conditions: # Lighting automations are enabled - condition: state entity_id: input_boolean.lighting_automations state: "on" # It's getting dark - condition: numeric_state entity_id: sensor.bar_hue_motion_sensor_illuminance below: 15 # Somebody is nearly home, or just arrived - condition: or conditions: # Front door is open, somebody is nearly home or just arrived - condition: state entity_id: binary_sensor.front_door_contact state: "on" - condition: state entity_id: binary_sensor.garage_door state: "on" # - condition: state # entity_id: binary_sensor.outer_garage_door # state: 'on' - condition: state entity_id: binary_sensor.outer_garage_door_contact state: "on" # Or somebody has just arrived - condition: template value_template: "{{ is_state('input_select.clint_status_dropdown','Just Arrived') }}" - condition: template value_template: "{{ is_state('input_select.emmett_status_dropdown','Just Arrived') }}" - condition: template value_template: "{{ is_state('input_select.bridget_status_dropdown','Just Arrived') }}" - condition: template value_template: "{{ is_state('input_select.kristy_status_dropdown','Just Arrived') }}" - condition: template value_template: "{{ is_state('input_select.marshall_status_dropdown','Just Arrived') }}" - condition: template value_template: "{{ is_state('input_select.tess_status_dropdown','Just Arrived') }}" - condition: template value_template: "{{ is_state('input_select.ebin_status_dropdown','Just Arrived') }}" - condition: template value_template: "{{ is_state('input_select.guest_status_dropdown','Just Arrived') }}" action: - action: logbook.log data_template: name: Returned Home entity_id: automation.returned_home message: > Returned Home ran