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,104 @@
|
||||
alias: "Battery Alert"
|
||||
id: automation_battery_alert
|
||||
initial_state: off
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "10:00:00"
|
||||
- platform: time
|
||||
at: "18:00:00"
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.light if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.switch if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.zwave if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.lock if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
action:
|
||||
- service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
message: >-
|
||||
{% set threshold = 1 %}
|
||||
{%- for item in states.light if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{% for lobat in states.light if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Lights:{% endif %}
|
||||
{{ lobat.name }} {{ lobat.state }}%
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{% set threshold = 1 %}
|
||||
{%- for item in states.switch if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{% for lobat in states.switch if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Switches:{% endif %}
|
||||
{{ lobat.name }} {{ lobat.state }}%
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{% set threshold = 1 %}
|
||||
{%- for item in states.sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{% for lobat in states.sensor if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Sensors:{% endif %}
|
||||
{{ lobat.name }} {{ lobat.state }}%
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{% set threshold = 1 %}
|
||||
{%- for item in states.zwave if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{% for lobat in states.zwave if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Zwaves:{% endif %}
|
||||
{{ lobat.name }} {{ lobat.state }}%
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{% set threshold = 1 %}
|
||||
{%- for item in states.lock if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{% for lobat in states.lock if (lobat.attributes.battery_level is defined and lobat.attributes['battery_level'] | int / 5 < threshold) or ("battery" in lobat.name | lower and ((item.state | int < threshold and lobat.state|int != 0) or lobat.state | lower == "low" or lobat.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Locks:{% endif %}
|
||||
{{ lobat.name }} {{ lobat.state }}%
|
||||
{%- endfor -%}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
@@ -0,0 +1,69 @@
|
||||
alias: "Battery Alert Template"
|
||||
id: automation_battery_alert_template
|
||||
initial_state: off
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "10:00:00"
|
||||
- platform: time
|
||||
at: "18:00:00"
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.light if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.switch if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.zwave if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.lock if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
- condition: template
|
||||
value_template: >-
|
||||
{%- set threshold = 40 -%}
|
||||
{%- for item in states.binary_sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) -%}
|
||||
{%- if loop.first -%}
|
||||
{{ true }}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
action:
|
||||
- service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
message: >-
|
||||
{% set threshold = 40 %}
|
||||
|
||||
{% for item in states.binary_sensor if (item.attributes.battery_level is defined and item.attributes['battery_level'] | int / 5 < threshold) or ("battery" in item.name | lower and ((item.state | int < threshold and item.state|int != 0) or item.state | lower == "low" or item.state | lower == "unknown")) %}
|
||||
{%- if loop.first %}Binary Sensors:{% endif %}
|
||||
{{ item.name }} {{ item.attributes.battery_level / 5 }}%
|
||||
{%- endfor -%}
|
||||
@@ -0,0 +1,26 @@
|
||||
alias: "Alert that something is open and the HVAC equipment is on"
|
||||
id: automation_something_open_hvac_on
|
||||
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.something_open_hvac_on
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
action:
|
||||
- service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
message: >-
|
||||
The following are open: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_hvac_affecting_openings', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }}"
|
||||
data:
|
||||
channel: "Alerts"
|
||||
importance: high
|
||||
actions:
|
||||
- action: "ALARM" # The key you are sending for the event
|
||||
title: "Sound Alarm" # The button title
|
||||
- action: "URI" # Must be set to URI if you plan to use a URI
|
||||
title: "Open Url"
|
||||
uri: "https://google.com" # URL to open when action is selected, can also be a lovelace view/dashboard
|
||||
- action: "URI"
|
||||
title: "Adjust Thermostat"
|
||||
uri: "entityId:climate.thermostat"
|
||||
@@ -0,0 +1,53 @@
|
||||
alias: Camera06 Preset
|
||||
id: automation_camera06_preset
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_select.camera_06
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
- platform: time_pattern
|
||||
minutes: "/30"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_06
|
||||
state: 'Static'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_left_preset_1
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_06
|
||||
state: 'Door'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_left_preset_3
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_06
|
||||
state: 'Bed'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_left_preset_3
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_06
|
||||
state: 'Window'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_left_preset_2
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_06
|
||||
state: 'Floor'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_left_preset_4
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_06
|
||||
state: 'Privacy'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_left_preset_5
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
alias: Camera07 Preset
|
||||
id: automation_camera07_preset
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_select.camera_07
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
- platform: time_pattern
|
||||
minutes: "/30"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_07
|
||||
state: 'Static'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_right_preset_2
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_07
|
||||
state: 'Door'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_right_preset_1
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_07
|
||||
state: 'Bed'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_right_preset_3
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_07
|
||||
state: 'Window'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_right_preset_2
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_07
|
||||
state: 'Floor'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_right_preset_4
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.camera_07
|
||||
state: 'Privacy'
|
||||
sequence:
|
||||
- service: shell_command.master_bedroom_right_preset_5
|
||||
@@ -0,0 +1,303 @@
|
||||
alias: Cycle Cameras
|
||||
id: automation_cycle_cameras
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
|
||||
- id: automatic
|
||||
platform: homeassistant
|
||||
event: start
|
||||
|
||||
- id: automatic
|
||||
platform: time_pattern
|
||||
seconds: "/10"
|
||||
|
||||
- id: cam01
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam01_person_occupancy
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
- id: cam03
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam03_person_occupancy
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
- id: cam04
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam04_person_occupancy
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
- id: cam06
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam06_person_occupancy
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
- id: cam07
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam07_person_occupancy
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
- id: cam08
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam08_person_occupancy
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
- id: cam12
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam12_person_occupancy
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
- id: cam13
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam13_person_occupancy
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
- id: cam14
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam14_person_occupancy
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
- id: cam19
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam19_person_occupancy
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
|
||||
action:
|
||||
- service: input_select.select_next
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_camera
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: cam01
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_camera_lock
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
data:
|
||||
option: Blue Room
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: cam03
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_camera_lock
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
data:
|
||||
option: Computer Area
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: cam04
|
||||
- condition: state
|
||||
entity_id: input_boolean.outdoor_camera_lock
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.outdoor_camera_cycle
|
||||
data:
|
||||
option: Garage
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: cam06
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_camera_lock
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
data:
|
||||
option: Bedroom Left
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: cam07
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_camera_lock
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
data:
|
||||
option: Bedroom Right
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: cam08
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_camera_lock
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
data:
|
||||
option: Nursery
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: cam12
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_camera_lock
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
data:
|
||||
option: Kitchen
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: cam13
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_camera_lock
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
data:
|
||||
option: Front Room
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: cam14
|
||||
- condition: state
|
||||
entity_id: input_boolean.outdoor_camera_lock
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.outdoor_camera_cycle
|
||||
data:
|
||||
option: Back Yard
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: cam19
|
||||
- condition: state
|
||||
entity_id: input_boolean.outdoor_camera_lock
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.outdoor_camera_cycle
|
||||
data:
|
||||
option: Front Porch
|
||||
|
||||
default:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: automatic
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_camera_lock
|
||||
state: 'off'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
state: Blue Room
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam01_person_occupancy
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
state: Computer Area
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam03_person_occupancy
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
state: Bedroom Left
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam06_person_occupancy
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
state: Bedroom Right
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam07_person_occupancy
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
state: Nursery
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam08_person_occupancy
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
state: Kitchen
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam12_person_occupancy
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
state: Front Room
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam13_person_occupancy
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_next
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_select.indoor_camera_cycle
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: automatic
|
||||
- condition: state
|
||||
entity_id: input_boolean.outdoor_camera_lock
|
||||
state: 'off'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.outdoor_camera_cycle
|
||||
state: Garage
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam04_person_occupancy
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.outdoor_camera_cycle
|
||||
state: Back Yard
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam14_person_occupancy
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.outdoor_camera_cycle
|
||||
state: Front Porch
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam19_person_occupancy
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_next
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_select.outdoor_camera_cycle
|
||||
@@ -0,0 +1,69 @@
|
||||
alias: Frigate Cam04 Detect
|
||||
id: automation_frigate_cam04_detect
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
- id: motion
|
||||
platform: state
|
||||
entity_id: group.garage_motion
|
||||
|
||||
- id: doors
|
||||
platform: state
|
||||
entity_id: group.my_garage_doors
|
||||
|
||||
- id: occupancy
|
||||
platform: state
|
||||
entity_id: binary_sensor.frigate_cam04_person_occupancy
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: group.garage_motion
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: switch.frigate_cam04_detect
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam04_detect
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: group.my_garage_doors
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: switch.frigate_cam04_detect
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam04_detect
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: group.garage_motion
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: group.my_garage_doors
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.frigate_cam04_person_occupancy
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: switch.frigate_cam04_detect
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: switch.turn_off
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam04_detect
|
||||
@@ -0,0 +1,109 @@
|
||||
alias: Frigate Recordings
|
||||
id: automation_frigate_recordings
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
- id: automatic
|
||||
platform: time_pattern
|
||||
minutes: "/10"
|
||||
|
||||
- id: boolean
|
||||
platform: state
|
||||
entity_id: input_boolean.debug_recordings
|
||||
|
||||
- id: indoors
|
||||
platform: state
|
||||
entity_id: input_boolean.indoor_recordings
|
||||
|
||||
- id: outdoors
|
||||
platform: state
|
||||
entity_id: input_boolean.outdoor_recordings
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.debug_recordings
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam01_recordings
|
||||
- switch.frigate_cam03_recordings
|
||||
- switch.frigate_cam04_recordings
|
||||
- switch.frigate_cam06_recordings
|
||||
- switch.frigate_cam07_recordings
|
||||
- switch.frigate_cam08_recordings
|
||||
- switch.frigate_cam12_recordings
|
||||
- switch.frigate_cam13_recordings
|
||||
- switch.frigate_cam14_recordings
|
||||
- switch.frigate_cam18_recordings
|
||||
- switch.frigate_cam19_recordings
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_recordings
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam01_recordings
|
||||
- switch.frigate_cam03_recordings
|
||||
- switch.frigate_cam06_recordings
|
||||
- switch.frigate_cam07_recordings
|
||||
- switch.frigate_cam08_recordings
|
||||
- switch.frigate_cam12_recordings
|
||||
- switch.frigate_cam13_recordings
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_recordings
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: switch.turn_off
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam01_recordings
|
||||
- switch.frigate_cam03_recordings
|
||||
- switch.frigate_cam06_recordings
|
||||
- switch.frigate_cam07_recordings
|
||||
- switch.frigate_cam08_recordings
|
||||
- switch.frigate_cam12_recordings
|
||||
- switch.frigate_cam13_recordings
|
||||
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.outdoor_recordings
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam04_recordings
|
||||
- switch.frigate_cam14_recordings
|
||||
- switch.frigate_cam18_recordings
|
||||
- switch.frigate_cam19_recordings
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.outdoor_recordings
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: switch.turn_off
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam04_recordings
|
||||
- switch.frigate_cam14_recordings
|
||||
- switch.frigate_cam18_recordings
|
||||
- switch.frigate_cam19_recordings
|
||||
@@ -0,0 +1,109 @@
|
||||
alias: Frigate Snapshots
|
||||
id: automation_frigate_snapshots
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
- id: automatic
|
||||
platform: time_pattern
|
||||
minutes: "/10"
|
||||
|
||||
- id: boolean
|
||||
platform: state
|
||||
entity_id: input_boolean.debug_snapshots
|
||||
|
||||
- id: indoors
|
||||
platform: state
|
||||
entity_id: input_boolean.indoor_snapshots
|
||||
|
||||
- id: outdoors
|
||||
platform: state
|
||||
entity_id: input_boolean.outdoor_snapshots
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.debug_snapshots
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam01_snapshots
|
||||
- switch.frigate_cam03_snapshots
|
||||
- switch.frigate_cam04_snapshots
|
||||
- switch.frigate_cam06_snapshots
|
||||
- switch.frigate_cam07_snapshots
|
||||
- switch.frigate_cam08_snapshots
|
||||
- switch.frigate_cam12_snapshots
|
||||
- switch.frigate_cam13_snapshots
|
||||
- switch.frigate_cam14_snapshots
|
||||
- switch.frigate_cam18_snapshots
|
||||
- switch.frigate_cam19_snapshots
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_snapshots
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam01_snapshots
|
||||
- switch.frigate_cam03_snapshots
|
||||
- switch.frigate_cam06_snapshots
|
||||
- switch.frigate_cam07_snapshots
|
||||
- switch.frigate_cam08_snapshots
|
||||
- switch.frigate_cam12_snapshots
|
||||
- switch.frigate_cam13_snapshots
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.indoor_snapshots
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: switch.turn_off
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam01_snapshots
|
||||
- switch.frigate_cam03_snapshots
|
||||
- switch.frigate_cam06_snapshots
|
||||
- switch.frigate_cam07_snapshots
|
||||
- switch.frigate_cam08_snapshots
|
||||
- switch.frigate_cam12_snapshots
|
||||
- switch.frigate_cam13_snapshots
|
||||
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.outdoor_snapshots
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam04_snapshots
|
||||
- switch.frigate_cam14_snapshots
|
||||
- switch.frigate_cam18_snapshots
|
||||
- switch.frigate_cam19_snapshots
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.outdoor_snapshots
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: switch.turn_off
|
||||
data: {}
|
||||
target:
|
||||
entity_id:
|
||||
- switch.frigate_cam04_snapshots
|
||||
- switch.frigate_cam14_snapshots
|
||||
- switch.frigate_cam18_snapshots
|
||||
- switch.frigate_cam19_snapshots
|
||||
@@ -0,0 +1,64 @@
|
||||
alias: HVAC Fan Off
|
||||
id: automation_hvac_fan_off
|
||||
|
||||
trigger:
|
||||
# Has the fan been running for ten minutes?
|
||||
- platform: state
|
||||
entity_id: switch.thermostat_fan_mode
|
||||
to: 'on'
|
||||
for: '00:10:00'
|
||||
# Did the system turn on?
|
||||
- platform: state
|
||||
entity_id: sensor.hvac_action
|
||||
from: 'idle'
|
||||
# Check the conditions every 5 minutes
|
||||
- platform: time_pattern
|
||||
minutes: '/5'
|
||||
|
||||
- platform: state
|
||||
entity_id: input_boolean.allow_fan
|
||||
to: 'off'
|
||||
|
||||
condition:
|
||||
# Is the fan currently on?
|
||||
- condition: state
|
||||
entity_id: switch.thermostat_fan_mode
|
||||
state: 'on'
|
||||
|
||||
- condition: or
|
||||
conditions:
|
||||
# Is it getting too warm outside?
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.thermostat_temperature
|
||||
above: 68
|
||||
- condition: state
|
||||
entity_id: binary_sensor.warmer_outside
|
||||
state: 'on'
|
||||
# Is it getting too cool outside?
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.thermostat_temperature
|
||||
below: 65
|
||||
- condition: state
|
||||
entity_id: binary_sensor.cooler_outside
|
||||
state: 'on'
|
||||
# Did the system turn on?
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.hvac_action
|
||||
state: 'idle'
|
||||
action:
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: HVAC Fan Off
|
||||
entity_id: automation.hvac_fan_off
|
||||
message: >
|
||||
Turned off HVAC fan
|
||||
|
||||
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: switch.thermostat_fan_mode
|
||||
@@ -0,0 +1,102 @@
|
||||
alias: HVAC Fan On
|
||||
id: automation_hvac_fan_on
|
||||
|
||||
trigger:
|
||||
# Has the fan been off for ten minutes?
|
||||
- platform: state
|
||||
entity_id: switch.thermostat_fan_mode
|
||||
to: 'off'
|
||||
for: '00:10:00'
|
||||
|
||||
# Did the temp just switch to just right?
|
||||
- platform: state
|
||||
entity_id: binary_sensor.temp_just_right
|
||||
to: 'on'
|
||||
|
||||
# Did it just become cooler inside or outside?
|
||||
- platform: state
|
||||
entity_id: binary_sensor.cooler_outside
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
|
||||
# Did it just become warmer inside or outside?
|
||||
- platform: state
|
||||
entity_id: binary_sensor.warmer_outside
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
|
||||
# Is it starting to get too warm inside?
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.thermostat_temperature
|
||||
above: 80
|
||||
|
||||
# Is it starting to get too cool inside?
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.thermostat_temperature
|
||||
below: 60
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.allow_fan
|
||||
state: 'on'
|
||||
|
||||
# Are the internal sensors above 67?
|
||||
# This is mainly to ensure those sensors are working
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.return_temperature
|
||||
above: 50
|
||||
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.hvac_temperature
|
||||
above: 50
|
||||
|
||||
# Is the fan currently off?
|
||||
- condition: state
|
||||
entity_id: switch.thermostat_fan_mode
|
||||
state: 'off'
|
||||
|
||||
# Is the system currently idle?
|
||||
- condition: state
|
||||
entity_id: sensor.hvac_action
|
||||
state: 'idle'
|
||||
|
||||
# Is the home occupied?
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'on'
|
||||
|
||||
# Is the outside temp just right?
|
||||
- condition: state
|
||||
entity_id: binary_sensor.temp_just_right
|
||||
state: 'on'
|
||||
|
||||
# Is it getting too warm or too cold in the house?
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.thermostat_temperature
|
||||
above: 75
|
||||
- condition: state
|
||||
entity_id: binary_sensor.cooler_outside
|
||||
state: 'on'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.thermostat_temperature
|
||||
below: 65
|
||||
- condition: state
|
||||
entity_id: binary_sensor.warmer_outside
|
||||
state: 'on'
|
||||
action:
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: HVAC Fan On
|
||||
entity_id: automation.hvac_fan_on
|
||||
message: >
|
||||
Turned on HVAC fan
|
||||
|
||||
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: switch.thermostat_fan_mode
|
||||
@@ -0,0 +1,34 @@
|
||||
alias: Frigate Notification Testing
|
||||
id: automation_frigate_notification_testing
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: frigate/events
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- "{{ 'driveway' in trigger.payload_json['after']['entered_zones'] }}"
|
||||
- "{{ 'from_street' in trigger.payload_json['after']['entered_zones'] }}"
|
||||
- "{{ trigger.payload_json['after']['label'] == 'person' }}"
|
||||
|
||||
action:
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- "{{ 'driveway' in trigger.payload_json['after']['entered_zones'] }}"
|
||||
- "{{ 'from_street' in trigger.payload_json['after']['entered_zones'] }}"
|
||||
- "{{ trigger.payload_json['after']['top_score'] > 0.80 }}"
|
||||
- "{{ not 'garage' in trigger.payload_json['before']['current_zones'] }}"
|
||||
sequence:
|
||||
- service: notify.mobile_app_pixel_7
|
||||
data_template:
|
||||
message: 'A {{trigger.payload_json["after"]["label"]}} entered the driveway.'
|
||||
data:
|
||||
image: 'https://automation.clintweaver.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
|
||||
tag: '{{trigger.payload_json["after"]["id"]}}'
|
||||
when: '{{trigger.payload_json["after"]["start_time"]|int}}'
|
||||
|
||||
- delay: '00:00:05'
|
||||
@@ -0,0 +1,151 @@
|
||||
id: automation_frigate_person_back_yard
|
||||
alias: Frigate Person Back Yard
|
||||
description: "Fire a notification if a person is detected by Frigate in the back yard"
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: frigate_cam14
|
||||
value_template: "{{ value_json['after']['camera'] }}"
|
||||
variables:
|
||||
id: "{{ trigger.payload_json['after']['id'] }}"
|
||||
camera: "{{ trigger.payload_json['after']['camera'] }}"
|
||||
camera_name: "{{ camera | replace('_', ' ') | title }}"
|
||||
object: "{{ trigger.payload_json['after']['label'] }}"
|
||||
label: "{{ object | title }}"
|
||||
entered_zones: "{{ trigger.payload_json['after']['entered_zones'] }}"
|
||||
type: "{{ trigger.payload_json['type'] }}"
|
||||
base_url: https://automation.clintweaver.com
|
||||
group_target: ""
|
||||
zone_only: false
|
||||
input_zones:
|
||||
- front_porch
|
||||
- driveway
|
||||
zones: "{{ input_zones | list }}"
|
||||
input_labels:
|
||||
- person
|
||||
labels: "{{ input_labels | list }}"
|
||||
presence_entity: person.clint
|
||||
condition:
|
||||
- "{{ type != 'end' }}"
|
||||
- "{{ not zone_only or entered_zones|length > 0 }}"
|
||||
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
|
||||
- "{{ not labels|length or object in labels }}"
|
||||
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
|
||||
- '{{ is_state("binary_sensor.garage_door","off") }}'
|
||||
- '{{ is_state("binary_sensor.outer_garage_door","off") }}'
|
||||
- '{{ is_state("binary_sensor.front_door_contact","off") }}'
|
||||
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
|
||||
action:
|
||||
- choose:
|
||||
- conditions: "{{ not group_target }}"
|
||||
sequence:
|
||||
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
title: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
message: 'A {{ label }} was detected on the {{ camera_name }} camera. '
|
||||
notification_id: "{{ id }}"
|
||||
default:
|
||||
- service: notify.{{ group_target }}
|
||||
data:
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
- repeat:
|
||||
sequence:
|
||||
- wait_for_trigger:
|
||||
- platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: "{{ id }}"
|
||||
value_template: "{{ value_json['after']['id'] }}"
|
||||
timeout:
|
||||
minutes: 2
|
||||
continue_on_timeout: false
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
||||
- choose:
|
||||
- conditions: "{{ not group_target }}"
|
||||
sequence:
|
||||
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
url: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
clickAction: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
image: >-
|
||||
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
sound: none
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
actions:
|
||||
- action: URI
|
||||
title: View Clip
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
- action: URI
|
||||
title: View Snapshot
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
|
||||
- action: silence-{{ camera }}
|
||||
title: Silence Notifications
|
||||
destructive: true
|
||||
default:
|
||||
- service: notify.{{ group_target }}
|
||||
data:
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
url: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
clickAction: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
image: >-
|
||||
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
sound: none
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
actions:
|
||||
- action: URI
|
||||
title: View Clip
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
- action: URI
|
||||
title: View Snapshot
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
|
||||
- action: silence-{{ camera }}
|
||||
title: Silence Notifications
|
||||
destructive: true
|
||||
until: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: silence-{{ camera }}
|
||||
timeout:
|
||||
seconds: 30
|
||||
continue_on_timeout: false
|
||||
- delay:
|
||||
minutes: 30
|
||||
@@ -0,0 +1,159 @@
|
||||
id: "automation_frigate_person_from_street"
|
||||
alias: Frigate Person From Street
|
||||
description: "Fire a notification if a person is detected by Frigate coming towards the house from the street"
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: new
|
||||
value_template: "{{ value_json.type }}"
|
||||
|
||||
variables:
|
||||
id: "{{ trigger.payload_json['after']['id'] }}"
|
||||
camera: "{{ trigger.payload_json['after']['camera'] }}"
|
||||
camera_name: "{{ camera | replace('_', ' ') | title }}"
|
||||
object: "{{ trigger.payload_json['after']['label'] }}"
|
||||
label: "{{ object | title }}"
|
||||
entered_zones: "{{ trigger.payload_json['after']['entered_zones'] }}"
|
||||
type: "{{ trigger.payload_json['type'] }}"
|
||||
stationary: "{{ trigger.payload_json['after']['stationary'] }}"
|
||||
base_url: https://automation.clintweaver.com
|
||||
group_target: ""
|
||||
zone_only: true
|
||||
before_zones:
|
||||
- from_street
|
||||
after_zones:
|
||||
- driveway_center
|
||||
- driveway_east_side
|
||||
- parking_spot
|
||||
input_zones:
|
||||
- from_street
|
||||
zones: "{{ input_zones | list }}"
|
||||
input_labels:
|
||||
- person
|
||||
labels: "{{ input_labels | list }}"
|
||||
presence_entity: person.clint
|
||||
|
||||
condition:
|
||||
- "{{ type != 'end' }}"
|
||||
- "{{ not zone_only or entered_zones|length > 0 }}"
|
||||
- "{{ not stationary }}"
|
||||
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
|
||||
- "{{ not labels|length or object in labels }}"
|
||||
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
|
||||
#- "{{ not garage_door or not is_state(garage_door, 'on') }}"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions: "{{ not group_target }}"
|
||||
sequence:
|
||||
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
title: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
message: 'A {{ label }} was detected on the {{ camera_name }} camera. '
|
||||
notification_id: "{{ id }}"
|
||||
default:
|
||||
- service: notify.{{ group_target }}
|
||||
data:
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
- repeat:
|
||||
sequence:
|
||||
- wait_for_trigger:
|
||||
- platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: "{{ id }}"
|
||||
value_template: "{{ value_json['after']['id'] }}"
|
||||
timeout:
|
||||
minutes: 2
|
||||
continue_on_timeout: false
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
||||
- choose:
|
||||
- conditions: "{{ not group_target }}"
|
||||
sequence:
|
||||
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
url: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
clickAction: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
image: >-
|
||||
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
sound: none
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
actions:
|
||||
- action: URI
|
||||
title: View Clip
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
- action: URI
|
||||
title: View Snapshot
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
|
||||
- action: silence-{{ camera }}
|
||||
title: Silence Notifications
|
||||
destructive: true
|
||||
default:
|
||||
- service: notify.{{ group_target }}
|
||||
data:
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
url: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
clickAction: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
image: >-
|
||||
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
sound: none
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
actions:
|
||||
- action: URI
|
||||
title: View Clip
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
- action: URI
|
||||
title: View Snapshot
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
|
||||
- action: silence-{{ camera }}
|
||||
title: Silence Notifications
|
||||
destructive: true
|
||||
until: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: silence-{{ camera }}
|
||||
timeout:
|
||||
seconds: 30
|
||||
continue_on_timeout: false
|
||||
- delay:
|
||||
minutes: 30
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
id: "1642041485222"
|
||||
alias: Frigate Person Front Porch
|
||||
description: "Fire a notification if a person is detected by Frigate in the front yard"
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: frigate_cam19
|
||||
value_template: "{{ value_json['after']['camera'] }}"
|
||||
variables:
|
||||
id: "{{ trigger.payload_json['after']['id'] }}"
|
||||
camera: "{{ trigger.payload_json['after']['camera'] }}"
|
||||
camera_name: "{{ camera | replace('_', ' ') | title }}"
|
||||
object: "{{ trigger.payload_json['after']['label'] }}"
|
||||
label: "{{ object | title }}"
|
||||
entered_zones: "{{ trigger.payload_json['after']['entered_zones'] }}"
|
||||
type: "{{ trigger.payload_json['type'] }}"
|
||||
base_url: https://automation.clintweaver.com
|
||||
group_target: ""
|
||||
zone_only: true
|
||||
input_zones:
|
||||
- front_porch
|
||||
- driveway
|
||||
zones: "{{ input_zones | list }}"
|
||||
input_labels:
|
||||
- person
|
||||
labels: "{{ input_labels | list }}"
|
||||
presence_entity: person.clint
|
||||
condition:
|
||||
- "{{ type != 'end' }}"
|
||||
- "{{ not zone_only or entered_zones|length > 0 }}"
|
||||
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
|
||||
- "{{ not labels|length or object in labels }}"
|
||||
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
|
||||
- '{{ is_state("binary_sensor.garage_door","off") }}'
|
||||
- '{{ is_state("binary_sensor.outer_garage_door","off") }}'
|
||||
- '{{ is_state("binary_sensor.front_door_contact","off") }}'
|
||||
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
|
||||
- '{{ is_state("binary_sensor.front_porch_motion","off") }}'
|
||||
- '{{ is_state("binary_sensor.garage_motion_switch_home_security_motion_detection","off") }}'
|
||||
action:
|
||||
- choose:
|
||||
- conditions: "{{ not group_target }}"
|
||||
sequence:
|
||||
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
title: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
message: 'A {{ label }} was detected on the {{ camera_name }} camera. '
|
||||
notification_id: "{{ id }}"
|
||||
default:
|
||||
- service: notify.{{ group_target }}
|
||||
data:
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
- repeat:
|
||||
sequence:
|
||||
- wait_for_trigger:
|
||||
- platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: "{{ id }}"
|
||||
value_template: "{{ value_json['after']['id'] }}"
|
||||
timeout:
|
||||
minutes: 2
|
||||
continue_on_timeout: false
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
||||
- choose:
|
||||
- conditions: "{{ not group_target }}"
|
||||
sequence:
|
||||
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
url: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
clickAction: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
image: >-
|
||||
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
sound: none
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
actions:
|
||||
- action: URI
|
||||
title: View Clip
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
- action: URI
|
||||
title: View Snapshot
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
|
||||
- action: silence-{{ camera }}
|
||||
title: Silence Notifications
|
||||
destructive: true
|
||||
default:
|
||||
- service: notify.{{ group_target }}
|
||||
data:
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
url: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
clickAction: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
image: >-
|
||||
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
sound: none
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
actions:
|
||||
- action: URI
|
||||
title: View Clip
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
- action: URI
|
||||
title: View Snapshot
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
|
||||
- action: silence-{{ camera }}
|
||||
title: Silence Notifications
|
||||
destructive: true
|
||||
until: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: silence-{{ camera }}
|
||||
timeout:
|
||||
seconds: 30
|
||||
continue_on_timeout: false
|
||||
- delay:
|
||||
minutes: 30
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
alias: Frigate Vehicle Notification
|
||||
id: automation_frigate_vehicle_notification
|
||||
description: "Fire a notification if a vehicle is detected by Frigate entering the driveway"
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: new
|
||||
value_template: "{{ value_json.type }}"
|
||||
|
||||
variables:
|
||||
id: "{{ trigger.payload_json['after']['id'] }}"
|
||||
camera: "{{ trigger.payload_json['after']['camera'] }}"
|
||||
camera_name: "{{ camera | replace('_', ' ') | title }}"
|
||||
object: "{{ trigger.payload_json['after']['label'] }}"
|
||||
label: "{{ object | title }}"
|
||||
entered_zones: "{{ trigger.payload_json['after']['entered_zones'] }}"
|
||||
type: "{{ trigger.payload_json['type'] }}"
|
||||
stationary: "{{ trigger.payload_json['after']['stationary'] }}"
|
||||
base_url: https://automation.clintweaver.com
|
||||
group_target: "mobile_app_ticwatch_pro_3_gps"
|
||||
zone_only: true
|
||||
before_zones:
|
||||
- from_street
|
||||
after_zones:
|
||||
- driveway_center
|
||||
- driveway_east_side
|
||||
- parking_spot
|
||||
input_zones:
|
||||
- from_street
|
||||
zones: "{{ input_zones | list }}"
|
||||
input_labels:
|
||||
- vehicle
|
||||
labels: "{{ input_labels | list }}"
|
||||
presence_entity: "device_tracker.chevrolet_mylink"
|
||||
boolean_entity: input_boolean
|
||||
garage_door: binary_sensor.garage_door
|
||||
primary_vehicle: device_tracker.chevrolet_mylink
|
||||
|
||||
condition:
|
||||
- "{{ type != 'end' }}"
|
||||
- "{{ not zone_only or entered_zones|length > 0 }}"
|
||||
- "{{ not stationary }}"
|
||||
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
|
||||
- "{{ not labels|length or object in labels }}"
|
||||
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
|
||||
#- "{{ not garage_door or not is_state(garage_door, 'on') }}"
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions: "{{ not group_target }}"
|
||||
sequence:
|
||||
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
|
||||
- service: persistent_notification.create
|
||||
data:
|
||||
title: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
message: 'A {{ label }} was detected on the {{ camera_name }} camera. '
|
||||
notification_id: "{{ id }}"
|
||||
default:
|
||||
- service: notify.{{ group_target }}
|
||||
data:
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
image: /api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
- repeat:
|
||||
sequence:
|
||||
- wait_for_trigger:
|
||||
- platform: mqtt
|
||||
topic: frigate/events
|
||||
payload: "{{ id }}"
|
||||
value_template: "{{ value_json['after']['id'] }}"
|
||||
timeout:
|
||||
minutes: 2
|
||||
continue_on_timeout: false
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
||||
- choose:
|
||||
- conditions: "{{ not group_target }}"
|
||||
sequence:
|
||||
- device_id: 70c62eb366d6ed914b0ccc6bf41c32fd
|
||||
domain: mobile_app
|
||||
type: notify
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
url: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
clickAction: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
image: >-
|
||||
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
sound: none
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
actions:
|
||||
- action: URI
|
||||
title: View Clip
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
- action: URI
|
||||
title: View Snapshot
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
|
||||
- action: silence-{{ camera }}
|
||||
title: Silence Notifications
|
||||
destructive: true
|
||||
default:
|
||||
- service: notify.{{ group_target }}
|
||||
data:
|
||||
message: A {{ label }} was detected on the {{ camera_name }} camera.
|
||||
data:
|
||||
tag: "{{ id }}"
|
||||
group: frigate-notification-{{ camera }}
|
||||
url: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
clickAction: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
image: >-
|
||||
/api/frigate/notifications/{{id}}/thumbnail.jpg?format=android
|
||||
sound: none
|
||||
attachment:
|
||||
url: /api/frigate/notifications/{{id}}/thumbnail.jpg
|
||||
actions:
|
||||
- action: URI
|
||||
title: View Clip
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/{{camera}}/clip.mp4
|
||||
- action: URI
|
||||
title: View Snapshot
|
||||
uri: >-
|
||||
{{base_url}}/api/frigate/notifications/{{id}}/snapshot.jpg
|
||||
- action: silence-{{ camera }}
|
||||
title: Silence Notifications
|
||||
destructive: true
|
||||
until: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
||||
- wait_for_trigger:
|
||||
- platform: event
|
||||
event_type: mobile_app_notification_action
|
||||
event_data:
|
||||
action: silence-{{ camera }}
|
||||
timeout:
|
||||
seconds: 30
|
||||
continue_on_timeout: false
|
||||
- delay:
|
||||
minutes: 30
|
||||
@@ -0,0 +1,42 @@
|
||||
alias: 'All away media off'
|
||||
id: automation_all_away_media_off
|
||||
initial_state: 'on'
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
condition:
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.kitchen
|
||||
state: 'playing'
|
||||
- condition: state
|
||||
entity_id: media_player.great_room
|
||||
state: 'playing'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
state: 'playing'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_hub
|
||||
state: 'playing'
|
||||
- condition: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
state: 'playing'
|
||||
- condition: state
|
||||
entity_id: media_player.nursery_hub
|
||||
state: 'playing'
|
||||
- condition: state
|
||||
entity_id: media_player.bathroom_mini
|
||||
state: 'playing'
|
||||
- condition: state
|
||||
entity_id: media_player.downstairs_roku
|
||||
state: 'playing'
|
||||
action:
|
||||
service: media_player.turn_off
|
||||
data:
|
||||
entity_id: all
|
||||
@@ -0,0 +1,28 @@
|
||||
alias: 'Guest mode off nobody home'
|
||||
id: automation_guest_mode_off_nobody_home
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
to: 'off'
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
# We're all away
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'off'
|
||||
- condition: or
|
||||
conditions:
|
||||
# Either the phone or tablet are away, or the family room isn't occupied
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.home_occupied
|
||||
@@ -0,0 +1,41 @@
|
||||
alias: 'Home not occupied'
|
||||
id: automation_home_not_occupied
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.clint_home
|
||||
- input_boolean.emmett_home
|
||||
- input_boolean.bridget_home
|
||||
- input_boolean.kristy_home
|
||||
- input_boolean.marshall_home
|
||||
- input_boolean.tess_home
|
||||
- input_boolean.ebin_home
|
||||
- input_boolean.guest_mode
|
||||
to: 'off'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'on'
|
||||
# We're all away
|
||||
- condition: numeric_state
|
||||
entity_id: group.person_household
|
||||
below: 1
|
||||
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_household', 'entity_id'))|list)|groupby('state'))['on']|count }}"
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.home_occupied
|
||||
- service: automation.turn_on
|
||||
data:
|
||||
entity_id: automation.garage_open_nobody_home
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.patio_door_contact
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: lock.lock
|
||||
target:
|
||||
entity_id: lock.patio_door
|
||||
@@ -0,0 +1,36 @@
|
||||
alias: 'Home occupied'
|
||||
id: automation_home_occupied
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.clint_home
|
||||
- input_boolean.emmett_home
|
||||
- input_boolean.bridget_home
|
||||
- input_boolean.kristy_home
|
||||
- input_boolean.marshall_home
|
||||
- input_boolean.tess_home
|
||||
- input_boolean.ebin_home
|
||||
- input_boolean.guest_mode
|
||||
to: 'on'
|
||||
- platform: state
|
||||
entity_id: cover.garage_door
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
# One person is home
|
||||
- condition: numeric_state
|
||||
entity_id: group.person_household
|
||||
above: 0
|
||||
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_household', 'entity_id'))|list)|groupby('state'))['on']|count }}"
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.home_occupied
|
||||
- service: automation.turn_off
|
||||
data:
|
||||
entity_id: automation.garage_open_nobody_home
|
||||
@@ -0,0 +1,104 @@
|
||||
alias: House Mode Change
|
||||
id: automation_house_mode_change
|
||||
mode: queued
|
||||
|
||||
# Detect when something changes and/or when Home Assistant Starts
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.home_occupied
|
||||
- input_boolean.bedtime
|
||||
- sensor.people_count
|
||||
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.house
|
||||
option: 'Away'
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'on'
|
||||
|
||||
- condition: state
|
||||
entity_id: sensor.people_count
|
||||
state: '1'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.house
|
||||
option: 'Bachelor'
|
||||
|
||||
- service: homeassistant.turn_on
|
||||
entity_id:
|
||||
- input_boolean.lighting_automations
|
||||
- input_boolean.brightness_automations
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'on'
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.people_count
|
||||
above: 1
|
||||
below: 4
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.house
|
||||
option: 'Dad'
|
||||
- service: homeassistant.turn_on
|
||||
entity_id:
|
||||
- input_boolean.lighting_automations
|
||||
- input_boolean.brightness_automations
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Guest'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id:
|
||||
- input_boolean.lighting_automations
|
||||
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Manual'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id:
|
||||
- input_boolean.lighting_automations
|
||||
- input_boolean.brightness_automations
|
||||
|
||||
default:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.house
|
||||
option: 'Auto'
|
||||
|
||||
- service: homeassistant.turn_on
|
||||
entity_id:
|
||||
- input_boolean.lighting_automations
|
||||
- input_boolean.brightness_automations
|
||||
@@ -0,0 +1,16 @@
|
||||
alias: "Leaving Home"
|
||||
id: automation_leaving_home
|
||||
mode: single
|
||||
max_exceeded: silent
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
to: "off"
|
||||
for: "00:05:00"
|
||||
action:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id:
|
||||
- group.my_lights
|
||||
- group.my_fans
|
||||
- group.my_room_status
|
||||
@@ -0,0 +1,219 @@
|
||||
alias: 'Update Automatic Light Profile'
|
||||
id: automation_update_automatic_light_profile
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_select.time_of_day
|
||||
- input_select.early_morning_mode
|
||||
- input_select.morning_mode
|
||||
- input_select.late_morning_mode
|
||||
- input_select.early_afternoon_mode
|
||||
- input_select.late_afternoon_mode
|
||||
- input_select.early_evening_mode
|
||||
- input_select.evening_mode
|
||||
- input_select.late_evening_mode
|
||||
- input_select.night_mode
|
||||
- input_select.early_morning_kids_mode
|
||||
- input_select.morning_kids_mode
|
||||
- input_select.late_morning_kids_mode
|
||||
- input_select.early_afternoon_kids_mode
|
||||
- input_select.late_afternoon_kids_mode
|
||||
- input_select.early_evening_kids_mode
|
||||
- input_select.evening_kids_mode
|
||||
- input_select.late_evening_kids_mode
|
||||
- input_select.night_kids_mode
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.have_custody
|
||||
state: 'off'
|
||||
sequence:
|
||||
- choose:
|
||||
# Set to Energize during Early Morning (04:00 - 06:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Early Morning'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.early_morning_mode')}}"
|
||||
# Set to Energize during Morning (06:00 - 09:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Morning'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.morning_mode')}}"
|
||||
# Set to Energize during Late Morning (09:00 - 12:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Late Morning'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.late_morning_mode')}}"
|
||||
# Set to Concentrate during Early Afternoon (12:00 - 15:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Early Afternoon'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.early_afternoon_mode')}}"
|
||||
# Set to Concentrate during Late Afternoon (15:00 - 17:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Late Afternoon'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.late_afternoon_mode')}}"
|
||||
# Set to Read during Early Evening (17:00 - 19:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Early Evening'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.early_evening_mode')}}"
|
||||
# Set to Relax during Evening (19:00 - 22:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Evening'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.evening_mode')}}"
|
||||
# Set to Dimmed during Late Evening (22:00 - 00:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Late Evening'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.late_evening_mode')}}"
|
||||
# Set to Nightlight during Night (00:00 - 04:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Night'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.night_mode')}}"
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.have_custody
|
||||
state: 'on'
|
||||
sequence:
|
||||
- choose:
|
||||
# Set to Energize during Early Morning (04:00 - 06:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Early Morning'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.early_morning_kids_mode')}}"
|
||||
# Set to Energize during Morning (06:00 - 09:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Morning'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.morning_kids_mode')}}"
|
||||
# Set to Energize during Late Morning (09:00 - 12:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Late Morning'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.late_morning_kids_mode')}}"
|
||||
# Set to Concentrate during Early Afternoon (12:00 - 15:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Early Afternoon'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.early_afternoon_kids_mode')}}"
|
||||
# Set to Concentrate during Late Afternoon (15:00 - 17:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Late Afternoon'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.late_afternoon_kids_mode')}}"
|
||||
# Set to Read during Early Evening (17:00 - 19:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Early Evening'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.early_evening_kids_mode')}}"
|
||||
# Set to Relax during Evening (19:00 - 22:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Evening'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.evening_kids_mode')}}"
|
||||
# Set to Dimmed during Late Evening (22:00 - 00:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Late Evening'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.late_evening_kids_mode')}}"
|
||||
# Set to Nightlight during Night (00:00 - 04:00)
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.time_of_day
|
||||
state: 'Night'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: "{{states('input_select.night_kids_mode')}}"
|
||||
@@ -0,0 +1,268 @@
|
||||
alias: Update Light Off Delay
|
||||
id: automation_update_light_off_delay
|
||||
mode: queued
|
||||
|
||||
# Detect when something changes and/or when Home Assistant Starts
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_select.house
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- alias: "House set to Away"
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Away'
|
||||
sequence:
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_seconds
|
||||
data:
|
||||
value: 30
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_minutes
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_hours
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_minutes
|
||||
data:
|
||||
value: 5
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_hours
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_minutes
|
||||
data:
|
||||
value: 30
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_hours
|
||||
data:
|
||||
value: 0
|
||||
|
||||
- alias: "House set to Bachelor - 10 minutes"
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Bachelor'
|
||||
sequence:
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_minutes
|
||||
data:
|
||||
value: 1
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_hours
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_minutes
|
||||
data:
|
||||
value: 10
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_hours
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_minutes
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_hours
|
||||
data:
|
||||
value: 1
|
||||
|
||||
- alias: "House set to Guest - 30 minutes"
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Manual'
|
||||
sequence:
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_minutes
|
||||
data:
|
||||
value: 10
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_hours
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_minutes
|
||||
data:
|
||||
value: 30
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_hours
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_minutes
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_hours
|
||||
data:
|
||||
value: 1
|
||||
|
||||
- alias: "House set to Manual - 60 minutes"
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Manual'
|
||||
sequence:
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_minutes
|
||||
data:
|
||||
value: 20
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_hours
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_minutes
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_hours
|
||||
data:
|
||||
value: 1
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_minutes
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_hours
|
||||
data:
|
||||
value: 2
|
||||
|
||||
default:
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_minutes
|
||||
data:
|
||||
value: 10
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.short_light_off_delay_hours
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_minutes
|
||||
data:
|
||||
value: 30
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.normal_light_off_delay_hours
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_seconds
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_minutes
|
||||
data:
|
||||
value: 0
|
||||
- service: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.long_light_off_delay_hours
|
||||
data:
|
||||
value: 1
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
alias: Clint WFH
|
||||
id: automation_clint_wfh
|
||||
mode: restart
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.clint_work_from_home
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.clint_work_from_home
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.clint_work_from_home
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.clint_work_from_home
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.clint_work_from_home
|
||||
@@ -0,0 +1,26 @@
|
||||
alias: Clint Asleep
|
||||
id: automation_clint_asleep
|
||||
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
to: 'on'
|
||||
for:
|
||||
minutes: 15
|
||||
condition:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_is_awake
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: time
|
||||
after: '21:00:00'
|
||||
before: '04:00:00'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.clint_is_awake
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
alias: Clint at Work
|
||||
id: automation_clint_at_work
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: device_tracker.pixel_7
|
||||
to: 'AGH'
|
||||
action:
|
||||
- service: automation.turn_on
|
||||
entity_id: automation.clint_home_after_work
|
||||
- service: input_text.set_value
|
||||
data:
|
||||
entity_id: input_text.person_clint
|
||||
value: at work
|
||||
@@ -0,0 +1,15 @@
|
||||
alias: Clint Awake
|
||||
id: automation_clint_awake
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
to: 'off'
|
||||
for: '00:00:30'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.clint_is_awake
|
||||
|
||||
- service: script.turn_on
|
||||
entity_id: script.clint_travel_sensor
|
||||
@@ -0,0 +1,39 @@
|
||||
alias: Clint Away
|
||||
id: automation_clint_away
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- device_tracker.pixel_7
|
||||
- person.clint
|
||||
- group.person_clint
|
||||
from: 'home'
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: person.clint
|
||||
state: 'home'
|
||||
- condition: state
|
||||
entity_id: device_tracker.pixel_7
|
||||
state: 'home'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: person.clint
|
||||
state: 'home'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.clint_home
|
||||
|
||||
- delay: '00:00:30'
|
||||
@@ -0,0 +1,58 @@
|
||||
alias: Clint Home
|
||||
id: automation_clint_home
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- device_tracker.pixel_7
|
||||
- person.clint
|
||||
- group.person_clint
|
||||
- device_tracker.pixel_7_wifi
|
||||
to: 'home'
|
||||
|
||||
- platform: state
|
||||
id: car_home
|
||||
entity_id:
|
||||
- binary_sensor.gray_suv_east_side
|
||||
- binary_sensor.gray_suv_west_side
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: group.person_clint
|
||||
above: 0
|
||||
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_clint', 'entity_id'))|list)|groupby('state'))['home']|count }}"
|
||||
- condition: state
|
||||
entity_id: sensor.pixel_7_wifi_connection
|
||||
state: 'DreamWeaver'
|
||||
- condition: state
|
||||
entity_id: sensor.pixel_7_wifi_connection
|
||||
state: 'DreamIoT-2G'
|
||||
- condition: state
|
||||
entity_id: sensor.pixel_7_wifi_connection
|
||||
state: 'pozfam'
|
||||
- condition: state
|
||||
entity_id: sensor.pixel_7_wifi_connection
|
||||
state: 'pozfam-2.4G'
|
||||
- condition: trigger
|
||||
id: "car_home"
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.clint_travelling
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.clint_home
|
||||
- service: automation.turn_on
|
||||
entity_id: automation.clint_at_work
|
||||
|
||||
- delay: '00:00:30'
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
initial_state: 'off'
|
||||
alias: 'clint home after work'
|
||||
id: automation_home_after_work
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: device_tracker.pixel_7
|
||||
to: 'home'
|
||||
for:
|
||||
minutes: 10
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.notify_clint_work
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: time
|
||||
after: '15:00:00'
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
action:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: automation.clint_home_after_work
|
||||
@@ -0,0 +1,70 @@
|
||||
alias: Clint in Bed
|
||||
id: automation_clint_in_bed
|
||||
|
||||
trigger:
|
||||
# Bed in master bedroom is occupied
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
to: 'on'
|
||||
# Radio playing
|
||||
- platform: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
to: 'playing'
|
||||
- platform: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
to: 'idle'
|
||||
# Light on
|
||||
- platform: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
to: 'on'
|
||||
# Front room unoccupied for at least 5 minutes
|
||||
- platform: state
|
||||
entity_id: input_boolean.front_room_occupied
|
||||
to: 'off'
|
||||
for:
|
||||
minutes: 5
|
||||
# Something gets plugged in
|
||||
- platform: state
|
||||
entity_id: sensor.pixel_7_charger_type
|
||||
to: "Wireless"
|
||||
- platform: state
|
||||
entity_id: sensor.pixel_7_charger_type
|
||||
to: "wireless"
|
||||
- platform: state
|
||||
entity_id: input_boolean.clint_tablet_charging
|
||||
to: 'on'
|
||||
condition:
|
||||
- alias: "An adult is home and not in bed"
|
||||
condition: or
|
||||
conditions:
|
||||
- alias: "Clint is home and not in bed"
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- alias: "Kristy is home and not in bed"
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
- alias: "Its between 8:30PM and 5AM"
|
||||
condition: time
|
||||
after: '20:30:00'
|
||||
before: '05:00:00'
|
||||
|
||||
- alias: "The bed is occupied"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
initial_state: 'on'
|
||||
alias: 'Clint Location Update'
|
||||
id: automation_clint_location_update
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
# I've moved
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_select.clint_status_dropdown
|
||||
- input_boolean.clint_home
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
|
||||
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.clint_travel_sensor
|
||||
@@ -0,0 +1,15 @@
|
||||
alias: Clint Travelling
|
||||
id: automation_clint_travelling
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: time
|
||||
at: '21:00:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.clint_travelling
|
||||
@@ -0,0 +1,44 @@
|
||||
alias: 'Clint Up'
|
||||
id: automation_clint_up
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.great_room
|
||||
to: 'playing'
|
||||
- platform: state
|
||||
entity_id: media_player.great_room
|
||||
to: 'idle'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.master_bedroom_door_contact
|
||||
- binary_sensor.master_suite_door_contact
|
||||
to: 'on'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.pixel_7_is_charging
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for: '00:10:00'
|
||||
condition:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
state: 'on'
|
||||
- condition: time
|
||||
after: '04:00:00'
|
||||
before: '22:00:00'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'off'
|
||||
for: '00:01:00'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
alias: Clint Wakeup
|
||||
id: automation_clint_wake_up
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.morning
|
||||
to: 'on'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.morning
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.work_day
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
option: 'Auto'
|
||||
|
||||
- service: homeassistant.turn_on
|
||||
data:
|
||||
entity_id: light.master_bedroom_hue
|
||||
|
||||
- delay: '00:30:00'
|
||||
@@ -0,0 +1,19 @@
|
||||
initial_state: 'on'
|
||||
alias: 'Clint changing zones'
|
||||
id: automation_clint_changing_zones
|
||||
trigger:
|
||||
# Been away for a few minutes
|
||||
- platform: state
|
||||
entity_id: device_tracker.pixel_7
|
||||
to: 'not_home'
|
||||
for: '00:05:00'
|
||||
# Arrived in a zone
|
||||
- platform: state
|
||||
entity_id: device_tracker.pixel_7
|
||||
from: 'not_home'
|
||||
condition:
|
||||
# Been at least 5 minutes
|
||||
- condition: template
|
||||
value_template: "{{ ( as_timestamp(now()) - as_timestamp(state_attr('script.clint_traveltime','last_triggered'))|float)|float > 300 }}"
|
||||
action:
|
||||
- service: script.clint_traveltime
|
||||
@@ -0,0 +1,46 @@
|
||||
alias: Clint Status at Startup
|
||||
id: automation_clint_status_at_startup
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '23:30:00'
|
||||
before: '00:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.clint_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.clint_is_awake
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '00:00:00'
|
||||
before: '06:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.clint_in_bed
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.clint_is_awake
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.clint_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.clint_is_awake
|
||||
@@ -0,0 +1,41 @@
|
||||
alias: Set Clint Next Alarm
|
||||
id: automation_set_clint_next_alarm
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.work_day
|
||||
to: 'off'
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.work_day
|
||||
to: 'on'
|
||||
|
||||
- platform: time
|
||||
at: '01:00:00'
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.work_day
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.clint_next_alarm
|
||||
data:
|
||||
time: "09:00:00"
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.work_day
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_datetime.set_datetime
|
||||
target:
|
||||
entity_id: input_datetime.clint_next_alarm
|
||||
data:
|
||||
time: "06:00:00"
|
||||
@@ -0,0 +1,40 @@
|
||||
alias: 'Wake Clint'
|
||||
|
||||
id: automation_wake_clint
|
||||
initial_state: on
|
||||
trigger:
|
||||
platform: time
|
||||
at: input_datetime.clint_next_alarm
|
||||
# condition:
|
||||
# - condition: state
|
||||
# entity_id: binary_sensor.work_day
|
||||
# state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.master_bedroom_asleep
|
||||
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
volume_level: 0.95
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Energize
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Energize
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
|
||||
- service: script.wake_up_the_master_bedroom
|
||||
@@ -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
|
||||
@@ -0,0 +1,28 @@
|
||||
alias: Emmett Asleep
|
||||
id: automation_emmett_asleep
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
id: in_bed
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
to: 'on'
|
||||
for: '00:20:00'
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id:
|
||||
- input_boolean.emmett_home
|
||||
- input_boolean.kids_bedtime
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
state: 'on'
|
||||
- condition: trigger
|
||||
id: "in_bed"
|
||||
|
||||
action:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
@@ -0,0 +1,20 @@
|
||||
alias: 'Emmett Away'
|
||||
id: automation_emmett_away
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.emmett_home
|
||||
to: 'off'
|
||||
- platform: time_pattern
|
||||
minutes: "/5"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.emmett_home
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.emmett_home
|
||||
@@ -0,0 +1,22 @@
|
||||
alias: 'Emmett Home'
|
||||
id: automation_emmett_home
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.emmett_home
|
||||
to: 'on'
|
||||
- platform: time_pattern
|
||||
minutes: "/5"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.emmett_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.emmett_travelling
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.emmett_home
|
||||
@@ -0,0 +1,38 @@
|
||||
alias: Emmett In Bed
|
||||
id: automation_emmett_in_bed
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.black_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.emmett_home
|
||||
- input_boolean.kids_bedtime
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id:
|
||||
- binary_sensor.black_bed_occupied
|
||||
state: 'on'
|
||||
for: '00:10:00'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
state: 'off'
|
||||
#- condition: state
|
||||
# entity_id: binary_sensor.black_bed_occupied
|
||||
# state: 'on'
|
||||
# for:
|
||||
# minutes: 5
|
||||
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
@@ -0,0 +1,25 @@
|
||||
alias: Emmett Location Update
|
||||
id: automation_emmett_location_update
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
# Emmett moved
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_select.emmett_status_dropdown
|
||||
- input_boolean.emmett_home
|
||||
# Clint moved
|
||||
- input_select.clint_status_dropdown
|
||||
- input_boolean.clint_home
|
||||
# Custody changed
|
||||
- binary_sensor.have_custody
|
||||
# Sleeping status changed
|
||||
- input_boolean.emmett_is_awake
|
||||
- input_boolean.emmett_in_bed
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: "{{ trigger.from_state.state != trigger.to_state.state }}"
|
||||
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.emmett_travel_sensor
|
||||
@@ -0,0 +1,46 @@
|
||||
alias: Emmett Status at Startup
|
||||
id: automation_emmett_status_at_startup
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_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.emmett_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.emmett_is_awake
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '21:00:00'
|
||||
before: '06:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.emmett_in_bed
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.emmett_is_awake
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.emmett_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.emmett_is_awake
|
||||
@@ -0,0 +1,20 @@
|
||||
alias: 'Guest Location Update'
|
||||
id: automation_guest_location_update
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
# Guest moved
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_select.guest_status_dropdown
|
||||
- input_boolean.guest_home
|
||||
# Sleeping status changed
|
||||
- input_boolean.guest_is_awake
|
||||
- input_boolean.guest_in_bed
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
|
||||
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.guest_travel_sensor
|
||||
@@ -0,0 +1,46 @@
|
||||
alias: Guest Status at Startup
|
||||
id: automation_guest_status_at_startup
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_home
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '23:30:00'
|
||||
before: '00:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.guest_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.guest_is_awake
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '00:00:00'
|
||||
before: '06:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.guest_in_bed
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.guest_is_awake
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.guest_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.guest_is_awake
|
||||
@@ -0,0 +1,26 @@
|
||||
alias: Kristy Asleep
|
||||
id: automation_kristy_asleep
|
||||
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
to: 'on'
|
||||
for:
|
||||
minutes: 15
|
||||
condition:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
- condition: time
|
||||
after: '20:30:00'
|
||||
before: '04:00:00'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
alias: Kristy Awake
|
||||
id: automation_kristy_awake
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
|
||||
- service: script.turn_on
|
||||
entity_id: script.kristy_travel_sensor
|
||||
@@ -0,0 +1,37 @@
|
||||
alias: 'Kristy Away'
|
||||
id: automation_kristy_away
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- device_tracker.kristy_s_phone
|
||||
from: 'home'
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
|
||||
- condition: state
|
||||
entity_id: device_tracker.kristy_s_phone
|
||||
state: 'not_home'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: device_tracker.kristy_s_phone
|
||||
state: 'not_home'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.kristy_home
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.allow_announcements
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.out_of_bed_alert
|
||||
|
||||
- delay: '00:00:30'
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
alias: 'Kristy Home'
|
||||
id: automation_kristy_home
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- group.person_kristy
|
||||
- device_tracker.kristy_s_phone
|
||||
to: 'home'
|
||||
|
||||
- platform: event
|
||||
event_type: automation_reloaded
|
||||
|
||||
condition:
|
||||
- alias: 'They were previously considered away'
|
||||
condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'off'
|
||||
|
||||
- alias: 'At least one tracker is home'
|
||||
condition: numeric_state
|
||||
entity_id: group.person_kristy
|
||||
above: 0
|
||||
value_template: "{{ dict((states|selectattr('entity_id', 'in', state_attr('group.person_kristy', 'entity_id'))|list)|groupby('state'))['home']|count }}"
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.kristy_travelling
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.kristy_home
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.allow_announcements
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.out_of_bed_alert
|
||||
@@ -0,0 +1,39 @@
|
||||
alias: Kristy in Bed
|
||||
id: automation_kristy_in_bed
|
||||
|
||||
trigger:
|
||||
# Bed in master bedroom is occupied
|
||||
- platform: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
to: 'on'
|
||||
# Radio playing
|
||||
- platform: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
to: 'playing'
|
||||
- platform: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
to: 'idle'
|
||||
# Light on
|
||||
- platform: state
|
||||
entity_id: light.master_bedroom_hue
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
- alias: "Its between 8:30PM and 5AM"
|
||||
condition: time
|
||||
after: '20:30:00'
|
||||
before: '05:00:00'
|
||||
|
||||
- alias: "The bed is occupied"
|
||||
condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
alias: 'Kristy Location Update'
|
||||
id: automation_kristy_location_update
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
# I've moved
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_select.kristy_status_dropdown
|
||||
- input_boolean.kristy_home
|
||||
|
||||
condition:
|
||||
- condition: template
|
||||
value_template: '{{ trigger.from_state.state != trigger.to_state.state }}'
|
||||
|
||||
action:
|
||||
- service: script.turn_on
|
||||
entity_id: script.kristy_travel_sensor
|
||||
@@ -0,0 +1,49 @@
|
||||
alias: Kristy Status at Startup
|
||||
id: automation_kristy_status_at_startup
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '23:30:00'
|
||||
before: '00:00:00'
|
||||
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_is_awake
|
||||
|
||||
- conditions:
|
||||
- condition: time
|
||||
after: '00:00:00'
|
||||
before: '06:00:00'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_in_bed
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.kristy_is_awake
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.kristy_in_bed
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.kristy_is_awake
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1,69 @@
|
||||
alias: Adults Asleep
|
||||
id: automation_adults_asleep
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.clint_is_awake
|
||||
- input_boolean.kristy_is_awake
|
||||
- input_boolean.guest_is_awake
|
||||
to: 'off'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_home
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
data:
|
||||
entity_id:
|
||||
- input_boolean.asleep
|
||||
- input_boolean.teens_asleep
|
||||
- input_boolean.kids_asleep
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
data:
|
||||
option: Nightlight
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.patio_door_contact
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: lock.lock
|
||||
target:
|
||||
entity_id: lock.patio_door
|
||||
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.asleep
|
||||
@@ -0,0 +1,95 @@
|
||||
alias: Adults Awake
|
||||
id: automation_adults_awake
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
# Consider the house awake if it is after 4:30AM and Kristy and I are both home and awake
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.adults_in_bed
|
||||
- input_boolean.clint_in_bed
|
||||
- input_boolean.clint_is_awake
|
||||
- input_boolean.kristy_in_bed
|
||||
- input_boolean.kristy_is_awake
|
||||
- binary_sensor.master_bed_occupied
|
||||
|
||||
- platform: time
|
||||
id: wake_clint
|
||||
at: input_datetime.clint_next_alarm
|
||||
|
||||
- platform: state
|
||||
id: late_morning
|
||||
entity_id: binary_sensor.late_morning
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
condition:
|
||||
- condition: time
|
||||
after: '04:30:00'
|
||||
- condition: time
|
||||
before: '10:00:00'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: late_morning
|
||||
- condition: trigger
|
||||
id: wake_clint
|
||||
- condition: state
|
||||
entity_id: binary_sensor.master_bed_occupied
|
||||
state: 'off'
|
||||
for: '00:10:00'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_is_awake
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
state: 'off'
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.bedtime
|
||||
- input_boolean.asleep
|
||||
- input_boolean.master_bedroom_asleep
|
||||
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_mode
|
||||
data:
|
||||
option: Auto
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
alias: Adults Away
|
||||
id: automation_adults_away
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.clint_home
|
||||
- input_boolean.kristy_home
|
||||
- input_boolean.guest_home
|
||||
to: 'off'
|
||||
condition:
|
||||
# All away
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_home
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.adults_away
|
||||
@@ -0,0 +1,26 @@
|
||||
alias: "Adults away something open"
|
||||
id: automation_adults_away_something_open
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.adults_away
|
||||
from: "off"
|
||||
to: "on"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.something_open
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "off"
|
||||
action:
|
||||
# Notify the last person to leave
|
||||
- service: notify.mobile_app_pixel_7
|
||||
data:
|
||||
message: >-
|
||||
{% if as_timestamp(states.input_boolean.kristy_home.last_updated) > as_timestamp(states.input_boolean.clint_home.last_updated) %}
|
||||
The following are open: {{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_exterior_windows', 'entity_id') + state_attr('group.my_exterior_doors', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }}
|
||||
{% else %}
|
||||
The following are open: {{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_exterior_windows', 'entity_id') + state_attr('group.my_exterior_doors', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,18 @@
|
||||
alias: 'Adults returned'
|
||||
id: automation_adults_returned
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.clint_home
|
||||
- input_boolean.kristy_home
|
||||
- input_boolean.guest_home
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.adults_away
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.adults_away
|
||||
@@ -0,0 +1,57 @@
|
||||
alias: 'All away'
|
||||
id: automation_all_away
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.clint_home
|
||||
- input_boolean.kristy_home
|
||||
- input_boolean.guest_home
|
||||
- input_boolean.emmett_home
|
||||
- input_boolean.bridget_home
|
||||
- input_boolean.marshall_home
|
||||
- input_boolean.tess_home
|
||||
- input_boolean.ebin_home
|
||||
- input_boolean.front_room_occupied
|
||||
- input_boolean.computer_area_occupied
|
||||
- input_boolean.kitchen_occupied
|
||||
- input_boolean.great_room_occupied
|
||||
to: 'off'
|
||||
condition:
|
||||
# Adults are away
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_home
|
||||
state: 'off'
|
||||
# Kids are away
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_home
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_home
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'off'
|
||||
# And not in guest mode
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.all_away
|
||||
- delay: '00:00:30'
|
||||
@@ -0,0 +1,13 @@
|
||||
alias: 'All returned'
|
||||
id: automation_all_returned
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.clint_home
|
||||
- input_boolean.kristy_home
|
||||
to: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.all_away
|
||||
@@ -0,0 +1,52 @@
|
||||
alias: "Almost Bedtime"
|
||||
id: automation_almost_bedtime
|
||||
initial_state: on
|
||||
trigger:
|
||||
platform: time
|
||||
at: input_datetime.kids_five_minute_warning_time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.announce_bedtime
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "on"
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.kids_bedtime
|
||||
|
||||
- service: media_player.volume_set
|
||||
data:
|
||||
volume_level: 0.65
|
||||
target:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
- media_player.kitchen
|
||||
|
||||
- service: script.make_clever_announcement
|
||||
data:
|
||||
media_content_id: media-source://media_source/local/Sounds/tts/almost_bedtime.mp3
|
||||
volume: 0.5
|
||||
|
||||
# Because of how we're calling the script, the automation won't continue until the script is done, so we don't need a delay here
|
||||
#- delay: '00:00:10'
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{states('switch.nursery_bed_lights') == 'off' }}"
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.nursery_wled
|
||||
data:
|
||||
option: Read
|
||||
@@ -0,0 +1,44 @@
|
||||
alias: 'Almost Bedtime TTS'
|
||||
id: automation_almost_bedtime_tts
|
||||
initial_state: off
|
||||
trigger:
|
||||
platform: time
|
||||
at: input_datetime.kids_five_minute_warning_time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.announce_bedtime
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: media_player.volume_set
|
||||
data_template:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
- media_player.bathroom_mini
|
||||
- media_player.front_room_hub
|
||||
- media_player.kitchen
|
||||
- media_player.nursery_hub
|
||||
- media_player.master_bedroom_clock
|
||||
volume_level: 0.7
|
||||
- delay: '00:00:03'
|
||||
- service: tts.google_translate_say
|
||||
entity_id: media_player.all_speakers
|
||||
data_template:
|
||||
message: Alright kids. Its almost bedtime. You've got 5 minutes.
|
||||
- delay: '00:00:10'
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.all_speakers
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.automatic_light_profile
|
||||
data:
|
||||
option: Dimmed
|
||||
@@ -0,0 +1,52 @@
|
||||
initial_state: 'on'
|
||||
alias: 'Bedtime'
|
||||
id: automation_bedtime
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.kristy_in_bed
|
||||
- input_boolean.clint_in_bed
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id:
|
||||
- input_boolean.bedtime
|
||||
- input_boolean.teens_bedtime
|
||||
- input_boolean.kids_bedtime
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
data:
|
||||
option: Nightlight
|
||||
@@ -0,0 +1,40 @@
|
||||
alias: 'Bedtime something open'
|
||||
id: automation_bedtime_something_open
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.clint_is_awake
|
||||
to: 'off'
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
# We're both in bed
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.something_open
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.impending_rain
|
||||
state: 'on'
|
||||
|
||||
action:
|
||||
- service: media_player.turn_on
|
||||
data_template:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
- service: media_player.volume_set
|
||||
data_template:
|
||||
volume_level: 0.30
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
- service: tts.google_translate_say
|
||||
data_template:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
message: >-
|
||||
The following are open:
|
||||
{{ dict((states|selectattr('entity_id', 'in', state_attr('group.my_exterior_windows', 'entity_id') + state_attr('group.my_exterior_doors', 'entity_id'))|list)|groupby('state'))['on']|map(attribute='name')|list|join(', ') }}
|
||||
- delay: '00:01:00'
|
||||
- service: media_player.turn_off
|
||||
data:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
@@ -0,0 +1,53 @@
|
||||
alias: Continue Nursery Noise
|
||||
id: automation_continue_nursery_noise
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.nursery_hub
|
||||
from: "playing"
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_asleep
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_select.nursery_mode
|
||||
state: 'Night on'
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.google_home
|
||||
option: 'Nursery'
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.ambient_sound
|
||||
option: 'Random White Noise'
|
||||
- service: input_number.set_value
|
||||
data:
|
||||
entity_id: input_number.volume_ambientsounds
|
||||
value: '0.35'
|
||||
- service: script.ambientsounds
|
||||
@@ -0,0 +1,168 @@
|
||||
alias: "Goodnight Kids"
|
||||
|
||||
id: automation_goodnight_kids
|
||||
initial_state: on
|
||||
trigger:
|
||||
platform: time
|
||||
at: input_datetime.kids_bedtime_announcement_time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.announce_bedtime
|
||||
state: "on"
|
||||
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "on"
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.kids_bedtime
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{states('media_player.announcements') == 'unknown' }}"
|
||||
sequence:
|
||||
- service: script.make_clever_announcement
|
||||
data:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
- media_player.computer_area_hub
|
||||
media_content_id: >-
|
||||
{% if is_state('input_boolean.emmett_home', 'on') %}
|
||||
{% if is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_emmett_bridget_ebin.mp3
|
||||
{% else %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_emmett_bridget.mp3
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.ebin_home','on') %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_emmett_ebin.mp3
|
||||
{% else %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_emmett.mp3
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_bridget_ebin.mp3
|
||||
{% else %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_bridget.mp3
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.ebin_home', 'on') %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_ebin.mp3
|
||||
{% endif %}
|
||||
volume: 0.5
|
||||
default:
|
||||
- service: script.make_clever_announcement
|
||||
data:
|
||||
entity_id: media_player.announcements
|
||||
media_content_id: >-
|
||||
{% if is_state('input_boolean.emmett_home', 'on') %}
|
||||
{% if is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_emmett_bridget_ebin.mp3
|
||||
{% else %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_emmett_bridget.mp3
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.ebin_home','on') %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_emmett_ebin.mp3
|
||||
{% else %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_emmett.mp3
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_bridget_ebin.mp3
|
||||
{% else %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_bridget.mp3
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.ebin_home', 'on') %}
|
||||
media-source://media_source/local/Sounds/tts/goodnight_ebin.mp3
|
||||
{% endif %}
|
||||
volume: 0.5
|
||||
|
||||
# Because of how we're calling the script, the automation won't continue until the script is done, so we don't need a delay here
|
||||
#- delay: '00:00:10'
|
||||
|
||||
- choose:
|
||||
- conditions: "{{is_state_attr('media_player.front_room_tv','source','YouTube')}}"
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: media_player.front_room_tv
|
||||
|
||||
- choose:
|
||||
- conditions: "{{is_state_attr('media_player.downstairs_roku','source','YouTube')}}"
|
||||
sequence:
|
||||
- service: media_player.select_source
|
||||
data:
|
||||
source: Home
|
||||
target:
|
||||
entity_id: media_player.downstairs_roku
|
||||
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: switch.shelly_projector
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: Dimmed
|
||||
|
||||
- delay: "00:00:01"
|
||||
|
||||
# - service: media_player.play_media
|
||||
# target:
|
||||
# entity_id: media_player.front_room_hub
|
||||
# data:
|
||||
# media_content_id: camera-casting-yml/nursery-camera
|
||||
# media_content_type: lovelace
|
||||
# metadata:
|
||||
# title: Nursery Camera
|
||||
# thumbnail: https://brands.home-assistant.io/_/lovelace/logo.png
|
||||
# media_class: app
|
||||
# children_media_class: null
|
||||
# navigateIds:
|
||||
# - {}
|
||||
# - media_content_type: lovelace
|
||||
# media_content_id: ""
|
||||
# - media_content_type: lovelace
|
||||
# media_content_id: camera-casting-yml
|
||||
|
||||
- choose:
|
||||
- conditions: "{{is_state('input_boolean.ebin_home','on')}}"
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.nursery_wled
|
||||
data:
|
||||
option: "Off"
|
||||
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.nursery_mode
|
||||
data:
|
||||
option: "Nightlight"
|
||||
|
||||
- delay: "00:15:00"
|
||||
|
||||
- choose:
|
||||
- conditions: "{{is_state('input_boolean.emmett_home','on') or is_state('input_boolean.bridget_home','on')}}"
|
||||
sequence:
|
||||
- service: input_button.press
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_button.nursery_bedtime
|
||||
|
||||
- delay: "00:45:00"
|
||||
|
||||
- choose:
|
||||
- conditions: "{{is_state('input_boolean.emmett_home','on') or is_state('input_boolean.bridget_home','on')}}"
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
data: {}
|
||||
target:
|
||||
entity_id: input_boolean.nursery_asleep
|
||||
@@ -0,0 +1,167 @@
|
||||
alias: 'Goodnight Kids TTS'
|
||||
id: automation_goodnight_kids_tts
|
||||
initial_state: off
|
||||
trigger:
|
||||
platform: time
|
||||
at: input_datetime.kids_bedtime_announcement_time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.announce_bedtime
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
action:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.kids_bedtime
|
||||
|
||||
- service: media_player.volume_set
|
||||
data_template:
|
||||
entity_id:
|
||||
- media_player.bathroom_mini
|
||||
- media_player.bathroom_mini
|
||||
- media_player.front_room_hub
|
||||
- media_player.kitchen
|
||||
- media_player.nursery_hub
|
||||
- media_player.master_bedroom_clock
|
||||
volume_level: 0.7
|
||||
|
||||
- delay: '00:00:01'
|
||||
|
||||
- service: tts.google_translate_say
|
||||
entity_id: media_player.all_speakers
|
||||
data_template:
|
||||
message: >
|
||||
It is time for bed.
|
||||
{% if is_state('input_boolean.emmett_home', 'on') %}
|
||||
Good night Emmett
|
||||
{% if is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
Good night Bridget and good night Ebin
|
||||
{% else %}
|
||||
and good night Bridget
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.ebin_home','on') %}
|
||||
and good night Ebin
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.bridget_home', 'on') %}
|
||||
{% if is_state('input_boolean.ebin_home', 'on') %}
|
||||
Good night Bridget and good night Ebin
|
||||
{% else %}
|
||||
Good Night Bridget
|
||||
{% endif %}
|
||||
{% elif is_state('input_boolean.ebin_home', 'on') %}
|
||||
Good night Ebin
|
||||
{% endif %}
|
||||
- delay: '00:00:10'
|
||||
|
||||
- service: homeassistant.turn_off
|
||||
entity_id:
|
||||
- media_player.all_speakers
|
||||
- media_player.front_room_tv
|
||||
- media_player.downstairs_roku
|
||||
- switch.shelly_projector
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.automatic_light_profile
|
||||
option: Dimmed
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
|
||||
- service: light.turn_on
|
||||
data:
|
||||
entity_id:
|
||||
- light.black_bed_wled
|
||||
- light.white_bed_wled
|
||||
brightness_pct: 50
|
||||
effect: random
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: 'Nightlight'
|
||||
|
||||
- delay: "00:15:00"
|
||||
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: 'Off'
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
|
||||
#- service: input_select.select_option
|
||||
# data:
|
||||
# entity_id: input_select.google_home
|
||||
# option: 'Nursery'
|
||||
#- service: input_select.select_option
|
||||
# data:
|
||||
# entity_id: input_select.ambient_sound
|
||||
# option: 'Random Kids Noise'
|
||||
#- service: input_number.set_value
|
||||
# data:
|
||||
# entity_id: input_number.volume_ambientsounds
|
||||
# value: '0.40'
|
||||
#- service: script.ambientsounds
|
||||
- delay: "00:30:00"
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
- service: light.turn_off
|
||||
data:
|
||||
entity_id:
|
||||
- light.black_bed_wled
|
||||
- light.white_bed_wled
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: 'Off'
|
||||
@@ -0,0 +1,86 @@
|
||||
alias: Kids Asleep
|
||||
id: automation_kids_asleep
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.emmett_is_awake
|
||||
- input_boolean.bridget_is_awake
|
||||
- input_boolean.ebin_is_awake
|
||||
to: 'off'
|
||||
|
||||
- platform: state
|
||||
entity_id: input_boolean.kids_away
|
||||
to: 'on'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
data:
|
||||
entity_id: input_boolean.kids_asleep
|
||||
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: Kids Asleep Asleep
|
||||
entity_id: automation.kids_asleep
|
||||
message: >
|
||||
{% if trigger.entity_id == 'input_select.clint_status_dropdown' %}
|
||||
input_select.clint_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.emmett_status_dropdown' %}
|
||||
input_select.emmett_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.bridget_status_dropdown' %}
|
||||
input_select.bridget_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.kristy_status_dropdown' %}
|
||||
input_select.kristy_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.marshall_status_dropdown' %}
|
||||
input_select.marshall_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.tess_status_dropdown' %}
|
||||
input_select.tess_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.ebin_status_dropdown' %}
|
||||
input_select.ebin_status_dropdown
|
||||
{% else %}
|
||||
input_select.guest_status_dropdown
|
||||
{% endif %}
|
||||
At least one of the kids is asleep. turning on kids_asleep
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.kids_asleep
|
||||
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: Kids Asleep
|
||||
entity_id: automation.kids_asleep
|
||||
message: >
|
||||
None of the kids were asleep, defaulted to turning off kids_asleep
|
||||
@@ -0,0 +1,216 @@
|
||||
alias: Kids Awake
|
||||
id: automation_kids_awake
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
# Consider the kids awake if it is after 6:00AM and any of them that are home are also awake
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.emmett_is_awake
|
||||
- input_boolean.bridget_is_awake
|
||||
- input_boolean.ebin_is_awake
|
||||
- input_boolean.kids_away
|
||||
- binary_sensor.morning
|
||||
to: 'on'
|
||||
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.black_bed_occupied
|
||||
- binary_sensor.white_bed_occupied
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
condition:
|
||||
- alias: "Kids should only be considered awake if they get out of bed after 6:00 AM and before 7:00 PM"
|
||||
condition: time
|
||||
before: '19:00:00'
|
||||
after: '06:00:00'
|
||||
- alias: "Go through all the kids that are considered home and see if their bed is occupied"
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'off'
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'unavailable'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id:
|
||||
- input_boolean.kids_bedtime
|
||||
- input_boolean.kids_asleep
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'unavailable'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'unavailable'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'unavailable'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
state: 'unavailable'
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.nursery_mode
|
||||
state: 'Manual'
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Away'
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.nursery_mode
|
||||
option: Auto
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
alias: Kids Away
|
||||
id: automation_kids_away
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.emmett_home
|
||||
- input_boolean.bridget_home
|
||||
- input_boolean.ebin_home
|
||||
to: 'off'
|
||||
- platform: state
|
||||
entity_id: binary_sensor.kids_at_home
|
||||
to: 'off'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id:
|
||||
- input_boolean.emmett_home
|
||||
- input_boolean.bridget_home
|
||||
- input_boolean.ebin_home
|
||||
- binary_sensor.kids_at_home
|
||||
state: 'off'
|
||||
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.kids_away
|
||||
@@ -0,0 +1,116 @@
|
||||
alias: Kids Away Videos On
|
||||
id: automation_kids_away_videos_on
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.kids_away
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
state: 'playing'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
attribute: source
|
||||
state: 'PBS Kids'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
attribute: source
|
||||
state: 'YouTube'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_hub
|
||||
attribute: source
|
||||
state: 'PBS Kids'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_hub
|
||||
attribute: source
|
||||
state: 'YouTube'
|
||||
- condition: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
attribute: source
|
||||
state: 'PBS Kids'
|
||||
- condition: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
attribute: source
|
||||
state: 'YouTube'
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
state: 'playing'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
attribute: source
|
||||
state: 'YouTube'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_tv
|
||||
attribute: source
|
||||
state: 'PBS Kids'
|
||||
sequence:
|
||||
- service: media_player.select_source
|
||||
data:
|
||||
entity_id: media_player.front_room_tv
|
||||
source: Home
|
||||
- service: media_player.turn_off
|
||||
data:
|
||||
entity_id: media_player.front_room_tv
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_hub
|
||||
state: 'playing'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_hub
|
||||
attribute: source
|
||||
state: 'YouTube'
|
||||
- condition: state
|
||||
entity_id: media_player.front_room_hub
|
||||
attribute: source
|
||||
state: 'PBS Kids'
|
||||
sequence:
|
||||
- service: media_player.select_source
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
source: Home
|
||||
- service: media_player.turn_off
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
state: 'playing'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
attribute: source
|
||||
state: 'YouTube'
|
||||
- condition: state
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
attribute: source
|
||||
state: 'PBS Kids'
|
||||
sequence:
|
||||
- service: media_player.select_source
|
||||
data:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
source: Home
|
||||
- service: media_player.turn_off
|
||||
data:
|
||||
entity_id: media_player.master_bedroom_clock
|
||||
@@ -0,0 +1,18 @@
|
||||
alias: Kids Returned
|
||||
id: automation_kids_returned
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.emmett_home
|
||||
- input_boolean.bridget_home
|
||||
- input_boolean.ebin_home
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kids_away
|
||||
state: 'on'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.kids_away
|
||||
@@ -0,0 +1,25 @@
|
||||
alias: 'Nearly Home'
|
||||
id: automation_nearly_home
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.garage_door
|
||||
- binary_sensor.front_door_contact
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
for: '00:10:00'
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.deck_light_level
|
||||
below: 25
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.sun_elevation
|
||||
below: 15
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
entity_id: input_select.entryway_mode
|
||||
option: 'Auto'
|
||||
@@ -0,0 +1,27 @@
|
||||
alias: People Count Changed
|
||||
id: automation_people_count_changed
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.people_count
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: person.clint
|
||||
state: 'home'
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.people_count
|
||||
above: 0
|
||||
below: 2
|
||||
sequence:
|
||||
- service: homeassistant.turn_on
|
||||
entity_id: input_boolean.clint_home_alone
|
||||
|
||||
default:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.clint_home_alone
|
||||
@@ -0,0 +1,102 @@
|
||||
alias: Person Arrived
|
||||
id: automation_person_arrived
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.clint_home
|
||||
- input_boolean.emmett_home
|
||||
- input_boolean.bridget_home
|
||||
- input_boolean.kristy_home
|
||||
- input_boolean.marshall_home
|
||||
- input_boolean.tess_home
|
||||
- input_boolean.ebin_home
|
||||
- input_boolean.guest_home
|
||||
from: "off"
|
||||
to: "on"
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data_template:
|
||||
entity_id: >
|
||||
{% if trigger.entity_id == 'input_boolean.clint_home' %}
|
||||
input_select.clint_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_boolean.emmett_home' %}
|
||||
input_select.emmett_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_boolean.bridget_home' %}
|
||||
input_select.bridget_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_boolean.kristy_home' %}
|
||||
input_select.kristy_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_boolean.marshall_home' %}
|
||||
input_select.marshall_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_boolean.tess_home' %}
|
||||
input_select.tess_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_boolean.ebin_home' %}
|
||||
input_select.ebin_status_dropdown
|
||||
{% else %}
|
||||
input_select.guest_status_dropdown
|
||||
{% endif %}
|
||||
option: >
|
||||
{% if trigger.entity_id == 'input_boolean.kristy_home' %}
|
||||
{% if states.input_select.kristy_status_dropdown.state == 'Just Left' %}
|
||||
Home
|
||||
{% else %}
|
||||
Just Arrived
|
||||
{% endif %}
|
||||
{% elif trigger.entity_id == 'input_boolean.marshall_home' %}
|
||||
{% if states.input_select.marshall_status_dropdown.state == 'Just Left' %}
|
||||
Home
|
||||
{% else %}
|
||||
Just Arrived
|
||||
{% endif %}
|
||||
{% elif trigger.entity_id == 'input_boolean.clint_home' %}
|
||||
{% if states.input_select.clint_status_dropdown.state == 'Just Left' %}
|
||||
Home
|
||||
{% else %}
|
||||
Just Arrived
|
||||
{% endif %}
|
||||
{% elif trigger.entity_id == 'input_boolean.emmett_home' %}
|
||||
{% if states.input_select.emmett_status_dropdown.state == 'Just Left' %}
|
||||
Home
|
||||
{% else %}
|
||||
Just Arrived
|
||||
{% endif %}
|
||||
{% elif trigger.entity_id == 'input_boolean.bridget_home' %}
|
||||
{% if states.input_select.bridget_status_dropdown.state == 'Just Left' %}
|
||||
Home
|
||||
{% else %}
|
||||
Just Arrived
|
||||
{% endif %}
|
||||
{% elif trigger.entity_id == 'input_boolean.ebin_home' %}
|
||||
{% if states.input_select.ebin_status_dropdown.state == 'Just Left' %}
|
||||
Home
|
||||
{% else %}
|
||||
Just Arrived
|
||||
{% endif %}
|
||||
{% elif trigger.entity_id == 'input_boolean.tess_home' %}
|
||||
{% if states.input_select.tess_status_dropdown.state == 'Just Left' %}
|
||||
Home
|
||||
{% else %}
|
||||
Just Arrived
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if states.input_select.guest_status_dropdown.state == 'Just Left' %}
|
||||
Home
|
||||
{% else %}
|
||||
Just Arrived
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: Person Arrived
|
||||
entity_id: automation.person_arrived
|
||||
message: >
|
||||
Person Arrived ran
|
||||
|
||||
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.all_away
|
||||
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.home_occupied
|
||||
@@ -0,0 +1,175 @@
|
||||
alias: Person Asleep
|
||||
id: automation_person_asleep
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.clint_in_bed
|
||||
- input_boolean.emmett_in_bed
|
||||
- input_boolean.bridget_in_bed
|
||||
- input_boolean.kristy_in_bed
|
||||
- input_boolean.marshall_in_bed
|
||||
- input_boolean.tess_in_bed
|
||||
- input_boolean.ebin_in_bed
|
||||
- input_boolean.guest_in_bed
|
||||
to: 'On'
|
||||
for:
|
||||
minutes: 5
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.clint_is_awake
|
||||
- input_boolean.emmett_is_awake
|
||||
- input_boolean.bridget_is_awake
|
||||
- input_boolean.kristy_is_awake
|
||||
- input_boolean.marshall_is_awake
|
||||
- input_boolean.tess_is_awake
|
||||
- input_boolean.ebin_is_awake
|
||||
- input_boolean.guest_is_awake
|
||||
to: 'off'
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_in_bed
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: input_boolean.clint_is_awake
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.clint_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_in_bed
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.emmett_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_in_bed
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.bridget_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_in_bed
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.kristy_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_in_bed
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: input_boolean.marshall_is_awake
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.marshall_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_in_bed
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: input_boolean.tess_is_awake
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.tess_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_in_bed
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.ebin_is_awake
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_in_bed
|
||||
state: 'on'
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_is_awake
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.guest_is_awake
|
||||
@@ -0,0 +1,47 @@
|
||||
alias: Person Away
|
||||
id: automation_person_away
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
- 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 Left'
|
||||
for:
|
||||
minutes: 5
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data_template:
|
||||
entity_id: >
|
||||
{% if trigger.entity_id == 'input_select.clint_status_dropdown' %}
|
||||
input_select.clint_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.emmett_status_dropdown' %}
|
||||
input_select.emmett_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.bridget_status_dropdown' %}
|
||||
input_select.bridget_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.kristy_status_dropdown' %}
|
||||
input_select.kristy_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.marshall_status_dropdown' %}
|
||||
input_select.marshall_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.tess_status_dropdown' %}
|
||||
input_select.tess_status_dropdown
|
||||
{% elif trigger.entity_id == 'input_select.ebin_status_dropdown' %}
|
||||
input_select.ebin_status_dropdown
|
||||
{% else %}
|
||||
input_select.guest_status_dropdown
|
||||
{% endif %}
|
||||
option: Away
|
||||
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: Person Away
|
||||
entity_id: automation.person_away
|
||||
message: >
|
||||
Person Away ran
|
||||
@@ -0,0 +1,51 @@
|
||||
alias: Person Extended Away
|
||||
id: automation_person_extended_away
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_select.clint_status_dropdown
|
||||
to: 'Away'
|
||||
for:
|
||||
hours: 24
|
||||
- platform: state
|
||||
entity_id: input_select.emmett_status_dropdown
|
||||
to: 'Away'
|
||||
for:
|
||||
hours: 24
|
||||
- platform: state
|
||||
entity_id: input_select.bridget_status_dropdown
|
||||
to: 'Away'
|
||||
for:
|
||||
hours: 24
|
||||
- platform: state
|
||||
entity_id: input_select.kristy_status_dropdown
|
||||
to: 'Away'
|
||||
for:
|
||||
hours: 24
|
||||
- platform: state
|
||||
entity_id: input_select.marshall_status_dropdown
|
||||
to: 'Away'
|
||||
for:
|
||||
hours: 24
|
||||
- platform: state
|
||||
entity_id: input_select.tess_status_dropdown
|
||||
to: 'Away'
|
||||
for:
|
||||
hours: 24
|
||||
- platform: state
|
||||
entity_id: input_select.ebin_status_dropdown
|
||||
to: 'Away'
|
||||
for:
|
||||
hours: 24
|
||||
- platform: state
|
||||
entity_id: input_select.guest_status_dropdown
|
||||
to: 'Away'
|
||||
for:
|
||||
hours: 24
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data_template:
|
||||
entity_id: >
|
||||
{{ trigger.entity_id }}
|
||||
option: Extended Away
|
||||
@@ -0,0 +1,35 @@
|
||||
alias: Person Home
|
||||
id: automation_person_home
|
||||
mode: queued
|
||||
|
||||
trigger:
|
||||
- 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
|
||||
to: 'Just Arrived'
|
||||
for:
|
||||
minutes: 5
|
||||
- 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
|
||||
from: 'Just Left'
|
||||
to: 'Just Arrived'
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data_template:
|
||||
entity_id: >
|
||||
{{ trigger.entity_id }}
|
||||
option: Home
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user