13796 lines
397 KiB
YAML
13796 lines
397 KiB
YAML
- id: '1628956688014'
|
||
alias: 'Alarm: Disarmed'
|
||
description: ''
|
||
trigger:
|
||
- trigger: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
to: disarmed
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_alarm_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_bell: disarmed.'
|
||
title: ':bell: Alarm'
|
||
log_level: Normal
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':camera: Turning off indoor cameras.'
|
||
log_level: Debug
|
||
- action: script.set_central_heating_to_home_mode
|
||
mode: single
|
||
- id: '1587680439012'
|
||
alias: 'Alarm: Arm Overnight Home Mode'
|
||
description: ''
|
||
trace:
|
||
stored_traces: 10
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- schedule.alarm_scheduled_home_mode
|
||
from: 'off'
|
||
to: 'on'
|
||
- trigger: time
|
||
at: 00:00:00
|
||
- trigger: time_pattern
|
||
hours: '0'
|
||
minutes: /30
|
||
- trigger: time
|
||
at: 01:00:00
|
||
- trigger: time_pattern
|
||
hours: '1'
|
||
minutes: /30
|
||
- trigger: time
|
||
at: 02:00:00
|
||
conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: disarmed
|
||
- not:
|
||
- condition: state
|
||
entity_id: lock.front_door
|
||
state: locked
|
||
- condition: state
|
||
entity_id: input_boolean.enable_alarm_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.alarmed_doors_and_windows
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute |
|
||
int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: The
|
||
following entrances are still open: {% for entity in state_attr(''binary_sensor.alarmed_doors_and_windows'',''entity_id'')
|
||
%}{% if states(entity) == ''on'' %}{{ ''\n* '' ~ state_attr(entity,
|
||
''friendly_name'') }} {% endif %}{% endfor %}"
|
||
|
||
Trying again later.'
|
||
title: ':warning: :bell: Alarm'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
default:
|
||
- parallel:
|
||
- action: script.arm_alarm_overnight
|
||
data:
|
||
message: It's late.
|
||
- action: script.lock_front_door
|
||
data: {}
|
||
mode: single
|
||
- id: '1587680439015'
|
||
alias: 'Alarm: Arm Overnight Home Mode Final Check'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 02:05:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: disarmed
|
||
- condition: state
|
||
entity_id: input_boolean.enable_alarm_automations
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.alarmed_doors_and_windows
|
||
state: 'on'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute |
|
||
int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Did
|
||
not turned on because the following: {% for opening in state_attr(''binary_sensor.alarmed_doors_and_windows'',
|
||
''entity_id'') %}{% if states(opening) == ''on'' %} {{ ''* '' ~ state_attr(opening,
|
||
''friendly_name'') ~ ''\n'' }}{% endif %}{% endfor %}'
|
||
title: ':warning: :bell: Alarm :warning:'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
- alias: Turn on bedroom light to warn not all doors/windows are closed.
|
||
action: light.turn_on
|
||
data:
|
||
rgb_color:
|
||
- 17
|
||
- 0
|
||
- 255
|
||
brightness: 255
|
||
target:
|
||
entity_id:
|
||
- light.under_bed_left
|
||
- light.under_bed_right
|
||
- light.bedroom_lamp_left
|
||
- light.bedroom_lamp_right
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.alarmed_doors_and_windows
|
||
state: 'off'
|
||
sequence:
|
||
- choose:
|
||
- alias: Danny not home and not long distance after last check
|
||
conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: person.danny
|
||
state: home
|
||
- condition: template
|
||
value_template: '{{ states(''sensor.danny_home_nearest_distance'')|float(0)
|
||
> states(''input_number.long_distance_away_from_home'')|int(0) - 1
|
||
}}'
|
||
- condition: state
|
||
entity_id: person.terina
|
||
state: home
|
||
for:
|
||
minutes: '5'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: 'Final check for people failed. :running: :house_with_garden:
|
||
Danny is not home and this is the final check. :no_bell: Alarm turned
|
||
on.'
|
||
title: ':warning: :bell: Alarm'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
- action: script.set_alarm_to_home_mode
|
||
- action: script.lock_front_door
|
||
- alias: Terina not home and not long distance and after last check
|
||
conditions:
|
||
- condition: state
|
||
entity_id: person.danny
|
||
state: home
|
||
for:
|
||
minutes: '5'
|
||
- not:
|
||
- condition: state
|
||
entity_id: person.terina
|
||
state: home
|
||
- condition: template
|
||
value_template: '{{ states(''sensor.terina_home_nearest_distance'')|float(0)
|
||
> states(''input_number.long_distance_away_from_home'')|int(0) - 1
|
||
}}'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: 'Final check for people failed. :house_with_garden: :woman_dancing:
|
||
Terina is not home and this is the final check. :no_bell: Alarm
|
||
turned on.'
|
||
title: ':bell: Alarm'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
- action: script.set_alarm_to_home_mode
|
||
- action: script.lock_front_door
|
||
default: []
|
||
mode: single
|
||
- id: '1587680439013'
|
||
alias: 'Alarm: Arm Overnight When Doors And Windows Shut'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.alarmed_doors_and_windows
|
||
from: 'on'
|
||
to: 'off'
|
||
for: 00:00:30
|
||
conditions:
|
||
- condition: state
|
||
entity_id: group.adult_people
|
||
state: home
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: disarmed
|
||
- condition: state
|
||
entity_id: binary_sensor.alarmed_doors_and_windows
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: schedule.alarm_scheduled_home_mode
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_alarm_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.arm_alarm_overnight
|
||
data:
|
||
message: 'All alarmed :door: doors and :window: windows are now closed.'
|
||
mode: single
|
||
- id: '1630366065607'
|
||
alias: 'Alarm: Armed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
to: armed_away
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_alarm_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ' Set to away mode (all sensors on). Turning on all :camera_with_flash:
|
||
cameras.'
|
||
title: ':bell: Alarm'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1614197981954'
|
||
alias: 'Alarm: Disconnected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
to: unavailable
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_alarm_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
title: ':bell: Alarm'
|
||
message: ':warning: Disconnected from Home Assistant :warning:'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1658658845650'
|
||
alias: 'Alarm: Disconnected For A Period Of Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- alarm_control_panel.house_alarm
|
||
to: unavailable
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_alarm_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Alarm has been unavailable for 5 minutes. Restarting Ring MQTT add-on.
|
||
title: ':bell: Alarm'
|
||
log_level: Normal
|
||
- action: hassio.addon_restart
|
||
data:
|
||
addon: fdb328a7_ring_mqtt
|
||
- wait_for_trigger:
|
||
- trigger: state
|
||
entity_id:
|
||
- alarm_control_panel.house_alarm
|
||
from: unavailable
|
||
timeout: '{{ states(''input_text.restart_ring_mqtt_add_on_timeout'') }}'
|
||
continue_on_timeout: true
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: unavailable
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Restarting Ring MQTT add-on failed.
|
||
title: ':bell: Alarm'
|
||
log_level: Normal
|
||
- conditions:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: unavailable
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Ring MQTT restarted successfully.
|
||
title: ':bell: Alarm'
|
||
log_level: Normal
|
||
default: []
|
||
mode: single
|
||
- id: '1589026420341'
|
||
alias: 'Alarm: Triggered'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
to: triggered
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_alarm_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Has triggered!
|
||
title: ':rotating_light: Alarm'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
- person.leo
|
||
- action: script.send_actionable_notification_with_2_buttons
|
||
data:
|
||
message: Triggered! Turn off?
|
||
title: ':rotating_light: Alarm'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
action1_title: 'Yes'
|
||
action1_name: switch_off_alarm
|
||
action2_title: 'No'
|
||
action2_name: ignore
|
||
- action: script.post_home_assistant_direct_notification
|
||
data:
|
||
message: Has triggered!
|
||
title: 🚨 Alarm
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
- person.leo
|
||
priority: high
|
||
mode: single
|
||
- id: '1676493888411'
|
||
alias: 'Attic: Hatch Opened'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.attic_hatch_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Attic hatch opened. Turning lights on.
|
||
title: Attic
|
||
log_level: Debug
|
||
- action: light.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id: light.attic
|
||
mode: single
|
||
- id: '1676493961946'
|
||
alias: 'Attic: Hatch Closed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.attic_hatch_contact
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Attic hatch opened. Turning lights off.
|
||
title: Attic
|
||
log_level: Debug
|
||
- action: light.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: light.attic
|
||
mode: single
|
||
- id: '1664827040573'
|
||
alias: 'Attic: Lights On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- light.attic
|
||
to: 'on'
|
||
for:
|
||
hours: 0
|
||
minutes: 30
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_actionable_notification_with_2_buttons
|
||
data:
|
||
message: Lights have been on for 15 minutes. Turn off?
|
||
title: Attic
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
action1_title: 'Yes'
|
||
action1_name: switch_off_attic_lights
|
||
action2_title: 'No'
|
||
action2_name: ignore
|
||
mode: single
|
||
- id: '1590564595890'
|
||
alias: 'Living Room: UPS Below 5 Minutes Run time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.lounge_ups_battery_runtime
|
||
below: '301'
|
||
condition:
|
||
- condition: state
|
||
entity_id: sensor.lounge_ups_status_data
|
||
state: OB DISCHRG
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':warning: Less than 5 minutes left on :battery: :warning:'
|
||
title: ':battery: Living Room UPS'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1591705795121'
|
||
alias: 'Office: Server UPS On Battery With Less Than 5 Minutes'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.server_ups_battery_runtime
|
||
below: '301'
|
||
condition:
|
||
- condition: state
|
||
entity_id: sensor.server_ups_status_data
|
||
state: OB DISCHRG
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':warning: Less than 5 minutes left on :battery: battery :warning:'
|
||
title: ':battery: Server UPS'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1604998439600'
|
||
alias: 'House: Water detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.water_leak_sensors
|
||
to: 'on'
|
||
condition: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :droplet: Potential leak detected :droplet: :warning:'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1604998512525'
|
||
alias: 'House: Water Not Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.water_leak_sensors
|
||
from: 'on'
|
||
to: 'off'
|
||
condition: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Potential leak has stopped
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1613246359438'
|
||
alias: 'Office: Computer UPS On Battery With Less Than 5 Minutes'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.computer_ups_battery_runtime
|
||
below: '301'
|
||
condition:
|
||
- condition: state
|
||
entity_id: sensor.computer_ups_status_data
|
||
state: OB DISCHRG
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':warning: Less than 5 minutes left on :battery: battery :warning:'
|
||
title: ':battery: PC UPS'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1613264719942'
|
||
alias: 'Office: Alarm Armed Home Mode & Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.office_area_motion
|
||
to: 'on'
|
||
condition:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_home
|
||
- condition: state
|
||
entity_id: group.jd_computer
|
||
state: 'off'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motioned detected in the office!'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1613264961246'
|
||
alias: 'Kitchen: Alarm Armed Home Mode & Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_area_motion
|
||
to: 'on'
|
||
condition:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_home
|
||
- condition: state
|
||
entity_id: group.jd_computer
|
||
state: 'off'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motioned detected in the kitchen!'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1617395256574'
|
||
alias: 'Leo''s Room: Bed Occupied At Night'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.leos_bed_occupied
|
||
to: 'on'
|
||
condition:
|
||
- condition: state
|
||
entity_id: cover.leos_bedroom_blinds
|
||
state: open
|
||
- condition: time
|
||
after: '18:30:00'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_bed_sensor
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':city_sunrise: :bed: Someone is in Leo''s bed. Closing blinds.'
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.leos_bedroom_window_contact
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :window: Leo''s bedroom window is still open. Waiting
|
||
until it''s closed before closing blinds. :warning:'
|
||
log_level: Normal
|
||
default:
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
- wait_for_trigger:
|
||
- trigger: state
|
||
entity_id: binary_sensor.leos_bedroom_window_contact
|
||
to: 'off'
|
||
timeout: 03:00:00
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':white_check_mark: :window: Leo''s window closed. Closing blinds.'
|
||
log_level: Normal
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
mode: single
|
||
- id: '1622973276606'
|
||
alias: 'Office: Arm Office Door'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: input_boolean.alarm_office_door
|
||
from: 'off'
|
||
to: 'on'
|
||
condition: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.office_door_contact
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :alarm: Unable to arm office door because the door is
|
||
not closed. Disabling alarm.'
|
||
log_level: Normal
|
||
- action: input_boolean.turn_off
|
||
target:
|
||
entity_id: input_boolean.alarm_office_door
|
||
default:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':bell: :door: Office door armed.'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1622973478458'
|
||
alias: 'Office: Trigger Armed Door'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.office_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
condition:
|
||
- condition: state
|
||
entity_id: input_boolean.alarm_office_door
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':rotating_light: :door: Office door armed and was opened:rotating_light:'
|
||
- action: input_boolean.turn_off
|
||
target:
|
||
entity_id: input_boolean.alarm_office_door
|
||
mode: queued
|
||
max: 10
|
||
- id: '1627509008928'
|
||
alias: Enter No Children Mode
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: input_select.home_mode
|
||
to: No Children
|
||
condition: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':repeat: Entering No Children mode.'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1634576629865'
|
||
alias: 'NFC Tag: Scanned Locked By User'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: tag_scanned
|
||
context:
|
||
user_id:
|
||
- 06cbf6deafc54cf0beffa49552a396b1
|
||
- 2df8a2a6e0be4d5d902aad2d39ed4c9b
|
||
condition: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.tag_id == ''47e42f4c-3ffa-463f-ae2f-ed0b97a4fe9c''}}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: :label: Front door tag scanned by {{ states.person|selectattr(''attributes.user_id'',
|
||
''=='', trigger.event.context.user_id)|map(attribute=''attributes.friendly_name'')|first
|
||
}}.'
|
||
log_level: Normal
|
||
- action: script.nfc_front_door
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.tag_id == ''8b6d6755-b4d5-4b23-8e8b-cf224d221bb7''}}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: :label: Bedroom right tag scanned by {{ states.person|selectattr(''attributes.user_id'',
|
||
''=='', trigger.event.context.user_id)|map(attribute=''attributes.friendly_name'')|first
|
||
}}.'
|
||
log_level: Normal
|
||
- action: script.nfc_bedroom_right
|
||
default: []
|
||
mode: single
|
||
- id: '1636203020481'
|
||
alias: 'Porch: Some One Leaving'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.front_door
|
||
from: 'off'
|
||
to: 'on'
|
||
condition: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.porch_motion_occupancy
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: Someone leaving.'
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.porch_motion_occupancy
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':test_tube: :door: Someone entering.'
|
||
log_level: Normal
|
||
default: []
|
||
mode: single
|
||
- id: '1647094935963'
|
||
alias: Exit Naughty Step Mode
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: input_boolean.naughty_step_mode
|
||
from: 'on'
|
||
to: 'off'
|
||
condition: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Exiting naught step mode.
|
||
log_level: Normal
|
||
- action: input_boolean.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id:
|
||
- input_boolean.enable_living_room_motion_triggers
|
||
- input_boolean.enable_stairs_motion_triggers
|
||
mode: single
|
||
- id: '1653857006776'
|
||
alias: 'Porch: Heating Turned On Check Entrances'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- climate.thermostat
|
||
attribute: hvac_action
|
||
to: heating
|
||
from: idle
|
||
condition:
|
||
- condition: state
|
||
entity_id: climate.thermostat
|
||
state: auto
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.front_door
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Consider closing the front door or turning the heating off.
|
||
title: 'Heating turned on and front :door: door is open.'
|
||
default: []
|
||
mode: single
|
||
- id: '1659198098255'
|
||
alias: 'House: Turn On Fake Presence'
|
||
description: ''
|
||
triggers:
|
||
- trigger: sun
|
||
event: sunset
|
||
offset: 0
|
||
- trigger: time_pattern
|
||
hours: '17'
|
||
minutes: /15
|
||
- trigger: time_pattern
|
||
hours: '18'
|
||
minutes: /15
|
||
- trigger: time_pattern
|
||
hours: '19'
|
||
minutes: /15
|
||
- trigger: time_pattern
|
||
hours: '20'
|
||
minutes: /15
|
||
- trigger: time_pattern
|
||
hours: '21'
|
||
minutes: /15
|
||
- trigger: time_pattern
|
||
hours: '22'
|
||
minutes: /15
|
||
condition:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_away
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: not_home
|
||
- condition: sun
|
||
after: sunset
|
||
after_offset: -02:00:00
|
||
- or:
|
||
- condition: template
|
||
value_template: '{{ states(''sensor.terina_home_nearest_distance'')|float(0)
|
||
> states(''input_number.long_distance_away_from_home'')|int(0) - 1 }}'
|
||
- condition: template
|
||
value_template: '{{ states(''sensor.danny_home_nearest_distance'')|float(0)
|
||
> states(''input_number.long_distance_away_from_home'')|int(0) - 1 }}'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Changing lights to pretend someone is at home.
|
||
log_level: Normal
|
||
- action: script.downstairs_random_light
|
||
data: {}
|
||
- action: script.upstairs_random_lights
|
||
data: {}
|
||
mode: single
|
||
- id: '1660326219450'
|
||
alias: 'Weather: Morning Check For Hot Day Forecast'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 09:00:00
|
||
condition:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
- condition: time
|
||
weekday:
|
||
- fri
|
||
- thu
|
||
- tue
|
||
- mon
|
||
- wed
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Checking if hot water needs to be turned off.
|
||
title: ':sun_small_cloud: Weather'
|
||
log_level: Normal
|
||
- action: script.set_how_water_to_away_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1660326219451'
|
||
alias: 'Weather: Afternoon Check For Hot Day Forecast'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: '14:00:00'
|
||
condition:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
- condition: time
|
||
weekday:
|
||
- fri
|
||
- thu
|
||
- tue
|
||
- mon
|
||
- wed
|
||
- condition: state
|
||
entity_id: input_boolean.enable_hot_water_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Checking if hot water needs to be turned on.
|
||
title: ':sun_small_cloud: Weather'
|
||
- action: script.set_hot_water_to_home_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1674478124534'
|
||
alias: 'Conservatory: Cold Temperature'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.conservatory_area_mean_temperature
|
||
below: 3
|
||
condition: []
|
||
actions:
|
||
- action: climate.set_preset_mode
|
||
data:
|
||
preset_mode: boost
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Conservatory fell below 3c. Boosting central heating.
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1674916813112'
|
||
alias: 'Bedroom: Lamps Off And Stairs Light On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- light.bedroom_lamps
|
||
from: 'on'
|
||
to: 'off'
|
||
condition:
|
||
- condition: or
|
||
conditions:
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.stairs_2
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Bedroom light turned off. Turning stairs lights off.
|
||
title: ':bed: Bedroom'
|
||
debug: Debug
|
||
- action: scene.turn_on
|
||
data:
|
||
transition: 2
|
||
target:
|
||
entity_id: scene.stairs_light_off
|
||
mode: single
|
||
- id: '1698342875093'
|
||
alias: 'Kitchen: mmWave Turned On Whilst In Holiday Mode'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- switch.kitchen_motion_mmwave_sensor
|
||
to: 'on'
|
||
condition:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
actions:
|
||
- action: switch.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: switch.kitchen_motion_mmwave_sensor
|
||
mode: single
|
||
- id: '1618158789152'
|
||
alias: 'Shed: Door Closed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.shed_door
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: disarmed
|
||
- condition: state
|
||
entity_id: binary_sensor.conservatory_door
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: Door closed. Keeping conservatory :camera: camera on because
|
||
:bell: alarm is armed and conservatory door is open.'
|
||
title: ':hut: Shed'
|
||
log_level: Debug
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: disarmed
|
||
- condition: state
|
||
entity_id: binary_sensor.conservatory_door
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: Door closed. Keeping conservatory camera on because :bell:
|
||
alarm is armed.'
|
||
title: ':hut: Shed'
|
||
log_level: Debug
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.conservatory_door
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: Door closed. Keeping conservatory :camera: camera on because
|
||
conservatory :door: door is open.'
|
||
title: ':hut: Shed'
|
||
log_level: Debug
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: disarmed
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: Door closed. Turning conservatory :camera: camera off.'
|
||
title: ':hut: Shed'
|
||
log_level: Debug
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: disarmed
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: Door closed. Keeping conservatory camera on because :bell:
|
||
alarm is armed.'
|
||
title: ':hut: Shed'
|
||
log_level: Debug
|
||
default: []
|
||
mode: single
|
||
- id: '1618158998129'
|
||
alias: 'Shed: Motion Detected When Door Is Closed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.shed_motion
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.shed_door
|
||
state: 'off'
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':paw_prints: Motion detected in the shed and the door is shut.'
|
||
title: ':hut: Shed'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1660894232445'
|
||
alias: 'Back Garden: Below Direct Sun Light'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.back_garden_motion_illuminance
|
||
for:
|
||
hours: 0
|
||
minutes: 10
|
||
seconds: 0
|
||
below: input_number.close_blinds_brightness_threshold
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Sun light has fallen below {{ states('input_number.close_blinds_brightness_threshold')
|
||
}} ({{ states('sensor.back_garden_motion_illuminance') }}){{ state_attr('sensor.back_garden_motion_illuminance',
|
||
'unit_of_measurement') }}. Opening blinds/curtains.
|
||
title: Back Garden
|
||
log_level: Debug
|
||
- if:
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- condition: time
|
||
before: input_datetime.childrens_bed_time
|
||
then:
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
mode: single
|
||
- id: '1754227355547'
|
||
alias: 'Bathroom: Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.bathroom_motion_pir
|
||
- binary_sensor.bathroom_motion_2_occupancy
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.bathroom_lights
|
||
state: 'off'
|
||
- condition: numeric_state
|
||
entity_id: sensor.bathroom_area_mean_light_level
|
||
above: input_number.bathroom_light_level_threshold
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected but it''s too bright ( {{ states(''sensor.bathroom_area_mean_light_level'')
|
||
}} > {{ states(''input_number.bathroom_light_level_threshold'') }}). Skipping
|
||
turning on lights.'
|
||
title: ':bathtub: Bathroom'
|
||
debug: Debug
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.bathroom_lights
|
||
state: 'off'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected. Turning :bulb: light on.'
|
||
title: ':bathtub: Bathroom'
|
||
debug: Debug
|
||
- action: light.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: light.bathroom_lights
|
||
default:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected and :bulb: light is already on.'
|
||
title: ':bathtub: Bathroom'
|
||
debug: Debug
|
||
- action: timer.cancel
|
||
target:
|
||
entity_id: timer.bathroom_light
|
||
data: {}
|
||
mode: single
|
||
- id: '1754227694151'
|
||
alias: 'Bathroom: No Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.bathroom_area_motion
|
||
to: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 3
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- alias: Door closed
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.bathroom_door_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion detected and door closed. Skipping
|
||
turning :bulb: light off.'
|
||
title: ':bathtub: Bathroom'
|
||
debug: Debug
|
||
default:
|
||
- choose:
|
||
- alias: After midnight
|
||
conditions:
|
||
- condition: time
|
||
after: 00:00:00
|
||
- condition: time
|
||
before: 06:00:00
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion detected. Starting night :hourglass_flowing_sand:
|
||
timer.'
|
||
title: ':bathtub: Bathroom'
|
||
debug: Debug
|
||
- action: timer.start
|
||
target:
|
||
entity_id: timer.bathroom_light
|
||
data:
|
||
duration: 00:02:00
|
||
default:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion detected. Starting :hourglass_flowing_sand:
|
||
timer.'
|
||
title: ':bathtub: Bathroom'
|
||
debug: Debug
|
||
- action: timer.start
|
||
target:
|
||
entity_id: timer.bathroom_light
|
||
data:
|
||
duration: 00:05:00
|
||
mode: single
|
||
- id: '1754254675071'
|
||
alias: 'Bathroom: Light Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- light.bathroom_lights
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':bulb: Lights turned off. Cancelling light timer.'
|
||
title: ':bathtub: Bathroom'
|
||
debug: Debug
|
||
- action: timer.cancel
|
||
target:
|
||
entity_id: timer.bathroom_light
|
||
data: {}
|
||
mode: single
|
||
- id: '1754254675073'
|
||
alias: 'Bathroom: Light Switch Toggled'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.bathroom_light_input_0
|
||
conditions: []
|
||
actions:
|
||
- delay:
|
||
seconds: 1
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.bathroom_lights
|
||
state: 'on'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Light switch used
|
||
title: ':bathtub: Bathroom'
|
||
debug: Debug
|
||
- action: timer.cancel
|
||
target:
|
||
entity_id: timer.bathroom_light
|
||
data: {}
|
||
default: []
|
||
mode: single
|
||
- id: '1754254675072'
|
||
alias: 'Bathroom: Light Timer Finished'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: timer.finished
|
||
event_data:
|
||
entity_id: timer.bathroom_light
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':bulb: Light timer finished. Turning off lights.'
|
||
title: ':bathtub: Bathroom'
|
||
debug: Debug
|
||
- action: light.turn_off
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: light.bathroom_lights
|
||
mode: single
|
||
- id: '1680461746985'
|
||
alias: 'Bathroom: High Humidity'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.bathroom_motion_humidity
|
||
for:
|
||
hours: 0
|
||
minutes: 30
|
||
seconds: 0
|
||
above: 59.9
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.bathroom_window_contact
|
||
state: 'off'
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: High Humidity ({{ states('sensor.bathroom_motion_humidity') }} > 59.9%)
|
||
and window is closed.
|
||
title: ':bathtub: Bathroom'
|
||
log_level: Debug
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1601641236163'
|
||
alias: 'Bedroom: Close Blinds When Someone Is In Bed After Sunset'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.bed_occupied
|
||
from: 'off'
|
||
to: 'on'
|
||
for: 00:00:30
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
above: input_number.blind_open_position_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_blind_automations
|
||
state: 'on'
|
||
- condition: sun
|
||
after: sunset
|
||
- condition: state
|
||
entity_id: binary_sensor.bedroom_window_contact
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bed_sensor
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':sleeping_accommodation: Someone is in bed, :window: window is closed
|
||
and it''s getting late. Closing blinds.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
mode: single
|
||
- id: '1600127180656'
|
||
alias: 'Bedroom: Close Blinds Before Sunrise'
|
||
description: ''
|
||
triggers:
|
||
- trigger: sun
|
||
event: sunrise
|
||
offset: -02:00:00
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
above: input_number.blind_open_position_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.bedroom_window_contact
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :sunrise: Bedroom
|
||
blind is open and it''s nearly sunrise. Closing blinds.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
mode: single
|
||
- id: '1622667464880'
|
||
alias: 'Bedroom: Window Closed At Night'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.bedroom_window_contact
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_blind_automations
|
||
state: 'on'
|
||
- condition: sun
|
||
after: sunset
|
||
- condition: sun
|
||
before: sunrise
|
||
- not:
|
||
- condition: state
|
||
entity_id: cover.bedroom_blinds
|
||
state: closed
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':window: Window closed and it''s after :city_sunset: sunset. Closing
|
||
blinds.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.set_cover_position
|
||
data:
|
||
position: 50
|
||
mode: single
|
||
- id: '1615689096351'
|
||
alias: 'Bedroom: Window Closed And Someone Is In Bed At Night'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.bedroom_window_contact
|
||
from: 'on'
|
||
to: 'off'
|
||
for: 00:00:30
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
above: input_number.blind_open_position_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_blind_automations
|
||
state: 'on'
|
||
- condition: sun
|
||
after: sunset
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bed_sensor
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.bed_occupied
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':sleeping_accommodation: :window: Window shut, someone is in
|
||
bed ({{states(''sensor.bed_sensor'')}}) and it''s after :city_sunset:
|
||
sunset. Closing blinds.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bed_sensor
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':sleeping_accommodation: :window: Bedroom window shut, someone
|
||
is in bed ({{states(''sensor.bed_sensor'')}}) and it''s after :city_sunset:
|
||
sunset. Closing blinds.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
default: []
|
||
mode: single
|
||
- id: '1601641292576'
|
||
alias: 'Bedroom: Open Blind When No One Is In Bed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.bed_occupied
|
||
from: 'on'
|
||
to: 'off'
|
||
for: 00:00:30
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- condition: sun
|
||
after: sunrise
|
||
after_offset: -01:00:00
|
||
before: sunset
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bed_sensor
|
||
state: 'on'
|
||
actions:
|
||
- delay: 00:01:00
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'No one is in :bed: bed ({{states(''sensor.bed_sensor'')}}). Opening
|
||
the blinds."'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
mode: single
|
||
- id: '1715955339483'
|
||
alias: 'Bedroom: Door Closed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.bedroom_door_contact
|
||
to: 'off'
|
||
for:
|
||
seconds: 10
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.leos_bedroom_door_contact
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: binary_sensor.ashlees_bedroom_door_contact
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: binary_sensor.upstairs_area_motion
|
||
state: 'off'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: door closed.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'on'
|
||
then:
|
||
- action: light.turn_off
|
||
metadata: {}
|
||
data:
|
||
transition: 1
|
||
target:
|
||
entity_id: light.stairs
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.stairs_ambient
|
||
state: 'on'
|
||
then:
|
||
- action: light.turn_off
|
||
metadata: {}
|
||
data:
|
||
transition: 1
|
||
target:
|
||
entity_id: light.stairs_ambient
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.stairs_2
|
||
state: 'on'
|
||
then:
|
||
- action: light.turn_off
|
||
metadata: {}
|
||
data:
|
||
transition: 1
|
||
target:
|
||
entity_id: light.stairs_2
|
||
mode: single
|
||
- id: '1615209552353'
|
||
alias: 'Bedroom: Other Bedroom Door Opens Warning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.leos_bedroom_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
id: leo
|
||
- trigger: state
|
||
entity_id: binary_sensor.ashlees_bedroom_door_contact
|
||
id: ashlee
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: light.bedroom_lamps
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.bedroom_main_light
|
||
state: 'on'
|
||
- condition: time
|
||
after: input_datetime.childrens_bed_time
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Guest
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bed_sensor
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.bed_occupied
|
||
state: 'on'
|
||
- condition: trigger
|
||
id: leo
|
||
sequence:
|
||
- action: script.other_bedroom_door_opening_warning
|
||
data:
|
||
bedroom: leo
|
||
- conditions:
|
||
- condition: sun
|
||
after: sunset
|
||
- condition: trigger
|
||
id: leo
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':boy: :door: Leo''s door opened and bedroom light is on. Sending
|
||
warning.'
|
||
log_level: Debug
|
||
- action: script.other_bedroom_door_opening_warning
|
||
data:
|
||
bedroom: leo
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bed_sensor
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.bed_occupied
|
||
state: 'on'
|
||
- condition: trigger
|
||
id: ashlee
|
||
sequence:
|
||
- action: script.other_bedroom_door_opening_warning
|
||
data:
|
||
bedroom: ashlee
|
||
- conditions:
|
||
- condition: sun
|
||
after: sunset
|
||
- condition: trigger
|
||
id: ashlee
|
||
sequence:
|
||
- action: script.other_bedroom_door_opening_warning
|
||
data:
|
||
bedroom: ashlee
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1615209552354'
|
||
alias: 'Bedroom: Other Bedroom Door Closes Warning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.leos_bedroom_door_contact
|
||
from: 'on'
|
||
to: 'off'
|
||
id: leo
|
||
- trigger: state
|
||
entity_id: binary_sensor.ashlees_bedroom_door_contact
|
||
id: ashlee
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: light.bedroom_lamps
|
||
state: 'on'
|
||
- condition: time
|
||
after: input_datetime.childrens_bed_time
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Guest
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bed_sensor
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.bed_occupied
|
||
state: 'on'
|
||
- condition: trigger
|
||
id: leo
|
||
sequence:
|
||
- action: script.other_bedroom_door_closes_warning
|
||
data:
|
||
bedroom: leo
|
||
- conditions:
|
||
- condition: sun
|
||
after: sunset
|
||
- condition: trigger
|
||
id: leo
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':boy: :door: Leo''s door opened and bedroom light is on. Sending
|
||
warning.'
|
||
log_level: Debug
|
||
- action: script.other_bedroom_door_closes_warning
|
||
data:
|
||
bedroom: leo
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bed_sensor
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.bed_occupied
|
||
state: 'on'
|
||
- condition: trigger
|
||
id: ashlee
|
||
sequence:
|
||
- action: script.other_bedroom_door_closes_warning
|
||
data:
|
||
bedroom: ashlee
|
||
- conditions:
|
||
- condition: sun
|
||
after: sunset
|
||
- condition: trigger
|
||
id: ashlee
|
||
sequence:
|
||
- action: script.other_bedroom_door_closes_warning
|
||
data:
|
||
bedroom: ashlee
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1724001157269'
|
||
alias: 'Bedroom: Pause TV When Door Opens At Night'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.bedroom_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- or:
|
||
- condition: time
|
||
after: '22:00:00'
|
||
- condition: time
|
||
before: 02:00:00
|
||
- condition: state
|
||
entity_id: media_player.bedroom_tv
|
||
state: playing
|
||
- not:
|
||
- condition: state
|
||
entity_id: media_player.bedroom_tv
|
||
attribute: app_name
|
||
state: BBC iPlayer
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Door opened and :tv: TV was playing. Pausing TV.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: media_player.media_play_pause
|
||
target:
|
||
entity_id: media_player.bedroom_tv
|
||
data: {}
|
||
mode: single
|
||
- id: '1621713217274'
|
||
alias: 'Bedroom: Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.bedroom_motion_occupancy
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_motion_trigger
|
||
state: 'on'
|
||
- or:
|
||
- condition: template
|
||
value_template: '{{ state_attr(''light.under_bed_left'',''brightness'') == none
|
||
}}'
|
||
- condition: template
|
||
value_template: '{{ state_attr(''light.under_bed_right'',''brightness'') ==
|
||
none }}'
|
||
- condition: numeric_state
|
||
entity_id: light.under_bed_left
|
||
below: '100'
|
||
attribute: brightness
|
||
- condition: numeric_state
|
||
entity_id: light.under_bed_right
|
||
below: '100'
|
||
attribute: brightness
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
below: '31'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected and the blinds are down. Dimming
|
||
ambient :bulb: :low_brightness: lights.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.bedroom_dim_ambient_light
|
||
- conditions:
|
||
- condition: time
|
||
after: 08:00:00
|
||
- condition: sun
|
||
before: sunset
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected at :city_sunrise: sunrise. Turning
|
||
ambient :bulb: :high_brightness: lights on.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.bedroom_turn_on_ambient_light
|
||
- conditions:
|
||
- or:
|
||
- condition: sun
|
||
after: sunset
|
||
- condition: time
|
||
before: 08:00:00
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_motion_trigger
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected after :city_sunset: sunset. :bulb:
|
||
:low_brightness: Dimming ambient lights.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.bedroom_dim_ambient_light
|
||
default: []
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.bedroom_clock_matrix
|
||
state: 'off'
|
||
then:
|
||
- action: light.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id: light.bedroom_clock_matrix
|
||
mode: single
|
||
- id: '1621713867762'
|
||
alias: 'Bedroom: No Motion'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.bedroom_motion_occupancy
|
||
from: 'on'
|
||
to: 'off'
|
||
for: 00:02:00
|
||
conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: light.under_bed_left
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.under_bed_right
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_motion_trigger
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion detected For 1 minute. Turning ambient
|
||
lights off.'
|
||
title: ' :bed: Bedroom'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.bedroom_turn_off_ambient_light
|
||
mode: single
|
||
- id: '1621713867763'
|
||
alias: 'Bedroom: No Motion For Long Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.bedroom_area_motion
|
||
from: 'on'
|
||
to: 'off'
|
||
for: 00:30:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: light.bedroom_lamps
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_motion_trigger
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion detected For 1 hour. Turning clock off.'
|
||
title: ' :bed: Bedroom'
|
||
log_level: Debug
|
||
- action: light.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: light.bedroom_clock_matrix
|
||
mode: single
|
||
- id: '1725207477313'
|
||
alias: 'Bedroom: No Motion And Fan Is On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.bedroom_motion_3_presence
|
||
to: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: switch.bedroom_fan
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: switch.turn_off
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: switch.bedroom_fan
|
||
mode: single
|
||
- id: '1690844451011'
|
||
alias: 'Bedroom: Turn Off Fan'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- switch.bedroom_fan
|
||
to: 'on'
|
||
for:
|
||
hours: 2
|
||
minutes: 0
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Bedroom light turned off. Turning stairs lights off.
|
||
title: ':bed: Bedroom'
|
||
log_level: Debug
|
||
- action: switch.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: switch.bedroom_fan
|
||
mode: single
|
||
- id: '1621875409014'
|
||
alias: 'Bedroom: Morning Timed Open Blinds'
|
||
description: 'TODO: Take into account high temperature.'
|
||
triggers:
|
||
- trigger: time
|
||
at: 08:00:00
|
||
id: workday
|
||
- trigger: time
|
||
at: 08:30:00
|
||
id: 083000
|
||
- trigger: time
|
||
at: 09:00:00
|
||
id: 090000
|
||
- trigger: time
|
||
at: 09:30:00
|
||
id: 093000
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.bedroom_blind_closed_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.bedroom_tv_powered_on
|
||
state: 'off'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- alias: Working day
|
||
condition: state
|
||
entity_id: binary_sensor.workday_sensor
|
||
state: 'on'
|
||
- alias: No annual leave in calendar
|
||
condition: template
|
||
value_template: '{{ ''Danny'' not in state_attr(''calendar.work'',''message'')|string
|
||
and ''A/L'' not in state_attr(''calendar.work'',''message'')|string and
|
||
states(''calendar.work'') == ''off'' }}'
|
||
sequence:
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Opening blinds
|
||
because it''s closed on a working weekday!"'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- alias: Non workday and no children
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.workday_sensor
|
||
state: 'off'
|
||
alias: Non working day
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: trigger
|
||
id: 090000
|
||
sequence:
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Opening blinds
|
||
because it''s closed and its 09:00 on a weekend!"'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- alias: Non workday and no children
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.workday_sensor
|
||
state: 'off'
|
||
alias: Non working day
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: trigger
|
||
id: 093000
|
||
sequence:
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Opening blinds
|
||
because it''s closed, there are no children and its 09:30 on a weekend!"'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- conditions:
|
||
- condition: trigger
|
||
id: 093000
|
||
sequence:
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Opening blinds
|
||
because it''s closed and its 09:30!"'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
default: []
|
||
mode: single
|
||
- id: '1621875567853'
|
||
alias: 'Bedroom: Evening Timed Close Blinds'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: '22:00:00'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
above: input_number.blind_closed_position_threshold
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: It''s after
|
||
:city_sunset: sunset, closing bedroom''s blinds.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.bedroom_window_contact
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':window: Window is still open. Waiting until it''s closed before
|
||
closing blinds.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
default:
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
mode: single
|
||
- id: '1624194131454'
|
||
alias: 'Bedroom: TV Turned On During Bright Day'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.bedroom_tv_powered_on
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_blind_automations
|
||
state: 'on'
|
||
- condition: sun
|
||
before: sunset
|
||
after: sunrise
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
above: input_number.blind_open_position_threshold
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_direct_notifications
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.bedroom_window_contact
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_actionable_notification_with_2_buttons
|
||
data:
|
||
message: Do you want to close the blinds?
|
||
title: 📺🛌TV On & Window Is Open
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
action1_title: 'Yes'
|
||
action1_name: set_bedroom_blinds_30
|
||
action2_title: 'No'
|
||
action2_name: ignore
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.bedroom_window_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':bed: Bedroom :tv: TV turned on and it''s bright. Lowering bedroom
|
||
blinds.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.set_cover_position
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
data:
|
||
position: 20
|
||
default: []
|
||
mode: single
|
||
- id: '1699308571385'
|
||
alias: 'Bedroom: Remote Button 1'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 61ab87aac9c81fe8687771074e560f48
|
||
type: action
|
||
subtype: button_1_press_release
|
||
conditions: []
|
||
actions:
|
||
- action: light.toggle
|
||
data: {}
|
||
target:
|
||
entity_id: light.bedroom_main_light
|
||
mode: single
|
||
- id: '1699308571386'
|
||
alias: 'Bedroom: Remote Button 2'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 61ab87aac9c81fe8687771074e560f48
|
||
type: action
|
||
subtype: button_2_press_release
|
||
conditions: []
|
||
actions:
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.bedroom_lamps
|
||
state: 'off'
|
||
then:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.bedroom_desk_lamps_on
|
||
data:
|
||
transition: 1
|
||
else:
|
||
- action: light.turn_off
|
||
target:
|
||
entity_id:
|
||
- light.bedroom_lamps
|
||
- light.under_bed_left
|
||
- light.under_bed_right
|
||
data: {}
|
||
mode: single
|
||
- id: '1699308571387'
|
||
alias: 'Bedroom: Remote Button 3'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 61ab87aac9c81fe8687771074e560f48
|
||
type: action
|
||
subtype: button_3_press_release
|
||
conditions: []
|
||
actions:
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1699308571388'
|
||
alias: 'Bedroom: Remote Button 4'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 61ab87aac9c81fe8687771074e560f48
|
||
type: action
|
||
subtype: button_4_press_release
|
||
conditions: []
|
||
actions:
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1710079376648'
|
||
alias: 'Bedroom: Remote Dial Action Right'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 61ab87aac9c81fe8687771074e560f48
|
||
type: action
|
||
subtype: dial_rotate_right_slow
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 61ab87aac9c81fe8687771074e560f48
|
||
type: action
|
||
subtype: dial_rotate_right_step
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 61ab87aac9c81fe8687771074e560f48
|
||
type: action
|
||
subtype: brightness_step_up
|
||
conditions:
|
||
- condition: template
|
||
value_template: '{{ states(''sensor.bedroom_dial_remote_action_time'')|float(15)
|
||
> 0}}'
|
||
actions:
|
||
- action: light.turn_on
|
||
metadata: {}
|
||
data:
|
||
brightness: '{{ iif((state_attr(''light.bedroom_lamps'', ''brightness'')|int(0)
|
||
+ (states(''sensor.bedroom_dial_remote_action_time'')|float(15)*2)) > 255,
|
||
255, state_attr(''light.bedroom_lamps'', ''brightness'')|int(0) + states(''sensor.bedroom_dial_remote_action_time'')|float(15)*2)
|
||
}}'
|
||
transition: 1
|
||
target:
|
||
entity_id:
|
||
- light.bedroom_lamps
|
||
mode: queued
|
||
max: 10
|
||
- id: '1710079376649'
|
||
alias: 'Bedroom: Remote Dial Action Left'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 61ab87aac9c81fe8687771074e560f48
|
||
type: action
|
||
subtype: dial_rotate_left_slow
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 61ab87aac9c81fe8687771074e560f48
|
||
type: action
|
||
subtype: dial_rotate_left_step
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 61ab87aac9c81fe8687771074e560f48
|
||
type: action
|
||
subtype: brightness_step_down
|
||
conditions:
|
||
- condition: template
|
||
value_template: '{{ states(''sensor.bedroom_dial_remote_action_time'')|float(15)
|
||
> 0}}'
|
||
actions:
|
||
- action: light.turn_on
|
||
metadata: {}
|
||
data:
|
||
brightness: '{%- if states(''sensor.bedroom_dial_remote_action_time'')|float(15)*2
|
||
> state_attr(''light.bedroom_lamps'', ''brightness'')|int(0) -%} 0 {%- else
|
||
-%} {{ state_attr(''light.bedroom_lamps'', ''brightness'')|int(0) - (states(''sensor.bedroom_dial_remote_action_time'')|float(15)*2)
|
||
}} {%-endif-%}'
|
||
transition: 1
|
||
target:
|
||
entity_id:
|
||
- light.bedroom_lamps
|
||
mode: queued
|
||
max: 10
|
||
- id: '1624194439043'
|
||
alias: 'Bedroom: TV Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.bedroom_tv_powered_on
|
||
from: 'on'
|
||
to: 'off'
|
||
for: 00:01:00
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.bedroom_blind_closed_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_blind_automations
|
||
state: 'on'
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: sun
|
||
after: sunrise
|
||
- condition: time
|
||
after: 08:30
|
||
actions:
|
||
- action: weather.get_forecasts
|
||
target:
|
||
entity_id: weather.home
|
||
data:
|
||
type: hourly
|
||
response_variable: weather
|
||
- choose:
|
||
- conditions:
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: weather.home
|
||
attribute: temperature
|
||
above: input_number.forecast_high_temperature
|
||
- condition: template
|
||
value_template: '{{ weather[''weather.home''].forecast[1].temperature >
|
||
states(''input_number.forecast_high_temperature'')|float(25) }}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':tv: TV turned off but above weather is above {{ states(''input_number.forecast_high_temperature'')
|
||
}} ( {%- if state_attr(''weather.home'', ''temperature'')|float(0) > weather[''weather.home''].forecast[1].temperature|float(25)
|
||
-%} {{ state_attr(''weather.home'', ''temperature'')|float(0) }} {%- else
|
||
-%} {{ weather[''weather.home''].forecast[1].temperature }} {%-endif-%}
|
||
{{ state_attr(''weather.home'', ''temperature_unit'') }} ). Keeping blinds
|
||
closed.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
default:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':tv: TV turned off. Opening Blinds.'
|
||
title: ':bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
mode: single
|
||
- id: '1627285063813'
|
||
alias: 'Leo''s Bedroom: Timed Open Blinds Weekday'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 07:45:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: cover.leos_bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Guest
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: state
|
||
entity_id: binary_sensor.workday_sensor
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Opening blinds.
|
||
title: ':bed: Leo''s Bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
mode: single
|
||
- id: '1627285063816'
|
||
alias: 'Leo''s Bedroom: Timed Open Blinds Weekend'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 08:00:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: cover.leos_bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Guest
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: state
|
||
entity_id: binary_sensor.workday_sensor
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Opening blinds.
|
||
title: ':bed: Leo''s Bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
mode: single
|
||
- id: '1627285063814'
|
||
alias: 'Leo''s Bedroom: Timed Open Blinds Weekend No Children Mode'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 09:00:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_blind_automations
|
||
state: 'off'
|
||
- condition: numeric_state
|
||
entity_id: cover.leos_bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- condition: state
|
||
state: No Children
|
||
entity_id: input_select.home_mode
|
||
- condition: state
|
||
state: 'on'
|
||
entity_id: binary_sensor.workday_sensor
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Opening blinds with {{ states('input_select.home_mode') }} on a non
|
||
working day.
|
||
title: ':bed: Leo''s Bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
mode: single
|
||
- id: '1629844319596'
|
||
alias: 'Leo''s Bedroom: Timed Close Blinds'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: input_datetime.childrens_bed_time
|
||
- trigger: time
|
||
at: '22:00:00'
|
||
id: no_children
|
||
conditions:
|
||
- not:
|
||
- condition: numeric_state
|
||
entity_id: cover.leos_bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_blind_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.leos_bedroom_window_contact
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :clock{{ now().strftime(''%I'') | int }}{% if now().minute
|
||
| int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :city_sunset:
|
||
:window: Leo''s window is open. Skipping closing blinds. :warning:'
|
||
title: 'Leo''s :bed: bedroom'
|
||
log_level: Debug
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: trigger
|
||
id: no_children
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute |
|
||
int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :window:
|
||
Closing Leo''s blinds'
|
||
title: 'Leo''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.leos_bedroom_window_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute |
|
||
int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :window:
|
||
Closing Leo''s blinds'
|
||
title: 'Leo''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
default: []
|
||
mode: single
|
||
- id: '1617376203344'
|
||
alias: 'Leo''s Room: Close Blinds Before Sun Rise'
|
||
description: ''
|
||
triggers:
|
||
- trigger: sun
|
||
event: sunrise
|
||
offset: -02:00:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: cover.leos_bedroom_blinds
|
||
state: open
|
||
- condition: numeric_state
|
||
entity_id: cover.leos_bedroom_blinds
|
||
attribute: current_position
|
||
above: input_number.blind_open_position_threshold
|
||
- condition: state
|
||
entity_id: binary_sensor.leos_bedroom_window_contact
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':city_sunset: :window: closing Leo''s blinds.'
|
||
title: 'Leo''s :bed: bedroom'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1617376413056'
|
||
alias: 'Leo''s Room: Open Blinds In The Morning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 09:30:00
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.leos_bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_blind_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':sunrise: :window: Opening Leo''s blinds'
|
||
title: 'Leo''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
mode: single
|
||
- id: '1617458869658'
|
||
alias: 'Leo''s Room: Open Blinds In The Morning When No One Is In Bed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.leos_bed_occupied
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions:
|
||
- condition: time
|
||
after: 07:00:00
|
||
before: '12:00:00'
|
||
- condition: numeric_state
|
||
entity_id: cover.leos_bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_bed_sensor
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Guest
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':window: :bed: Someone is in Leo''s bed. Closing blinds.'
|
||
title: 'Leo''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
mode: single
|
||
- id: '1619254173098'
|
||
alias: 'Leo''s Room: Window Closed At Night'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.leos_bedroom_window_contact
|
||
to: 'off'
|
||
from: 'on'
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.leos_bedroom_blinds
|
||
attribute: current_position
|
||
above: input_number.blind_open_position_threshold
|
||
- condition: time
|
||
after: '18:30:00'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_blind_automations
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_bed_sensor
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.leos_bed_occupied
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':window: :bed: Leo''s window closed and someone is in bed. Closing
|
||
blinds.'
|
||
title: 'Leo''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_bed_sensor
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':window: :bed: Leo''s window closed and someone is in bed. Closing
|
||
blinds.'
|
||
title: 'Leo''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.leos_bedroom_blinds
|
||
default: []
|
||
mode: single
|
||
- id: '1699308571381'
|
||
alias: 'Leo''s Bedroom: Remote Turn On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 7da5565cc39ea45df83d982a085622b6
|
||
type: action
|
||
subtype: on_press_release
|
||
conditions: []
|
||
actions:
|
||
- action: light.turn_on
|
||
target:
|
||
entity_id: light.leos_bedroom_main_light
|
||
data: {}
|
||
mode: single
|
||
- id: '1699308571382'
|
||
alias: 'Leo''s Bedroom: Remote Turn Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 7da5565cc39ea45df83d982a085622b6
|
||
type: action
|
||
subtype: off_press_release
|
||
conditions: []
|
||
actions:
|
||
- action: light.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: light.leos_bedroom_main_light
|
||
mode: single
|
||
- id: '1699308571383'
|
||
alias: 'Leo''s Bedroom: Remote Up'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 7da5565cc39ea45df83d982a085622b6
|
||
type: action
|
||
subtype: up_press_release
|
||
conditions: []
|
||
actions:
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1699308571384'
|
||
alias: 'Leo''s Bedroom: Remote Down'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 7da5565cc39ea45df83d982a085622b6
|
||
type: action
|
||
subtype: down_press_release
|
||
conditions: []
|
||
actions:
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1605925028960'
|
||
alias: 'Ashlee''s Bedroom: Timed Close Blinds'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: input_datetime.childrens_bed_time
|
||
- trigger: time
|
||
at: '22:00:00'
|
||
id: no_children
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
attribute: current_position
|
||
above: input_number.blind_closed_position_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_blind_automations
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- alias: Window is still open
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.ashlees_bedroom_window_contact
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :clock{{ now().strftime(''%I'') | int }}{% if now().minute
|
||
| int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :window:
|
||
Ashlee''s window is still open. Waiting until it''s closed before closing
|
||
blinds. :warning:'
|
||
title: 'Ashlee''s :bed: bedroom'
|
||
log_level: Debug
|
||
- alias: No children mode
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: trigger
|
||
id: no_children
|
||
- condition: state
|
||
entity_id: binary_sensor.ashlees_bedroom_window_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':city_sunset: :window: It''s getting dark, closing Ashlee''s blinds.'
|
||
title: 'Ashlee''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
- alias: Bed sensor enabled
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_bed_sensor
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.ashlees_bedroom_window_contact
|
||
state: 'off'
|
||
- condition: trigger
|
||
id: sunset
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :city_sunset:
|
||
:window: It''s getting dark and no one is in Ashlee''s :bed: bed, closing
|
||
Ashlee''s blinds.'
|
||
title: 'Ashlee''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
- alias: Bed sensor is off
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.ashlees_bedroom_window_contact
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_bed_sensor
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :city_sunset:
|
||
:window: It''s getting dark, closing Ashlee''s blinds.'
|
||
title: 'Ashlee''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
default: []
|
||
mode: single
|
||
- id: '1622891806607'
|
||
alias: 'Ashlee''s Bedroom: Window Closed After Dark'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.ashlees_bedroom_window_contact
|
||
from: 'on'
|
||
to: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
attribute: current_position
|
||
above: input_number.bedroom_blind_closed_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_blind_automations
|
||
state: 'on'
|
||
- condition: time
|
||
after: input_datetime.childrens_bed_time
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':window: Window closed and it''s dark. Closing blinds.'
|
||
title: 'Ashlee''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1599994669457'
|
||
alias: 'Ashlee''s Bedroom: Open Blinds In The Morning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 08:00:00
|
||
id: early
|
||
- trigger: time
|
||
at: 09:00:00
|
||
id: late
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_blind_automations
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Guest
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.workday_sensor
|
||
state: 'off'
|
||
- condition: trigger
|
||
id: late
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute |
|
||
int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :sunrise:
|
||
:window: School day. Opening Ashlee''s blinds'
|
||
title: 'Ashlee''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.workday_sensor
|
||
state: 'on'
|
||
- condition: trigger
|
||
id: early
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute |
|
||
int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :sunrise:
|
||
:window: Non school day. Opening Ashlee''s blinds'
|
||
title: 'Ashlee''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
default: []
|
||
mode: single
|
||
- id: '1599994669458'
|
||
alias: 'Ashlee''s Bedroom: Open Blinds In The Morning No Children Mode'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 08:00:00
|
||
id: workday
|
||
- trigger: time
|
||
at: 09:00:00
|
||
id: non_workday
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
state: 'off'
|
||
entity_id: binary_sensor.workday_sensor
|
||
- condition: trigger
|
||
id: workday
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :window: Opening
|
||
blinds with {{ states(''input_select.home_mode'') }} on a non working
|
||
day.'
|
||
title: 'Ashlee''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
- conditions:
|
||
- condition: state
|
||
state: 'on'
|
||
entity_id: binary_sensor.workday_sensor
|
||
- condition: trigger
|
||
id: non_workday
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :window: Opening
|
||
blinds with {{ states(''input_select.home_mode'') }} on a working day.'
|
||
title: 'Ashlee''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
default: []
|
||
mode: single
|
||
- id: '1655237597647'
|
||
alias: 'Ashlee''s Bedroom: Someone Is In Bed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.ashlees_bed_occupied
|
||
from: 'off'
|
||
to: 'on'
|
||
for:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 30
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_bed_sensor
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- or:
|
||
- condition: time
|
||
after: input_datetime.childrens_bed_time
|
||
- condition: time
|
||
before: 05:00:00
|
||
- condition: state
|
||
entity_id: binary_sensor.ashlees_bedroom_window_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Someone is in Ashlee''s :bed: bed after :clock730:. Closing
|
||
blinds.'
|
||
title: 'Ashlee''s :bed: bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
data: {}
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
default: []
|
||
mode: single
|
||
- id: '1655235874989'
|
||
alias: 'Ashlee''s Bedroom: Turn Off Fan After 1 Hour'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- switch.ashlees_bedroom_fan
|
||
to: 'on'
|
||
for:
|
||
hours: 1
|
||
minutes: 0
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':fan: Fan has been on for an hour. Turning fan off.'
|
||
title: ':bed: Ashlee''s bedroom'
|
||
log_level: Debug
|
||
- action: switch.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: switch.ashlees_bedroom_fan
|
||
mode: single
|
||
- id: '1656355431188'
|
||
alias: 'Ashlee''s Bedroom: Hue Remote On Button'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 43598aa0e01c65b2bfc26491940f3353
|
||
type: action
|
||
subtype: on_press_release
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Power button pressed. :bulb: Toggling light.'
|
||
title: ':bed: Ashlee''s Bedroom'
|
||
log_level: Debug
|
||
- action: light.toggle
|
||
data: {}
|
||
target:
|
||
entity_id: light.ashlees_bedroom_main_light
|
||
mode: queued
|
||
max: 10
|
||
- id: '1656355431189'
|
||
alias: 'Ashlee''s Bedroom: Hue Remote Up Button'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 43598aa0e01c65b2bfc26491940f3353
|
||
type: action
|
||
subtype: up_press_release
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Bright button on remote pressed. Opening :window: Ashlee''s blinds.'
|
||
title: ':bed: Ashlee''s Bedroom'
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
data: {}
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
mode: queued
|
||
max: 10
|
||
- id: '1656355431190'
|
||
alias: 'Ashlee''s Bedroom: Hue Remote Down Button'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 43598aa0e01c65b2bfc26491940f3353
|
||
type: action
|
||
subtype: down_press_release
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Dim button on remote pressed. Closing :window: Ashlee''s blinds.'
|
||
title: ':bed: Ashlee''s Bedroom'
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
data: {}
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
mode: queued
|
||
max: 10
|
||
- id: '1656355431191'
|
||
alias: 'Ashlee''s Bedroom: Hue Remote Off Button'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 43598aa0e01c65b2bfc26491940f3353
|
||
type: action
|
||
subtype: off_press_release
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Hue button on remote pressed. Toggle Ashlee''s main :bulb: light.'
|
||
title: ':bed: Ashlee''s Bedroom'
|
||
log_level: Debug
|
||
- action: light.toggle
|
||
data: {}
|
||
target:
|
||
entity_id: light.ashlees_bedroom_main_light
|
||
mode: queued
|
||
max: 10
|
||
- id: '1714779045289'
|
||
alias: 'Bin: Taken Out'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.bin_estimated_distance
|
||
for:
|
||
hours: 1
|
||
minutes: 0
|
||
seconds: 0
|
||
above: 7
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Taken out.
|
||
title: Bin
|
||
people:
|
||
entity_id: person.danny
|
||
mode: single
|
||
- id: '1654008759007'
|
||
alias: 'Calendar: Family'
|
||
description: https://community.home-assistant.io/t/how-to-calculate-subtract-two-date-time-from-eachother/8197/6
|
||
trace:
|
||
stored_traces: 20
|
||
triggers:
|
||
- trigger: calendar
|
||
event: start
|
||
entity_id: calendar.family
|
||
offset: '-1:0:0'
|
||
conditions: []
|
||
actions:
|
||
- action: script.calendar_event_started
|
||
data:
|
||
calendar_id:
|
||
entity_id:
|
||
- calendar.family
|
||
mode: queued
|
||
- id: '1654008759008'
|
||
alias: 'Calendar: Children Start Event'
|
||
description: https://community.home-assistant.io/t/how-to-calculate-subtract-two-date-time-from-eachother/8197/6
|
||
trace:
|
||
stored_traces: 20
|
||
triggers:
|
||
- trigger: calendar
|
||
event: start
|
||
entity_id: calendar.tsang_children
|
||
offset: '-1:0:0'
|
||
conditions: []
|
||
actions:
|
||
- action: script.calendar_event_started
|
||
data:
|
||
calendar_id:
|
||
entity_id:
|
||
- calendar.tsang_children
|
||
mode: queued
|
||
- id: '1654008759009'
|
||
alias: 'Calendar: Children End Event'
|
||
description: https://community.home-assistant.io/t/how-to-calculate-subtract-two-date-time-from-eachother/8197/6
|
||
trace:
|
||
stored_traces: 20
|
||
triggers:
|
||
- trigger: calendar
|
||
event: end
|
||
entity_id: calendar.tsang_children
|
||
offset: -0:30:0
|
||
conditions: []
|
||
actions:
|
||
- action: script.calendar_event_ended
|
||
data:
|
||
calendar_id:
|
||
entity_id:
|
||
- calendar.tsang_children
|
||
mode: queued
|
||
- id: '1647307174048'
|
||
alias: 'Stairs: Check Magic Mirror Is Casting Home Assistant'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time_pattern
|
||
minutes: '0'
|
||
conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: guest
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: home
|
||
- not:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_away
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Casting Home Assistant.
|
||
title: ':mirror: Magic Mirror'
|
||
log_level: Debug
|
||
- action: cast.show_lovelace_view
|
||
data:
|
||
entity_id: media_player.stairs_chromecast
|
||
dashboard_path: lovelace-magicmirror
|
||
view_path: home
|
||
mode: single
|
||
- id: '1672397019959'
|
||
alias: 'Chromecast: Google TV Turned Playing'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- media_player.lounge_tv
|
||
- media_player.bedroom_tv
|
||
to: playing
|
||
- trigger: state
|
||
entity_id:
|
||
- media_player.lounge_tv
|
||
- media_player.bedroom_tv
|
||
attribute: media_title
|
||
to: playing
|
||
- trigger: state
|
||
entity_id:
|
||
- media_player.lounge_tv
|
||
- media_player.bedroom_tv
|
||
attribute: app_name
|
||
to: playing
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ state_attr(trigger.entity_id, ''media_position'') != none
|
||
}}'
|
||
sequence:
|
||
- action: script.google_tv_playing_notification
|
||
data:
|
||
entity_id: '{{ trigger.entity_id }}'
|
||
mode: queued
|
||
max: 10
|
||
- id: '1650387098757'
|
||
alias: 'Deebot: Error'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: vacuum.t8
|
||
to: error
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :robot_face: :broom: Vacuum has encountered an error :warning:'
|
||
title: ':robot_face: :broom: Vacuum'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1650387098756'
|
||
alias: 'Deebot: Fully Charged'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: vacuum.t8
|
||
above: '99'
|
||
attribute: battery_level
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':battery: Fully charged'
|
||
title: ':robot_face: :broom: Vacuum'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1654865901253'
|
||
alias: 'Deebot: Finished Cleaning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- vacuum.t8
|
||
to: docked
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
not_from: unavailable
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_home_log_with_url
|
||
data:
|
||
message: Cleaning complete
|
||
title: ':robot_face: :broom: Vacuum'
|
||
url: '{{ states(''input_text.external_url'') }}{{ state_attr(''image.t8_map'',''entity_picture'')
|
||
}}'
|
||
mode: single
|
||
- id: '1610234394136'
|
||
alias: 'Conservatory: Motion Detected And It''s Dark'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.conservatory_area_motion
|
||
- binary_sensor.conservatory_motion_occupancy
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.conservatory_motion_illuminance
|
||
below: input_number.conservatory_light_level_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_conservatory_motion_trigger
|
||
state: 'on'
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: light.conservatory
|
||
attribute: brightness
|
||
below: '9'
|
||
- condition: template
|
||
value_template: '{{ state_attr(''light.conservatory'', ''brightness'') == none
|
||
}}'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected and it''s dark ({{ states(''sensor.conservatory_motion_illuminance'',
|
||
with_unit=True) }} < ({{ states(''input_number.conservatory_light_level_threshold'',
|
||
with_unit=True) }}). Turning :bulb: :high_brightness: light on.'
|
||
title: Conservatory
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.conservatory_turn_on_light
|
||
data:
|
||
transition: 2
|
||
mode: single
|
||
- id: '1610234794461'
|
||
alias: 'Conservatory: No Motion Detected Dim Lights'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
to: 'off'
|
||
for: 00:01:00
|
||
entity_id: binary_sensor.conservatory_area_motion
|
||
from: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: light.conservatory
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_conservatory_motion_trigger
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion. :bulb: :low_brightness: Dimming lights.'
|
||
title: Conservatory
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.conservatory_dim_light
|
||
data:
|
||
transition: 2
|
||
mode: single
|
||
- id: '1610238960657'
|
||
alias: 'Conservatory: No Motion Turning Turn Lights Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.conservatory_area_motion
|
||
to: 'off'
|
||
for: 00:01:30
|
||
conditions:
|
||
- condition: state
|
||
entity_id: light.conservatory
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_conservatory_motion_trigger
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion. Turning lights off.'
|
||
title: Conservatory
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.conservatory_turn_off_light
|
||
data:
|
||
transition: 2
|
||
mode: single
|
||
- id: '1629146628067'
|
||
alias: 'Conservatory: Person Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.conservatory_person_detected
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_away
|
||
actions:
|
||
- action: camera.snapshot
|
||
data_template:
|
||
filename: '{{ states(''input_text.latest_frigate_conservatory_person_file_path'')
|
||
}}'
|
||
target:
|
||
entity_id: camera.conservatory_high_resolution_channel
|
||
- action: script.send_home_log_with_local_attachments
|
||
data_template:
|
||
message: Frigate detected a person in the conservatory.
|
||
title: Person detected in conservatory
|
||
log_level: Normal
|
||
filePath: '{{ states(''input_text.latest_frigate_conservatory_person_file_path'')
|
||
}}'
|
||
mode: queued
|
||
max: 10
|
||
- id: '1628985027639'
|
||
alias: 'Conservatory: Door Open'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.conservatory_door
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: Door opened.'
|
||
title: Conservatory
|
||
log_level: Debug
|
||
- if:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: climate.thermostat
|
||
state: 'off'
|
||
then:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turning off the heating.
|
||
title: Conservatory
|
||
log_level: Debug
|
||
- action: script.set_central_heating_to_off
|
||
data: {}
|
||
mode: single
|
||
- id: '1628985156167'
|
||
alias: 'Conservatory: Door Closed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.conservatory_door
|
||
to: 'off'
|
||
from: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: Conservatory door closed.'
|
||
log_level: Debug
|
||
- action: script.set_central_heating_to_home_mode
|
||
data: {}
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.shed_door
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.back_garden_gate_contact
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':door: Door closed. :hut: shed :door: door and gate is still
|
||
open.'
|
||
title: Conservatory
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.shed_door
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':door: Door closed and :hut: shed :door: door is still open.'
|
||
title: Conservatory
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.back_garden_gate_contact
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':door: Door closed and gate is still open.'
|
||
title: Conservatory
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
default: []
|
||
mode: single
|
||
- id: '1733767153966'
|
||
alias: 'Conservatory: Turn On Airer'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.conservatory_airer_schedule_1
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_conservatory_airer_schedule
|
||
state: 'on'
|
||
actions:
|
||
- action: script.check_conservatory_airer
|
||
data: {}
|
||
mode: single
|
||
- id: '1733767153967'
|
||
alias: 'Conservatory: Turn Off Airer'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.conservatory_airer_schedule_1
|
||
to: 'off'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_conservatory_airer_schedule
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
metadata: {}
|
||
data:
|
||
log_level: Normal
|
||
message: Airer schedule 1 is off. Turning airer off.
|
||
title: Conservatory
|
||
- action: switch.turn_off
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: switch.airer
|
||
mode: single
|
||
- id: '1689437015870'
|
||
alias: 'EcoFlow: Solar Below House Consumption'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.ecoflow_solar_excess
|
||
below: 0
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
conditions:
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: sensor.octopus_energy_electricity_current_rate
|
||
above: sensor.octopus_energy_electricity_export_current_rate
|
||
- condition: state
|
||
entity_id: sensor.octopus_energy_electricity_current_rate
|
||
state: unavailable
|
||
- or:
|
||
- and:
|
||
- condition: numeric_state
|
||
entity_id: number.ecoflow_kitchen_backup_reserve_level
|
||
above: input_number.ecoflow_kitchen_minimum_backup_reserve
|
||
- condition: state
|
||
entity_id: switch.ecoflow_kitchen_backup_reserve_enabled
|
||
state: 'on'
|
||
- and:
|
||
- condition: numeric_state
|
||
entity_id: number.ecoflow_office_backup_reserve_level
|
||
above: input_number.ecoflow_office_minimum_backup_reserve
|
||
- condition: state
|
||
entity_id: switch.ecoflow_office_backup_reserve_enabled
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ecoflow_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.ecoflow_check_charging_mode
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
- if:
|
||
- condition: state
|
||
entity_id: timer.check_solar_excess
|
||
state: active
|
||
then:
|
||
- action: timer.cancel
|
||
data: {}
|
||
target:
|
||
entity_id: timer.check_solar_excess
|
||
mode: restart
|
||
- id: '1689437015871'
|
||
alias: 'EcoFlow: Solar Above House Consumption'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.ecoflow_solar_excess
|
||
above: input_number.ecoflow_charge_solar_threshold
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
- trigger: event
|
||
event_type: timer.finished
|
||
event_data:
|
||
entity_id: timer.check_solar_excess
|
||
conditions:
|
||
- condition: state
|
||
entity_id: switch.ecoflow_kitchen_backup_reserve_enabled
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ecoflow_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.ecoflow_check_charging_mode
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
- choose:
|
||
- conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.grid_power
|
||
below: 0
|
||
- not:
|
||
- condition: state
|
||
entity_id: timer.check_solar_excess
|
||
state: active
|
||
sequence:
|
||
- action: timer.start
|
||
data:
|
||
duration: 00:05:00
|
||
target:
|
||
entity_id: timer.check_solar_excess
|
||
mode: queued
|
||
max: 10
|
||
- id: '1695566530591'
|
||
alias: 'EcoFlow: Battery Low And Plug Is Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.ecoflow_kitchen_battery_level
|
||
below: sensor.ecoflow_kitchen_minimum_backup_reserve_low_threshold
|
||
- trigger: numeric_state
|
||
entity_id: sensor.ecoflow_office_battery_level
|
||
below: sensor.ecoflow_office_minimum_backup_reserve_low_threshold
|
||
conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: switch.ecoflow_kitchen_plug
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: switch.ecoflow_office_plug
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ecoflow_automations
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.entity_id == ''sensor.ecoflow_kitchen_battery_level''}}'
|
||
- condition: state
|
||
entity_id: switch.ecoflow_kitchen_plug
|
||
state: 'off'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Fridge Freezer switch is off and battery level ({{ states('sensor.ecoflow_kitchen_battery_level')
|
||
}}) below minimum ({{ states('sensor.ecoflow_kitchen_minimum_backup_reserve_low_threshold')
|
||
}}). Turning on.
|
||
title: EcoFlow
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- action: switch.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: switch.ecoflow_kitchen_plug
|
||
- action: script.ecoflow_set_charge_rate
|
||
data:
|
||
entity_id: number.ecoflow_kitchen_ac_charging_power
|
||
target_charge_rate: 200
|
||
- action: script.ecoflow_set_backup_reserve
|
||
data:
|
||
entity_id: number.ecoflow_kitchen_backup_reserve_level
|
||
target_reserve_amount: '{{ states(''input_number.ecoflow_kitchen_minimum_backup_reserve'')
|
||
}}'
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.entity_id == ''sensor.ecoflow_office_battery_level''}}'
|
||
- condition: state
|
||
entity_id: switch.ecoflow_office_plug
|
||
state: 'off'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Office switch is off and battery level ({{ states('sensor.ecoflow_office_battery_level')
|
||
}}) below minimum ({{ states('sensor.ecoflow_office_minimum_backup_reserve_low_threshold')
|
||
}}). Turning on.
|
||
title: EcoFlow
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- action: switch.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: switch.ecoflow_office_plug
|
||
default: []
|
||
mode: single
|
||
- id: '1719062430507'
|
||
alias: 'EcoFlow: Kitchen Plug Offline'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.ecoflow_kitchen_battery_level
|
||
below: sensor.ecoflow_kitchen_minimum_backup_reserve_low_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ecoflow_automations
|
||
state: 'on'
|
||
- condition: or
|
||
conditions:
|
||
- condition: state
|
||
entity_id: switch.ecoflow_kitchen_plug
|
||
state: unavailable
|
||
- condition: state
|
||
entity_id: switch.ecoflow_kitchen_plug
|
||
state: unknown
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
title: EcoFlow
|
||
message: Kitchen plug is offline!
|
||
mode: single
|
||
- id: '1719062430508'
|
||
alias: 'EcoFlow: Office Plug Offline'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.ecoflow_office_battery_level
|
||
below: sensor.ecoflow_office_minimum_backup_reserve_low_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ecoflow_automations
|
||
state: 'on'
|
||
- condition: or
|
||
conditions:
|
||
- condition: state
|
||
entity_id: switch.ecoflow_office_plug
|
||
state: unavailable
|
||
- condition: state
|
||
entity_id: switch.ecoflow_office_plug
|
||
state: unknown
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
title: EcoFlow
|
||
message: Office plug is offline!
|
||
mode: single
|
||
- id: '1719061926981'
|
||
alias: 'Ecoflow: Kitchen Battery Low And Switch Comes Online'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- switch.ecoflow_kitchen_plug
|
||
from: unavailable
|
||
to: 'off'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ecoflow_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: sensor.ecoflow_kitchen_battery_level
|
||
below: sensor.ecoflow_kitchen_minimum_backup_reserve_low_threshold
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
title: EcoFlow
|
||
message: Kitchen Battery Below minimum threshold {{ states('sensor.ecoflow_kitchen_battery_level')
|
||
}}({{ states('sensor.ecoflow_kitchen_minimum_backup_reserve_low_threshold')
|
||
}}) and switch has become available. Turning switch on.
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- action: switch.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id: switch.ecoflow_kitchen_plug
|
||
mode: single
|
||
- id: '1719061926982'
|
||
alias: 'Ecoflow: Office Battery Low And Switch Comes Online'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- switch.ecoflow_office_plug
|
||
from: unavailable
|
||
to: 'off'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ecoflow_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: sensor.ecoflow_office_battery_level
|
||
below: sensor.ecoflow_office_minimum_backup_reserve_low_threshold
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
title: EcoFlow
|
||
message: Office Battery Below minimum threshold {{ states('sensor.ecoflow_office_battery_level')
|
||
}}({{ states('sensor.ecoflow_office_minimum_backup_reserve_low_threshold')
|
||
}}) and switch has become available. Turning switch on.
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- action: switch.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id: switch.ecoflow_office_plug
|
||
mode: single
|
||
- id: '1714563193661'
|
||
alias: 'EcoFlow: Battery Ultra Low And Plug Is Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.ecoflow_kitchen_battery_level
|
||
below: 6
|
||
conditions:
|
||
- condition: state
|
||
entity_id: switch.ecoflow_kitchen_plug
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Ecoflow battery is ultra low and unable to turn the plug on.
|
||
title: ':cook: Kitchen'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1714641195916'
|
||
alias: 'Ecoflow: Goes Offline'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.ecoflow_kitchen_main_battery_level
|
||
to: unknown
|
||
for:
|
||
minutes: 30
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.ecoflow_kitchen_main_battery_level
|
||
to: unavailable
|
||
for:
|
||
minutes: 30
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ecoflow_automations
|
||
state: 'on'
|
||
actions:
|
||
- if:
|
||
- condition: state
|
||
entity_id: switch.ecoflow_kitchen_plug
|
||
state: 'off'
|
||
then:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Kitchen has been offline for more than 30 minutes and the plug
|
||
is switched off. Turning Fridge Freeze plug on.
|
||
title: EcoFlow
|
||
log_level: Debug
|
||
- action: switch.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: switch.ecoflow_kitchen_plug
|
||
mode: single
|
||
- id: '1734262347581'
|
||
alias: 'Ecoflow: No Power Drawn By Device'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.ecoflow_kitchen_power_over_12_hours
|
||
below: 9.9
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Check Ecoflow In the kitchen for power.
|
||
title: Kitchen
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1745329568830'
|
||
alias: 'Ecoflow: Sunset'
|
||
description: ''
|
||
triggers:
|
||
- trigger: sun
|
||
event: sunset
|
||
conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
actions:
|
||
- parallel:
|
||
- action: script.ecoflow_office_turn_off_plug
|
||
data: {}
|
||
- action: script.ecoflow_kitchen_turn_off_plug
|
||
data: {}
|
||
mode: single
|
||
- id: '1713094180264'
|
||
alias: 'Ecowitt: Offline'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.gw2000a_dewpoint
|
||
for:
|
||
minutes: 3
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.gw2000a_solar_lux
|
||
to: unavailable
|
||
for:
|
||
minutes: 1
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
metadata: {}
|
||
data:
|
||
message: Ecowitt GW2000A({{ trigger.entity_id }}) has frozen or is unavailable.
|
||
Rebooting.
|
||
title: Ecowitt
|
||
log_level: Debug
|
||
- sequence:
|
||
- action: switch.turn_off
|
||
target:
|
||
entity_id: switch.gw2000a_plug
|
||
data: {}
|
||
- delay:
|
||
seconds: 2
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.gw2000a_plug
|
||
data: {}
|
||
mode: single
|
||
- id: '1677762423485'
|
||
alias: 'Energy: Eddi Diverting Energy'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.myenergi_eddi_status
|
||
to: Diverting
|
||
conditions:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.myenergi_eddi_energy_consumed_session_daily
|
||
state: unknown
|
||
- condition: state
|
||
entity_id: input_boolean.enable_hot_water_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_eddi_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':fuelpump: Eddi diverting energy.
|
||
|
||
It has diverted {{ states(''sensor.myenergi_eddi_energy_consumed_session_daily'',
|
||
with_unit=True) }} so far.'
|
||
title: myEnergi
|
||
log_level: Debug
|
||
mode: queued
|
||
max: 10
|
||
- id: '1685005214749'
|
||
alias: 'HVAC: Eddi Turn On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 00:00:00
|
||
- trigger: time
|
||
at: '13:00:00'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: select.myenergi_eddi_operating_mode
|
||
state: Stopped
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
- condition: state
|
||
entity_id: input_boolean.enable_hot_water_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_eddi_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Turning :fuelpump:
|
||
Eddi back on.'
|
||
title: myEnergi
|
||
log_level: Debug
|
||
- action: timer.cancel
|
||
target:
|
||
entity_id: timer.eddi_max_temperature_reached
|
||
data: {}
|
||
- action: select.select_option
|
||
data:
|
||
option: Normal
|
||
target:
|
||
entity_id: select.myenergi_eddi_operating_mode
|
||
mode: single
|
||
- id: '1678578286486'
|
||
alias: 'HVAC: Eddi Generated Hot Water And Hot Water Is On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.myenergi_eddi_energy_consumed_per_heating_cycle
|
||
above: input_number.hot_water_solar_diverter_boiler_cut_off
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_hot_water_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: water_heater.thermostat
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_eddi_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Eddi has heated enough hot water {{ states(''sensor.myenergi_eddi_energy_consumed_per_heating_cycle'')
|
||
}} in the last 6 hours (> {{ states(''input_number.hot_water_solar_diverter_boiler_cut_off'')|float(0)
|
||
}}) {{ state_attr(''sensor.myenergi_eddi_energy_consumed_session'', ''unit_of_measurement'')
|
||
}} and the hot water is on.
|
||
|
||
Turning off hot water.'
|
||
title: ':hotsprings: Central Heating'
|
||
log_level: Normal
|
||
- action: script.set_hot_water_to_home_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1712238362391'
|
||
alias: 'Eddi: Max Temperature Reached'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.myenergi_eddi_status
|
||
to: Max temp reached
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_hot_water_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_eddi_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
metadata: {}
|
||
data:
|
||
message: Hot water tank reached max temperature.
|
||
title: Eddi
|
||
log_level: Debug
|
||
- action: timer.start
|
||
target:
|
||
entity_id: timer.eddi_max_temperature_reached
|
||
data:
|
||
duration: 04:00:00
|
||
- action: script.hvac_check_eddi_boost_hot_water
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
mode: single
|
||
- id: '1694521590171'
|
||
alias: 'Front Garden: Doorbell Pressed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- event.front_door_ding
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Someone pressed the door bell.
|
||
title: Porch
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
- action: script.alexa_announce
|
||
data:
|
||
message: Ding dong.
|
||
- action: input_boolean.turn_on
|
||
target:
|
||
entity_id: input_boolean.wait_for_doorbell_camera_update
|
||
- alias: Delayed notification
|
||
sequence:
|
||
- action: todo.get_items
|
||
target:
|
||
entity_id:
|
||
- todo.shared_notifications
|
||
data:
|
||
status: needs_action
|
||
response_variable: todo_list
|
||
- if:
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: not_home
|
||
- alias: Does not already exist
|
||
condition: template
|
||
value_template: '{%- for t in todo_list[''todo.shared_notifications''][''items'']
|
||
-%} {%- if t.summary == '':door: :bell: Someone rung the door bell.''
|
||
-%} {{ false }} {%- break -%} {%- endif-%} {%- endfor -%}'
|
||
then:
|
||
- action: todo.add_item
|
||
data:
|
||
item: ':door: :bell: Someone rung the door bell.'
|
||
target:
|
||
entity_id: todo.shared_notifications
|
||
- alias: Take picture
|
||
sequence:
|
||
- wait_for_trigger:
|
||
- trigger: state
|
||
entity_id:
|
||
- camera.front_door
|
||
timeout:
|
||
minutes: 1
|
||
continue_on_timeout: false
|
||
- action: script.send_direct_notification_with_url
|
||
data:
|
||
message: Door bell pressed
|
||
title: Front Door
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
url: '{{ state_attr(''camera.front_door'', ''entity_picture'') }}'
|
||
url_type: image
|
||
- action: script.send_direct_notification_with_url
|
||
data:
|
||
message: Door bell pressed
|
||
title: Front Door
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
url: '{{ state_attr(''camera.front_door'', ''video_url'') }}'
|
||
url_type: video
|
||
mode: single
|
||
- id: '1621070004545'
|
||
alias: 'Front Garden: Doorbell Camera Updated'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: camera.front_door
|
||
not_to: unavailable
|
||
conditions:
|
||
- condition: template
|
||
value_template: '{{ state_attr(''camera.front_door'', ''last_video_id'') | string
|
||
!= states(''input_text.doorbell_last_video_id'') | string}}'
|
||
actions:
|
||
- action: downloader.download_file
|
||
data:
|
||
url: '{{ state_attr(''camera.front_door'', ''video_url'') }}'
|
||
subdir: front_door
|
||
filename: latest.mp4
|
||
overwrite: true
|
||
mode: queued
|
||
max: 10
|
||
- id: '1720276673719'
|
||
alias: 'Front Garden: Vehicle Detected On Driveway'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.driveway_vehicle_detected
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: camera.snapshot
|
||
metadata: {}
|
||
data:
|
||
filename: '{{ states(''input_text.driveway_vehicle_latest_image_path'') }}/vehicle_latest.jpg'
|
||
target:
|
||
entity_id: camera.driveway_high_resolution_channel
|
||
- action: gpt4vision.image_analyzer
|
||
data:
|
||
provider: Ollama
|
||
max_tokens: 100
|
||
target_width: 3840
|
||
model: llava
|
||
detail: high
|
||
temperature: 0.1
|
||
include_filename: false
|
||
message: Is there a Tesco van Ignoring all other vehicles found. Answer with
|
||
yes or no.
|
||
image_file: '{{ states(''input_text.driveway_vehicle_latest_image_path'') }}/vehicle_latest.jpg'
|
||
response_variable: ai
|
||
- action: script.send_home_log_with_local_attachments
|
||
data:
|
||
message: '{{ ai.response_text }}'
|
||
title: Vehicle Detected
|
||
filePath: '{{ states(''input_text.driveway_vehicle_latest_image_path'') }}/vehicle_latest.jpg'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1660894232444'
|
||
alias: 'Front Garden: Below Direct Sun Light'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
for:
|
||
hours: 0
|
||
minutes: 10
|
||
seconds: 0
|
||
below: input_number.close_blinds_brightness_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.season
|
||
state: summer
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Sun light has fallen below {{ states('input_number.close_blinds_brightness_threshold')
|
||
}} ({{ states('sensor.front_garden_motion_illuminance', with_unit=True) }}).
|
||
Opening office blinds/curtains.
|
||
title: Front Garden
|
||
log_level: Normal
|
||
- action: cover.set_cover_position
|
||
data:
|
||
position: 25
|
||
target:
|
||
entity_id: cover.office_blinds
|
||
- if:
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: state
|
||
entity_id: binary_sensor.bedroom_tv_powered_on
|
||
state: 'off'
|
||
then:
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
- if:
|
||
- condition: numeric_state
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
- condition: time
|
||
before: input_datetime.childrens_bed_time
|
||
then:
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.ashlees_bedroom_blinds
|
||
mode: single
|
||
- id: '1714914120928'
|
||
alias: 'Front Garden: Lock Box State Changed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.outdoor_lock_box_contact
|
||
not_from:
|
||
- unknown
|
||
- unavailable
|
||
not_to:
|
||
- unknown
|
||
- unavailable
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.outdoor_lock_box_contact
|
||
not_from:
|
||
- unknown
|
||
- unavailable
|
||
to:
|
||
- unknown
|
||
- unavailable
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
title: Lock Box
|
||
message: Was {{ states('binary_sensor.outdoor_lock_box_contact') }}
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1718364408150'
|
||
alias: 'Front Garden: Lockbox Sensor Disconnected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.outdoor_lock_box_contact
|
||
to: unavailable
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Lockbox sensor has disconnected.
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1613937312554'
|
||
alias: Home Assistant CI
|
||
description: https://community.home-assistant.io/t/guide-to-setting-up-a-fully-automated-ci-for-hassio/51576
|
||
triggers:
|
||
- trigger: webhook
|
||
webhook_id: git_pull
|
||
allowed_methods:
|
||
- POST
|
||
local_only: false
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_github_integration
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.json.key_token|string == states(''input_text.github_pull_key'')
|
||
}}'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'build :white_check_mark: passed. Pulling changes.'
|
||
title: ':construction_worker: :hammer_and_wrench: GitHub'
|
||
log_level: Normal
|
||
- action: hassio.addon_start
|
||
data:
|
||
addon: core_git_pull
|
||
default:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: 'Build :white_check_mark: passed but incorrect :key: key was sent.'
|
||
title: ':warning: :construction_worker: :hammer_and_wrench: GitHub :warning:'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1666470473971'
|
||
alias: 'HVAC: Heating Mode Changed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.thermostat_mode
|
||
to: SCHEDULE
|
||
- trigger: state
|
||
entity_id:
|
||
- water_heater.thermostat
|
||
to: eco
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Central heating mode changed to {{ states('sensor.thermostat_mode')
|
||
}}
|
||
title: ':hotsprings: :droplet: Boiler'
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: In holiday mode so heating should not be on. Turning heating off.
|
||
title: ':hotsprings: :droplet: Boiler'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- action: script.set_central_heating_to_away_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1666470473973'
|
||
alias: 'HVAC: Heating Mode Changed To Automatic'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- climate.thermostat
|
||
to: auto
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_central_heating_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Thermostat switched to auto mode (again).
|
||
title: ':hotsprings: :droplet: Boiler'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1666470473974'
|
||
alias: 'HVAC: Heating Turned On'
|
||
description: Also check every 5 minutes for back to back schedules
|
||
trace:
|
||
stored_traces: 40
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- schedule.central_heating
|
||
to: 'on'
|
||
- trigger: time_pattern
|
||
minutes: /5
|
||
conditions:
|
||
- or:
|
||
- condition: not
|
||
conditions:
|
||
- alias: Thermostat temperature is the same as schedule temperature
|
||
condition: template
|
||
value_template: '{{ state_attr(''climate.thermostat'', ''temperature'') ==
|
||
state_attr(''schedule.central_heating'', ''temperature'') }}'
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: climate.thermostat
|
||
state: heat
|
||
- condition: state
|
||
entity_id: schedule.central_heating
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_central_heating_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.check_and_run_central_heating
|
||
data: {}
|
||
mode: queued
|
||
max: 2
|
||
- id: '1666470473975'
|
||
alias: 'HVAC: Heating Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- schedule.central_heating
|
||
to: 'off'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_central_heating_automations
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: In Holiday mode. Skipping turning off central heating.
|
||
title: ':hotsprings: :droplet: Boiler'
|
||
log_level: Normal
|
||
default:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Thermostat switched off. Setting temperature to 7c.
|
||
title: ':hotsprings: :droplet: Boiler'
|
||
log_level: Normal
|
||
- action: climate.set_temperature
|
||
target:
|
||
entity_id:
|
||
- climate.thermostat
|
||
data:
|
||
hvac_mode: heat
|
||
temperature: 7
|
||
mode: single
|
||
- id: '1740955286496'
|
||
alias: 'HVAC: Unavailable'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- climate.thermostat
|
||
to: unavailable
|
||
for:
|
||
hours: 1
|
||
minutes: 0
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_central_heating_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
message: Hive central heating is offline.
|
||
mode: single
|
||
- id: '1666470473972'
|
||
alias: 'HVAC: Hot Water Mode Changed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- water_heater.thermostat
|
||
to: eco
|
||
- trigger: state
|
||
entity_id:
|
||
- water_heater.thermostat
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Hot water mode changed to {{ states('water_heater.thermostat') }}
|
||
title: ':hotsprings: :droplet: Boiler'
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: In holiday mode so hot water should not be on. Turning hot water
|
||
off.
|
||
title: ':hotsprings: :droplet: Boiler'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- action: script.set_how_water_to_away_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1662589192400'
|
||
alias: 'Central Heating: Turn On Hot Water'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- schedule.hot_water
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_hot_water_automations
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: water_heater.thermostat
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- alias: In Holiday Mode
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: In Holiday mode. Skipping turning on hot water.
|
||
title: ':hotsprings: Central Heating'
|
||
log_level: Debug
|
||
- alias: Already Heated Hot water
|
||
conditions:
|
||
- condition: template
|
||
value_template: '{{ (states(''sensor.myenergi_eddi_energy_consumed_per_heating_cycle'')|float(0))
|
||
> (states(''input_number.hot_water_solar_diverter_boiler_cut_off'')|float(0))
|
||
}}
|
||
|
||
'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Eddi has heated the hot water {{ states(''sensor.myenergi_eddi_energy_consumed_per_heating_cycle'')
|
||
}} (> {{ states(''input_number.hot_water_solar_diverter_boiler_cut_off'')|float(0)
|
||
}}). {{ state_attr(''sensor.myenergi_eddi_energy_consumed_session'', ''unit_of_measurement'')
|
||
}} was heated today.
|
||
|
||
|
||
Skipping scheduled turning on hot water.'
|
||
title: ':hotsprings: Central Heating'
|
||
log_level: Normal
|
||
default:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turning on hot water from schedule.
|
||
title: ':hotsprings: Central Heating'
|
||
log_level: Debug
|
||
- action: script.set_how_water_to_on
|
||
data: {}
|
||
mode: single
|
||
- id: '1662589333109'
|
||
alias: 'Central Heating: Turn Off Hot Water'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- schedule.hot_water
|
||
to: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 30
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_hot_water_automations
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: water_heater.thermostat
|
||
state: 'off'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: In Holiday mode. Skipping turning off hot water.
|
||
title: ':hotsprings: Central Heating'
|
||
log_level: Normal
|
||
default:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turning off hot water from schedule.
|
||
title: ':hotsprings: Central Heating'
|
||
log_level: Normal
|
||
- action: script.set_hot_water_to_home_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1631138390675'
|
||
alias: 'Home Mode: Changed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: input_select.home_mode
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':repeat: Entering {{ states(''input_select.home_mode'') }} mode.'
|
||
title: Home Mode
|
||
log_level: Debug
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
sequence:
|
||
- action: script.home_mode_turn_on_holiday_mode
|
||
data: {}
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Normal
|
||
sequence:
|
||
- action: script.home_mode_turn_on_normal_mode
|
||
data: {}
|
||
default: []
|
||
mode: single
|
||
- id: '1646257483770'
|
||
alias: 'Home: Privacy Mode Turned On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: input_boolean.privacy_mode
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':detective: Privacy mode enabled.'
|
||
log_level: Debug
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':camera: Turning conservatory camera recording and detection off.'
|
||
mode: single
|
||
- id: '1647094528209'
|
||
alias: Enter Naughty Step Mode
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: input_boolean.naughty_step_mode
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Entering naughty step mode.
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id:
|
||
- scene.living_room_lights_off
|
||
- scene.stairs_light_2_off
|
||
- scene.stairs_light_off
|
||
- action: input_boolean.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id:
|
||
- input_boolean.enable_living_room_motion_triggers
|
||
- input_boolean.enable_stairs_motion_triggers
|
||
mode: single
|
||
- id: '1608489438291'
|
||
alias: 'Home Assistant: Shutdown'
|
||
description: ''
|
||
triggers:
|
||
- trigger: homeassistant
|
||
event: shutdown
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':black_square_for_stop: Shutting down.'
|
||
title: Home Assistant
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1608489396143'
|
||
alias: 'Home Assistant: Start Up'
|
||
description: ''
|
||
triggers:
|
||
- trigger: homeassistant
|
||
event: start
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':arrow_forward: Started.'
|
||
title: Home Assistant
|
||
log_level: Normal
|
||
- alias: Check Solar Assistant
|
||
action: script.solar_assistant_check_charging_mode
|
||
data:
|
||
event: event
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
- alias: Check Zappi
|
||
choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_zappi_automations
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: sensor.myenergi_zappi_plug_status
|
||
state: EV Disconnected
|
||
sequence:
|
||
- action: script.zappi_check_ev_charge
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
- alias: Is Terina working from home
|
||
action: script.check_terinas_work_laptop_status
|
||
data: {}
|
||
- alias: Check 3D printer enclosure light
|
||
action: script.3d_printer_check_turn_off_light
|
||
data: {}
|
||
- alias: Check Magic Mirror casting
|
||
choose:
|
||
- conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: guest
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: home
|
||
- not:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_away
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Casting Home Assistant.
|
||
title: ':mirror: Magic Mirror'
|
||
log_level: Debug
|
||
- action: cast.show_lovelace_view
|
||
data:
|
||
entity_id: media_player.stairs_chromecast
|
||
dashboard_path: lovelace-magicmirror
|
||
view_path: home
|
||
default: []
|
||
- if:
|
||
- condition: state
|
||
entity_id: binary_sensor.front_door
|
||
state: 'off'
|
||
then:
|
||
- action: light.turn_off
|
||
target:
|
||
label_id: dedicate_notification_light
|
||
entity_id: light.porch
|
||
data: {}
|
||
mode: single
|
||
- id: '1664657264986'
|
||
alias: 'Home Assistant: Update Available'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: update.home_assistant_core_update
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_assistant_automatic_upgrade
|
||
state: Disabled
|
||
actions:
|
||
- action: script.upgrade_home_assistant
|
||
data: {}
|
||
mode: single
|
||
- id: '1738875026613'
|
||
alias: 'Home Assistant: Weekday Backup'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: '17:00:00'
|
||
conditions:
|
||
- condition: time
|
||
weekday:
|
||
- mon
|
||
- tue
|
||
- wed
|
||
- thu
|
||
- fri
|
||
actions:
|
||
- action: hassio.backup_full
|
||
metadata: {}
|
||
data:
|
||
compressed: true
|
||
mode: single
|
||
- id: '1738875026614'
|
||
alias: 'Home Assistant: Weekend Backup'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: '11:00:00'
|
||
conditions:
|
||
- condition: time
|
||
weekday:
|
||
- sat
|
||
- sun
|
||
actions:
|
||
- action: hassio.backup_full
|
||
metadata: {}
|
||
data:
|
||
compressed: true
|
||
mode: single
|
||
- id: '1678125037184'
|
||
alias: 'HVAC: House Target Temperature Changed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.thermostat_target_temperature
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Home thermostat target temperature changed.
|
||
|
||
Updating TRV from {{ state_attr(''climate.living_room_radiator'', ''temperature'')|float(22)
|
||
}} to {{ state_attr(''climate.thermostat'', ''temperature'')|float(22) }}c.'
|
||
title: ':hotsprings: :droplet: Boiler'
|
||
log_level: Debug
|
||
- action: climate.set_temperature
|
||
data:
|
||
temperature: '{{ states(''sensor.thermostat_target_temperature'')|float(22)
|
||
}}'
|
||
target:
|
||
entity_id:
|
||
- climate.ashlees_bedroom_radiator
|
||
- climate.bedroom_radiator
|
||
- climate.kitchen_radiator
|
||
- climate.leos_bedroom_radiator
|
||
- climate.living_room_radiator
|
||
- climate.office_radiator
|
||
mode: single
|
||
- id: '1678271646645'
|
||
alias: 'HVAC: Radiators Below Target Temperature'
|
||
description: Monitor rooms below temperature with TRVs
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.bedroom_radiator_temperature
|
||
for:
|
||
hours: 0
|
||
minutes: 30
|
||
seconds: 0
|
||
below: sensor.bedroom_radiator_minimum_target_temperature
|
||
- trigger: numeric_state
|
||
entity_id: sensor.leos_radiator_temperature
|
||
for:
|
||
hours: 0
|
||
minutes: 30
|
||
seconds: 0
|
||
below: sensor.leos_radiator_minimum_target_temperature
|
||
- trigger: numeric_state
|
||
entity_id: sensor.living_room_radiator_temperature
|
||
for:
|
||
hours: 0
|
||
minutes: 30
|
||
seconds: 0
|
||
below: sensor.living_room_radiator_minimum_target_temperature
|
||
- trigger: numeric_state
|
||
entity_id: sensor.office_radiator_temperature
|
||
for:
|
||
hours: 0
|
||
minutes: 30
|
||
seconds: 0
|
||
below: sensor.office_radiator_minimum_target_temperature
|
||
id: office
|
||
conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: climate.thermostat
|
||
attribute: hvac_action
|
||
state: heating
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- office
|
||
- condition: state
|
||
entity_id: binary_sensor.office_windows
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: binary_sensor.conservatory_door
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Radiator to call for heat.
|
||
title: ':office: Office'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
default:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Radiator call for heat in.
|
||
title: '{%- if trigger.entity_id == ''sensor.bedroom_radiator_temperature''
|
||
-%} :bed: bedroom {%- elif trigger.entity_id == ''sensor.leos_radiator_temperature''
|
||
-%} Leo''s :bed: bedroom {%- elif trigger.entity_id == ''sensor.living_room_radiator_temperature''
|
||
-%} :couch_and_lamp: Living Room {%- elif trigger.entity_id == ''sensor.office_radiator_temperature''
|
||
-%} :office: Office {%- else -%} Unknown location {%- endif -%}'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1583797341647'
|
||
alias: 'Kitchen: Turn Off Lights At Night'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: '23:30:00'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: light.kitchen_lights
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int >
|
||
25 and now().minute | int < 35 %}30{% else %}{% endif %}: Turning main lights
|
||
off"'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_main_lights_off
|
||
data:
|
||
transition: 2
|
||
mode: single
|
||
- id: '1606652871369'
|
||
alias: 'Kitchen: No Motion'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_area_motion
|
||
from: 'on'
|
||
to: 'off'
|
||
for: 00:05:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_kitchen_motion_triggers
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion after :city_sunrise: and before :city_sunset:.
|
||
Turning main lights off.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_main_lights_dim
|
||
data:
|
||
transition: 2
|
||
- choose:
|
||
- conditions:
|
||
- condition: time
|
||
after: 00:00:00
|
||
- condition: sun
|
||
before: sunset
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion after :city_sunrise: and before :city_sunset:.
|
||
Turning ambient lights off.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_ambient_lights_off
|
||
data:
|
||
transition: 2
|
||
- conditions:
|
||
- and:
|
||
- condition: sun
|
||
after: sunset
|
||
- condition: time
|
||
before: '23:59:59'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion after :city_sunset: and before :city_sunrise:.
|
||
:low_brightness: Dimming ambient :bulb: :low_brightness: lights.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_ambient_lights_dim
|
||
default: []
|
||
mode: single
|
||
- id: '1606652871370'
|
||
alias: 'Kitchen: No Motion Turn Off Lights'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
from: 'on'
|
||
to: 'off'
|
||
for: 00:07:00
|
||
entity_id: binary_sensor.kitchen_area_motion
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_kitchen_motion_triggers
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion after :city_sunrise: and before :city_sunset:.
|
||
Turning main lights off.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_main_lights_off
|
||
data:
|
||
transition: 2
|
||
- choose:
|
||
- conditions:
|
||
- and:
|
||
- condition: sun
|
||
after: sunset
|
||
- condition: time
|
||
before: '23:59:59'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion after :city_sunset: and before :city_sunrise:.
|
||
Turning ambient lights off.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_ambient_lights_off
|
||
data:
|
||
transition: 2
|
||
default: []
|
||
mode: single
|
||
- id: '1606294735952'
|
||
alias: 'Kitchen: Turn Off Lights In The Morning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 09:00:00
|
||
id: weekend
|
||
- trigger: time
|
||
at: 08:50:00
|
||
id: weekday
|
||
conditions:
|
||
- condition: time
|
||
weekday:
|
||
- sat
|
||
- sun
|
||
- condition: state
|
||
entity_id: light.kitchen_lights
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_kitchen_motion_triggers
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: time
|
||
weekday:
|
||
- mon
|
||
- tue
|
||
- wed
|
||
- thu
|
||
- fri
|
||
- condition: trigger
|
||
id: weekday
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute |
|
||
int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Turning
|
||
ambient lights off.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_ambient_lights_off
|
||
data:
|
||
transition: 2
|
||
- conditions:
|
||
- condition: time
|
||
weekday:
|
||
- sat
|
||
- sun
|
||
- condition: trigger
|
||
id: weekend
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%H'')}}: Turning ambient lights off.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_ambient_lights_off
|
||
data:
|
||
transition: 2
|
||
default: []
|
||
mode: single
|
||
- id: '1588197104336'
|
||
alias: 'Kitchen: Timed Turn On Lights (Dim)'
|
||
description: ''
|
||
triggers:
|
||
- trigger: sun
|
||
event: sunset
|
||
- trigger: time
|
||
at: 06:45:00
|
||
conditions:
|
||
- and:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Guest
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: home
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':bulb: At least one person is :house_with_garden: home. Dimming
|
||
accent :bulb: :low_brightness: lights.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_dim_accent_lights
|
||
data:
|
||
transition: 2
|
||
mode: single
|
||
- id: '1606158191303'
|
||
alias: 'Kitchen: Motion Detected Table Lights Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.kitchen_area_motion
|
||
- binary_sensor.kitchen_motion_2_occupancy
|
||
- binary_sensor.kitchen_motion_occupancy
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_kitchen_motion_triggers
|
||
state: 'on'
|
||
- or:
|
||
- condition: state
|
||
entity_id: light.kitchen_table_white
|
||
state: 'off'
|
||
- and:
|
||
- condition: state
|
||
entity_id: light.kitchen_table_white
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: light.kitchen_table_white
|
||
attribute: brightness
|
||
below: 100
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected. Turning table :bulb: :high_brightness:
|
||
lights on.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_table_lights_on
|
||
mode: queued
|
||
max: 10
|
||
- id: '1606158191306'
|
||
alias: 'Kitchen: Motion Detected Cooker Lights Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.kitchen_area_motion
|
||
- binary_sensor.kitchen_motion_2_occupancy
|
||
- binary_sensor.kitchen_motion_occupancy
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_kitchen_motion_triggers
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.kitchen_cooker_white
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected and it''s dark ({{ states(''sensor.kitchen_motion_illuminance'')
|
||
}} & {{ states(''sensor.kitchen_motion_2_illuminance_lux'') }} < {{ states(''input_number.kitchen_light_level_threshold'')
|
||
}} & {{ states(''input_number.kitchen_light_level_2_threshold'', with_unit=True)
|
||
}}). Turning kitchen cooker :bulb: :high_brightness: lights on.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_cooker_lights_on
|
||
mode: queued
|
||
max: 10
|
||
- id: '1606158191309'
|
||
alias: 'Kitchen: Motion Detected Cooker Lights On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.kitchen_area_motion
|
||
- binary_sensor.kitchen_motion_2_occupancy
|
||
- binary_sensor.kitchen_motion_occupancy
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_kitchen_motion_triggers
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.kitchen_cooker_white
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: light.kitchen_cooker_white
|
||
attribute: brightness
|
||
below: 100
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected and it''s dark ({{ states(''sensor.kitchen_motion_illuminance'')
|
||
}} & {{ states(''sensor.kitchen_motion_2_illuminance_lux'') }} < {{ states(''input_number.kitchen_light_level_threshold'')
|
||
}} & {{ states(''input_number.kitchen_light_level_2_threshold'', with_unit=True)
|
||
}}). Turning up cooker :bulb: :high_brightness: lights.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.kitchen_cooker_lights_on
|
||
mode: queued
|
||
max: 10
|
||
- id: '1606158191304'
|
||
alias: 'Kitchen: Motion Detected Ambient Lights On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_area_motion
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_kitchen_motion_triggers
|
||
state: 'on'
|
||
- or:
|
||
- condition: state
|
||
entity_id: light.kitchen_cabinets
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.kitchen_down_lights
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.kitchen_draws
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: light.kitchen_cabinets
|
||
attribute: brightness
|
||
below: '100'
|
||
- condition: numeric_state
|
||
entity_id: light.kitchen_down_lights
|
||
attribute: brightness
|
||
below: '100'
|
||
- condition: numeric_state
|
||
entity_id: light.kitchen_draws
|
||
attribute: brightness
|
||
below: '100'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected. Turning up accent :bulb: :high_brightness:
|
||
lights.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
data:
|
||
transition: 1
|
||
target:
|
||
entity_id: scene.kitchen_accent_lights_on
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1606158191305'
|
||
alias: 'Kitchen: Motion Detected Ambient Lights Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_area_motion
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_kitchen_motion_triggers
|
||
state: 'on'
|
||
- or:
|
||
- condition: state
|
||
entity_id: light.kitchen_cabinets
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: light.kitchen_down_lights
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: light.kitchen_draws
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected. Turning accent :bulb: :high_brightness:
|
||
lights on.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
data:
|
||
transition: 1
|
||
target:
|
||
entity_id: scene.kitchen_dim_accent_lights
|
||
mode: single
|
||
- id: '1721248529363'
|
||
alias: 'Kitchen: Cooker Light Switch Toggle'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.kitchen_cooker_light_input
|
||
not_from:
|
||
- unavailable
|
||
- unknown
|
||
not_to:
|
||
- unavailable
|
||
- unknown
|
||
conditions: []
|
||
actions:
|
||
- action: light.toggle
|
||
metadata: {}
|
||
data:
|
||
transition: 1
|
||
target:
|
||
entity_id: light.kitchen_cooker_white
|
||
mode: queued
|
||
max: 10
|
||
- id: '1721248529364'
|
||
alias: 'Kitchen: Table Light Switch Toggle'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.kitchen_table_light_input
|
||
not_from:
|
||
- unavailable
|
||
- unknown
|
||
not_to:
|
||
- unavailable
|
||
- unknown
|
||
conditions: []
|
||
actions:
|
||
- action: light.toggle
|
||
metadata: {}
|
||
data:
|
||
transition: 1
|
||
target:
|
||
entity_id: light.kitchen_table_white
|
||
mode: queued
|
||
max: 10
|
||
- id: '1595678795895'
|
||
alias: 'Kitchen: Fridge Door Open'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_fridge_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: :snowflake: Fridge door opened.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1595678900778'
|
||
alias: 'Kitchen: Fridge Door Closed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_fridge_door_contact
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':snowflake: Fridge :door: door closed.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1595679010793'
|
||
alias: 'Kitchen: Fridge Open For A Long Period Of Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_fridge_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
for: 00:04:00
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_fridge_door_contact
|
||
to: 'on'
|
||
for: 00:30:00
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_fridge_door_contact
|
||
to: 'on'
|
||
for: 00:45:00
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_fridge_door_contact
|
||
to: 'on'
|
||
for: 01:00:00
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':snowflake: Fridge :door: door is open has been open for more than
|
||
{{ relative_time(states.binary_sensor.kitchen_fridge_door_contact.last_changed)
|
||
}}!'
|
||
title: ':warning: :cook: Kitchen :warning:'
|
||
- action: script.alexa_announce
|
||
data:
|
||
message: Kitchen Freezer door has been open for more than {{ relative_time(states.binary_sensor.kitchen_fridge_door_contact.last_changed)
|
||
}}!
|
||
mode: single
|
||
- id: '1595678795896'
|
||
alias: 'Kitchen: Freezer Door Open'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_freezer_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':snowflake: Freezer :door: door opened.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1595678900779'
|
||
alias: 'Kitchen: Freezer Door Closed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_freezer_door_contact
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':snowflake: Freezer :door: door closed.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1595679010796'
|
||
alias: 'Kitchen: Freezer Open For A Long Period Of Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.kitchen_freezer_door_contact
|
||
for: 00:04:00
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':snowflake: Freezer :door: door has been open for more than 4 minutes!'
|
||
title: ':warning: :cook: Kitchen :warning:'
|
||
mode: single
|
||
- id: '1657801925107'
|
||
alias: 'Kitchen: Fridge Freezer Plug Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- switch.ecoflow_kitchen_plug
|
||
to: unavailable
|
||
for:
|
||
hours: 0
|
||
minutes: 2
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Fridge Freezer plug is turned off.
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Fridge Freezer plug is turned unavailable.
|
||
title: ':cook: Kitchen'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1688681085048'
|
||
alias: 'Kitchen: Low Water Softener Salt'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.water_softener_salt_level_average
|
||
above: input_number.low_water_softener_salt_level
|
||
for:
|
||
hours: 2
|
||
minutes: 0
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Low salt in water softener.
|
||
title: ':cook: Kitchen'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1688681085049'
|
||
alias: 'Kitchen: No Water Softener Salt'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: sensor.water_softener_salt_level_average
|
||
to: input_number.no_water_softener_salt_level
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':warning: No salt in water softener. :warning:'
|
||
title: ':cook: Kitchen'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1694521590170'
|
||
alias: 'Kitchen: Oven Preheated'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.oven_channel_1_power
|
||
below: 100
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.oven_powered_on
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.oven_preheated
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_oven_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.kitchen_oven_preheated_notification
|
||
data:
|
||
message: 'Oven has :hotsprings: preheated.'
|
||
title: ':cook: Kitchen'
|
||
- action: input_boolean.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id: input_boolean.oven_preheated
|
||
- action: script.alexa_announce
|
||
data:
|
||
message: Oven has preheated.
|
||
mode: single
|
||
- id: '1694521864037'
|
||
alias: 'Kitchen: Reset Oven Preheated'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.oven_powered_on
|
||
to: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.oven_preheated
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_oven_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turning off oven preheat indicator.
|
||
title: ':cook: Kitchen'
|
||
log_level: Normal
|
||
- action: input_boolean.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: input_boolean.oven_preheated
|
||
mode: single
|
||
- id: '1694521590172'
|
||
alias: 'Kitchen: Dishwasher Cycle Starts'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.dishwasher_powered_on
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.dishwasher_cycle_in_progress
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_dishwasher_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Dishwasher has started.
|
||
title: ':cook: Kitchen'
|
||
- action: input_boolean.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id: input_boolean.dishwasher_cycle_in_progress
|
||
mode: single
|
||
- id: '1694521864038'
|
||
alias: 'Kitchen: Reset Oven Preheated'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.dishwasher_powered_on
|
||
to: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 31
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.dishwasher_cycle_in_progress
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_dishwasher_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Dishwasher cycle completed.
|
||
title: ':cook: Kitchen'
|
||
log_level: Normal
|
||
- action: input_boolean.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: input_boolean.dishwasher_cycle_in_progress
|
||
mode: single
|
||
- id: '1595679010797'
|
||
alias: 'Kitchen: Dishwasher Started'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: input_boolean.dishwasher_cycle_in_progress
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- if:
|
||
- condition: state
|
||
entity_id: input_boolean.dishwasher_clean_cycle
|
||
state: 'off'
|
||
then:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':knife_fork_plate: :soap: Dishwasher :arrow_forward: Started.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: rest_command.consume_dishwasher_tablet
|
||
data: {}
|
||
- action: homeassistant.update_entity
|
||
data:
|
||
entity_id:
|
||
- sensor.dishwasher_tablet_stock
|
||
- if:
|
||
- condition: numeric_state
|
||
entity_id: sensor.dishwasher_tablet_stock
|
||
below: 9
|
||
then:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Dishwasher tablets are running low ( {{ states('sensor.dishwasher_tablet_stock')
|
||
}} remaining). Consider ordering more.
|
||
title: ':cook: Kitchen'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
else:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':knife_fork_plate: :soap: Dishwasher :arrow_forward: Started in
|
||
clean mode.'
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: input_boolean.turn_off
|
||
target:
|
||
entity_id: input_boolean.dishwasher_clean_cycle
|
||
data: {}
|
||
mode: single
|
||
- id: '1595679010798'
|
||
alias: 'Kitchen: Dishwasher Finished'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: input_boolean.dishwasher_cycle_in_progress
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- action: script.dishwashing_complete_notification
|
||
data:
|
||
message: ':knife_fork_plate: :soap: Dishwasher :checkered_flag: Finished.'
|
||
title: ':cook: Kitchen'
|
||
mode: single
|
||
- id: '1716112515827'
|
||
alias: 'Kitchen: Paper Draw Opened'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.kitchen_paper_draw_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Paper draw opened
|
||
title: Kitchen
|
||
mode: single
|
||
- id: '1735567472488'
|
||
alias: 'Kitchen: Using Power From The Grid'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.grid_power
|
||
above: 100
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.kitchen_area_motion
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.kitchen_cooker_rgb
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: light.kitchen_table_rgb
|
||
state: 'off'
|
||
- condition: numeric_state
|
||
entity_id: sensor.growatt_sph_battery_state_of_charge
|
||
above: input_number.growatt_battery_discharge_stop_soc
|
||
- not:
|
||
- condition: state
|
||
entity_id: sensor.growatt_sph_inverter_mode
|
||
state: Battery first
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Pulling power from the grid
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- choose:
|
||
- alias: Battery has charge left
|
||
conditions:
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: sensor.growatt_sph_battery_state_of_charge
|
||
above: input_number.growatt_battery_discharge_stop_soc
|
||
- condition: numeric_state
|
||
entity_id: sensor.growatt_battery_discharge_power
|
||
below: 100
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.kitchen_table_ambient_light_to_pink
|
||
- scene.kitchen_cooker_ambient_light_to_pink
|
||
- alias: Battery has charge left
|
||
conditions:
|
||
- or:
|
||
- condition: template
|
||
value_template: '{{ states(''sensor.growatt_sph_battery_state_of_charge'')|float(0)
|
||
<= states(''input_number.growatt_battery_discharge_stop_soc'')|float(0)
|
||
}}'
|
||
- condition: numeric_state
|
||
entity_id: sensor.growatt_battery_discharge_power
|
||
below: 100
|
||
sequence:
|
||
- action: script.kitchen_pulse_ambient_light_pink
|
||
data: {}
|
||
mode: single
|
||
- id: '1735567472489'
|
||
alias: 'Kitchen: Stops using Power From The Grid'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.grid_power
|
||
below: 100
|
||
conditions:
|
||
- condition: state
|
||
entity_id: light.kitchen_cooker_rgb
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.kitchen_table_rgb
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.front_door
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Pulling power from the grid
|
||
title: ':cook: Kitchen'
|
||
log_level: Debug
|
||
- action: light.turn_off
|
||
target:
|
||
entity_id:
|
||
- light.kitchen_cooker_rgb
|
||
- light.kitchen_table_rgb
|
||
mode: single
|
||
- id: '1757836826541'
|
||
alias: 'Kitchen: Smoke Alarm'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.kitchen_smoke_alarm_smoke
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: ':warning: Smoke alarm triggered :warning:'
|
||
title: ':warning: :cook: Kitchen :warning:'
|
||
- action: script.alexa_announce
|
||
data:
|
||
message: Warning! Kitchen smoke alarm triggered.
|
||
mode: single
|
||
- id: '1617814309728'
|
||
alias: 'Office: TV On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: media_player.office_tv
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ state_attr(''media_player.office_tv'', ''source'') != none
|
||
}}'
|
||
then:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':tv: Office TV turned on and playing {{ state_attr(''media_player.office_tv'',
|
||
''source'') }}.'
|
||
log_level: Normal
|
||
else:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':tv: Office TV turned on.'
|
||
log_level: Debug
|
||
mode: queued
|
||
max: 10
|
||
- id: '1617814349289'
|
||
alias: 'Office: TV Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: media_player.office_tv
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':tv: Office TV turned off.'
|
||
log_level: Debug
|
||
mode: queued
|
||
max: 10
|
||
- id: '1617814753264'
|
||
alias: 'Office: TV Source Changes'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: media_player.office_tv
|
||
attribute: source
|
||
conditions: []
|
||
actions:
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ state_attr(''media_player.office_tv'', ''source'') != none
|
||
}}'
|
||
then:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':tv: Office TV turned on and playing {{ state_attr(''media_player.office_tv'',
|
||
''source'') }}.'
|
||
log_level: Normal
|
||
else:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':tv: Office TV media changed.'
|
||
log_level: Debug
|
||
mode: queued
|
||
max: 10
|
||
- id: '1583956425622'
|
||
alias: 'Living Room: Motion Detected'
|
||
description: Added a second delay https://community.home-assistant.io/t/hue-motion-sensor-with-illuminance-condition/128290
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.living_room_area_motion
|
||
- binary_sensor.lounge_motion
|
||
- binary_sensor.living_room_motion_occupancy
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_motion_triggers
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: sensor.living_room_motion_3_illuminance
|
||
below: input_number.living_room_light_level_2_threshold
|
||
- condition: numeric_state
|
||
entity_id: sensor.living_room_motion_illuminance
|
||
below: input_number.living_room_light_level_4_threshold
|
||
- condition: state
|
||
entity_id: sensor.living_room_motion_illuminance
|
||
state: unavailable
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: light.living_room_lamp_left
|
||
attribute: brightness
|
||
below: '190'
|
||
- condition: numeric_state
|
||
entity_id: light.living_room_lamp_right
|
||
attribute: brightness
|
||
below: '190'
|
||
- condition: template
|
||
value_template: '{{ state_attr(''light.living_room_lamp_left'', ''brightness'')
|
||
== none }}'
|
||
- condition: template
|
||
value_template: '{{ state_attr(''light.living_room_lamp_right'', ''brightness'')
|
||
== none }}'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected and it''s dark ({{ states(''sensor.living_room_motion_3_illuminance'')
|
||
}} & {{ states(''sensor.living_room_motion_illuminance'') }} < {{ states(''input_number.living_room_light_level_2_threshold'')
|
||
}} & {{ states(''input_number.living_room_light_level_4_threshold'',
|
||
with_unit=True) }}) and Terina''s work :computer: computer is on. Turning
|
||
:bulb: :high_brightness: lights on.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.lounge_ceiling
|
||
state: 'on'
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_lights
|
||
data:
|
||
transition: 1
|
||
default:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_lamps_on
|
||
data:
|
||
transition: 1
|
||
- alias: Room too bright
|
||
conditions:
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: sensor.living_room_motion_3_illuminance
|
||
below: input_number.living_room_light_level_2_threshold
|
||
- condition: numeric_state
|
||
entity_id: sensor.living_room_motion_illuminance
|
||
below: input_number.living_room_light_level_4_threshold
|
||
- or:
|
||
- condition: state
|
||
entity_id: light.living_room_lamp_left
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: light.living_room_lamp_right
|
||
state: 'off'
|
||
- condition: template
|
||
value_template: '{{ state_attr(''light.living_room_lamp_left'', ''brightness'')
|
||
== none }}'
|
||
- condition: template
|
||
value_template: '{{ state_attr(''light.living_room_lamp_right'', ''brightness'')
|
||
== none }}'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected and it''s dark ({{ states(''sensor.living_room_motion_3_illuminance'')
|
||
}} & {{ states(''sensor.living_room_motion_illuminance'') }} < {{ states(''input_number.living_room_light_level_2_threshold'')
|
||
}} & {{ states(''input_number.living_room_light_level_4_threshold'',
|
||
with_unit=True) }}) and Terina''s work :computer: computer is on. Turning
|
||
:bulb: :high_brightness: lights on.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_lamps_yellow
|
||
data:
|
||
transition: 0
|
||
- delay:
|
||
seconds: 1
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_lamps_off
|
||
data:
|
||
transition: 0
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1606170045630'
|
||
alias: 'Living Room: No Motion After Short Time Dim Lights'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.living_room_area_motion
|
||
to: 'off'
|
||
for: 00:05:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_motion_triggers
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion for 5 minutes. :bulb: :low_brightness:
|
||
Dimming lights'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.living_room_lamps
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.lounge_ceiling
|
||
state: 'on'
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_dim_lights
|
||
data:
|
||
transition: 1
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.living_room_lamps
|
||
state: 'on'
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_dim_lamps
|
||
data:
|
||
transition: 1
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.lounge_ceiling
|
||
state: 'on'
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_dim_ceiling_lights
|
||
data:
|
||
transition: 1
|
||
default: []
|
||
mode: single
|
||
- id: '1605567425876'
|
||
alias: 'Living Room: No Motion For Long Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.living_room_area_motion
|
||
from: 'on'
|
||
to: 'off'
|
||
for: 00:10:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_motion_triggers
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion for 10 minutes and :tv: TV is turned
|
||
off. Turning living room lights off.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.living_room_lamps
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.lounge_ceiling
|
||
state: 'on'
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_lights_off
|
||
data:
|
||
transition: 1
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.living_room_lamps
|
||
state: 'on'
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_lamps_off
|
||
data:
|
||
transition: 1
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.lounge_ceiling
|
||
state: 'on'
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_ceiling_lights_off
|
||
data:
|
||
transition: 1
|
||
default: []
|
||
mode: single
|
||
- id: '1714512650107'
|
||
alias: 'Living Room: Lamps On And No Motion'
|
||
description: Caters for when lights are on and Home Assistant was restarted
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- light.living_room_lamps
|
||
for:
|
||
minutes: 10
|
||
conditions:
|
||
- condition: template
|
||
value_template: '{{ as_timestamp(now()) - as_timestamp(states.living_room_lamps.last_changed)
|
||
>= 360 }}'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: :Lights on for 10 minutes with no motion. Turning lights off.
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
metadata: {}
|
||
target:
|
||
entity_id: scene.living_room_lamps_off
|
||
mode: single
|
||
- id: '1610409803685'
|
||
alias: 'Living Room: TV Turned Off Turn Off Lights'
|
||
description: TV is turned off and turn lights off if there has been no motion.
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.tv_plug_power
|
||
for: 00:10:00
|
||
below: input_number.tv_plug_powered_on_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: light.living_room_lamps
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_area_motion
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_area_motion
|
||
state: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 10
|
||
seconds: 0
|
||
- condition: state
|
||
entity_id: device_tracker.doug
|
||
state: not_home
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':tv: TV turned off for 10 minutes. Turning lights off.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.living_room_lamps
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.lounge_ceiling
|
||
state: 'on'
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_lights_off
|
||
data:
|
||
transition: 1
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.living_room_lamps
|
||
state: 'on'
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_lamps_off
|
||
data:
|
||
transition: 1
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.lounge_ceiling
|
||
state: 'on'
|
||
sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.living_room_ceiling_lights_off
|
||
data:
|
||
transition: 1
|
||
default: []
|
||
mode: single
|
||
- id: '1588859622571'
|
||
alias: 'Living Room: Motion Detected In The Morning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.lounge_motion
|
||
to: 'on'
|
||
- trigger: state
|
||
entity_id: binary_sensor.stairs_motion_occupancy
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_morning_routine
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: home
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_home
|
||
- condition: time
|
||
before: '23:00:00'
|
||
after: 05:00:00
|
||
actions:
|
||
- data: {}
|
||
action: script.morning_script
|
||
mode: single
|
||
- id: '1611063957341'
|
||
alias: 'Living Room: Server Fan Running Longer Than 1 Hour'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: switch.server_fan
|
||
to: 'on'
|
||
for: 01:00:00
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Server fan has been running for more than 1 hour. Consider turning
|
||
Fan off.
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Normal
|
||
- if:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_direct_notifications
|
||
state: 'on'
|
||
then:
|
||
- action: script.send_actionable_notification_with_2_buttons
|
||
data:
|
||
message: Turn off server fan?
|
||
title: Server fan on for over 1 hour
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
action1_title: 'Yes'
|
||
action1_name: server_fan_off
|
||
action2_title: 'No'
|
||
action2_name: ignore
|
||
mode: single
|
||
- id: '1677711735249'
|
||
alias: 'Living Room: Open Blinds In The Morning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 07:30:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_windows
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Opening blinds
|
||
partially.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 25
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_left
|
||
- cover.living_room_blinds_middle
|
||
- cover.living_room_blinds_right
|
||
mode: single
|
||
- id: '1677711735250'
|
||
alias: 'Living Room: Open Blinds In The Morning 2'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 08:00:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_windows
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Opening blinds
|
||
fully.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 50
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_left
|
||
- cover.living_room_blinds_middle
|
||
- cover.living_room_blinds_right
|
||
mode: single
|
||
- id: '1677969986112'
|
||
alias: 'Living Room: Close Blinds In The Evening'
|
||
description: ''
|
||
triggers:
|
||
- trigger: sun
|
||
event: sunset
|
||
- trigger: time
|
||
at: '20:00:00'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_windows
|
||
state: 'off'
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_left
|
||
attribute: tilt_position
|
||
above: 25
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_middle
|
||
attribute: tilt_position
|
||
above: 25
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_right
|
||
attribute: tilt_position
|
||
above: 25
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Partially closing
|
||
blinds.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 25
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_left
|
||
- cover.living_room_blinds_middle
|
||
- cover.living_room_blinds_right
|
||
mode: single
|
||
- id: '1677969986113'
|
||
alias: 'Living Room: Close Blinds In The Evening 2'
|
||
description: ''
|
||
triggers:
|
||
- trigger: sun
|
||
event: sunset
|
||
offset: 01:00:00
|
||
- trigger: time
|
||
at: '21:00:00'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_windows
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Closing blinds
|
||
fully.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 0
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_left
|
||
- cover.living_room_blinds_middle
|
||
- cover.living_room_blinds_right
|
||
mode: single
|
||
- id: '1680528200298'
|
||
alias: 'Living Room: No Direct Sun Light In The Morning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
below: input_number.living_room_blinds_morning_sun_azimuth_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_blind_automations
|
||
state: 'on'
|
||
- condition: time
|
||
after: 08:10:00
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_windows
|
||
state: 'off'
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_left
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_middle
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_right
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Morning :sun: sun is out of the way. Opening :couch_and_lamp: lounge
|
||
blinds.
|
||
|
||
Azimuth: {{ state_attr(''sun.sun'', ''azimuth'') }} ({{ states(''input_number.living_room_blinds_morning_sun_azimuth_threshold'')}}).
|
||
|
||
Elevation: {{ state_attr(''sun.sun'', ''elevation'') }}.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 50
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_left
|
||
- cover.living_room_blinds_middle
|
||
- cover.living_room_blinds_right
|
||
mode: single
|
||
- id: '1680528200296'
|
||
alias: 'Living Room: No Direct Sun Light In The Afternoon'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
above: input_number.living_room_blinds_afternoon_sun_azimuth_threshold
|
||
- trigger: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: elevation
|
||
above: input_number.living_room_blinds_afternoon_sun_elevation_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
above: input_number.living_room_blinds_afternoon_sun_azimuth_threshold
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: elevation
|
||
above: input_number.living_room_blinds_afternoon_sun_elevation_threshold
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_windows
|
||
state: 'off'
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_left
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_middle
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_right
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Afternoon :sun: sun is out of the way. Opening :couch_and_lamp: lounge
|
||
blinds.
|
||
|
||
Azimuth: {{ state_attr(''sun.sun'', ''azimuth'') }} ({{ states(''input_number.living_room_blinds_afternoon_sun_azimuth_threshold'')}}).
|
||
|
||
Elevation: {{ state_attr(''sun.sun'', ''elevation'') }} ({{ states(''input_number.living_room_blinds_afternoon_sun_elevation_threshold'')}}).'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 50
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_left
|
||
- cover.living_room_blinds_middle
|
||
- cover.living_room_blinds_right
|
||
mode: single
|
||
- id: '1678300398735'
|
||
alias: 'Living Room: Bright Outside'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
above: input_number.blind_low_brightness_threshold
|
||
for: 00:01:00
|
||
conditions:
|
||
- condition: sun
|
||
after: sunrise
|
||
- condition: time
|
||
after: 08:00:30
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
below: input_number.blind_high_brightness_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_windows
|
||
state: 'off'
|
||
- alias: Check sun's position
|
||
and:
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
above: input_number.living_room_blinds_morning_sun_azimuth_threshold
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
below: input_number.living_room_blinds_afternoon_sun_azimuth_threshold
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: elevation
|
||
below: input_number.living_room_blinds_afternoon_sun_elevation_threshold
|
||
- or:
|
||
- not:
|
||
- condition: state
|
||
entity_id: cover.living_room_blinds_middle
|
||
attribute: current_tilt_position
|
||
state: '25'
|
||
- not:
|
||
- condition: state
|
||
entity_id: cover.living_room_blinds_right
|
||
attribute: current_tilt_position
|
||
state: '25'
|
||
- or:
|
||
- condition: state
|
||
entity_id: group.family_computer
|
||
state: home
|
||
- alias: Only account for laptop during weekdays
|
||
and:
|
||
- condition: time
|
||
weekday:
|
||
- mon
|
||
- tue
|
||
- wed
|
||
- thu
|
||
- fri
|
||
- condition: state
|
||
entity_id: group.terinas_work_computer
|
||
state: home
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: It's bright outside ({{ states('sensor.front_garden_motion_illuminance',
|
||
with_unit=True) }}). Partially closing middle and right blinds.
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 25
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_middle
|
||
- cover.living_room_blinds_right
|
||
mode: single
|
||
- id: '1678300398734'
|
||
alias: 'Living Room: Really Bright Outside'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
above: input_number.blind_high_brightness_threshold
|
||
for: 00:01:00
|
||
conditions:
|
||
- condition: sun
|
||
after: sunrise
|
||
- condition: time
|
||
after: 08:00:30
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_windows
|
||
state: 'off'
|
||
- alias: Check sun's position
|
||
and:
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
above: input_number.living_room_blinds_morning_sun_azimuth_threshold
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
below: input_number.living_room_blinds_afternoon_sun_azimuth_threshold
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: elevation
|
||
below: input_number.living_room_blinds_afternoon_sun_elevation_threshold
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_middle
|
||
attribute: current_tilt_position
|
||
above: 0
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_right
|
||
attribute: current_tilt_position
|
||
above: 0
|
||
- or:
|
||
- condition: state
|
||
entity_id: group.family_computer
|
||
state: home
|
||
- alias: Only account for laptop during weekdays
|
||
and:
|
||
- condition: time
|
||
weekday:
|
||
- mon
|
||
- tue
|
||
- wed
|
||
- thu
|
||
- fri
|
||
- condition: state
|
||
entity_id: group.terinas_work_computer
|
||
state: home
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: It's really bright outside ({{ states('sensor.front_garden_motion_illuminance',
|
||
with_unit=True) }}). Closing blinds.
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 0
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_middle
|
||
- cover.living_room_blinds_right
|
||
mode: single
|
||
- id: '1678637987423'
|
||
alias: 'Living Room: Outside Went Darker'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
below: input_number.blind_low_brightness_threshold
|
||
conditions:
|
||
- condition: sun
|
||
after: sunrise
|
||
- condition: time
|
||
after: 08:00:30
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.living_room_windows
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: group.family_computer
|
||
state: not_home
|
||
- condition: state
|
||
entity_id: group.terinas_work_computer
|
||
state: not_home
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_left
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_right
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
- condition: numeric_state
|
||
entity_id: cover.living_room_blinds_middle
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: It is not as bright outside ({{ states('sensor.front_garden_motion_illuminance',
|
||
with_unit=True) }}). Opening Blinds
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 50
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_left
|
||
- cover.living_room_blinds_middle
|
||
- cover.living_room_blinds_right
|
||
mode: single
|
||
- id: '1630015457540'
|
||
alias: 'Living Room: Person Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.living_room_person
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: camera.snapshot
|
||
data_template:
|
||
filename: '{{ states(''input_text.latest_frigate_lounge_person_file_path'')
|
||
}}'
|
||
target:
|
||
entity_id: camera.living_room
|
||
- action: script.send_home_log_with_local_attachments
|
||
data_template:
|
||
message: Frigate detected a person in the lounge.
|
||
title: ':bust_in_silhouette: Person detected in :couch_and_lamp: lounge'
|
||
filePath: '{{ states(''input_text.latest_frigate_lounge_person_file_path'')
|
||
}}'
|
||
mode: queued
|
||
max: 10
|
||
- id: '1610918759041'
|
||
alias: 'Living Room: Restart Harmony Hub'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 03:00:00
|
||
conditions:
|
||
- condition: time
|
||
weekday:
|
||
- mon
|
||
- condition: state
|
||
entity_id: binary_sensor.tv_powered_on
|
||
state: 'off'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':TV: Restarting Harmony hub.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: switch.turn_off
|
||
target:
|
||
entity_id: switch.harmony_hub_plug
|
||
- delay:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
milliseconds: 0
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.harmony_hub_plug
|
||
mode: single
|
||
- id: '1610388192224'
|
||
alias: 'Living Room: TV Turned On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.tv_powered_on
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':tv: TV Turned on.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.playstation_powered_on
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.living_room_select_game_input
|
||
default: []
|
||
mode: single
|
||
- id: '1610388192225'
|
||
alias: 'Living Room: TV Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.tv_powered_on
|
||
from: 'on'
|
||
to: 'off'
|
||
for: 00:00:30
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':tv: TV Turned off.'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- sequence:
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.tv_backlight
|
||
state: 'on'
|
||
then:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Turning off :tv: TV backlight (WLED).'
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: light.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: light.tv_backlight
|
||
mode: single
|
||
- id: '1754839043037'
|
||
alias: 'Living Room: Ceiling Light Switch Flipped'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.living_room_ceiling_lights_input_0
|
||
not_from:
|
||
- unavailable
|
||
- unknown
|
||
not_to:
|
||
- unavailable
|
||
- unknown
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
metadata: {}
|
||
data:
|
||
message: Light switch flipped
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.living_room_ceiling
|
||
state: 'off'
|
||
then:
|
||
- action: scene.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: scene.living_room_ceiling_lights_on
|
||
else:
|
||
- action: scene.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: scene.living_room_ceiling_lights_off
|
||
mode: single
|
||
- id: '1654005357582'
|
||
alias: 'Living Room: Terina''s Work Laptop Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- group.terinas_work_computer
|
||
not_from: unavailable
|
||
to: not_home
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Terina's work laptop turned off.
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: script.check_terinas_work_laptop_status
|
||
data: {}
|
||
mode: single
|
||
- id: '1654005357583'
|
||
alias: 'Living Room: Terina''s Work Laptop Turned On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- group.terinas_work_computer
|
||
not_from: unavailable
|
||
to: not_home
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Terina's work laptop turned on.
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- action: script.check_terinas_work_laptop_status
|
||
data: {}
|
||
mode: single
|
||
- id: '1678741966793'
|
||
alias: 'Living Room: Computer Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- group.family_computer
|
||
- group.terinas_work_computer
|
||
from: home
|
||
to: not_home
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_living_room_blind_automations
|
||
state: 'on'
|
||
- condition: sun
|
||
after: sunrise
|
||
- condition: time
|
||
after: 08:00:30
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: state
|
||
entity_id: group.family_computer
|
||
state: not_home
|
||
- condition: state
|
||
entity_id: group.terinas_work_computer
|
||
state: not_home
|
||
- or:
|
||
- condition: state
|
||
entity_id: cover.living_room_blinds_left
|
||
attribute: current_tilt_position
|
||
state: 50
|
||
- condition: state
|
||
entity_id: cover.living_room_blinds_middle
|
||
attribute: current_tilt_position
|
||
state: 50
|
||
- condition: state
|
||
entity_id: cover.living_room_blinds_right
|
||
attribute: current_tilt_position
|
||
state: 50
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: All computers turned off. Opening blinds.
|
||
title: ':couch_and_lamp: Living Room'
|
||
log_level: Debug
|
||
- parallel:
|
||
- if:
|
||
- condition: state
|
||
entity_id: cover.living_room_blinds_left
|
||
attribute: current_tilt_position
|
||
state: 50
|
||
then:
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 50
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_left
|
||
- if:
|
||
- condition: state
|
||
entity_id: cover.living_room_blinds_middle
|
||
attribute: current_tilt_position
|
||
state: 50
|
||
then:
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 50
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_middle
|
||
- if:
|
||
- condition: state
|
||
entity_id: cover.living_room_blinds_right
|
||
attribute: current_tilt_position
|
||
state: 50
|
||
then:
|
||
- action: cover.set_cover_tilt_position
|
||
data:
|
||
tilt_position: 50
|
||
target:
|
||
entity_id:
|
||
- cover.living_room_blinds_right
|
||
mode: single
|
||
- id: '1652029607668'
|
||
alias: 'Kitchen: Temperature Reaches target'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.meater_probe_target
|
||
above: sensor.meater_probe_internal
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':cook: :thermometer: The {{states(''sensor.meater_probe_cooking'')}}
|
||
has reached temperature.'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1652029734731'
|
||
alias: 'Kitchen: Cooking Has Started'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.meater_probe_cook_state
|
||
to: started
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':cook: The {{states(''sensor.meater_probe_cooking'')}} has started
|
||
cooking.'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1625924056779'
|
||
alias: Mobile Notification Action Router
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: mobile_app_notification_action
|
||
event_data: {}
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''set_bedroom_blinds_30''
|
||
}}'
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
above: '30'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':window: Closing bedroom blinds event received.'
|
||
- action: cover.set_cover_position
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
data:
|
||
position: 30
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''server_fan_off'' }}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turning off server fan event received.
|
||
- action: switch.turn_off
|
||
target:
|
||
entity_id: switch.server_fan
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''switch_on_office_fan''
|
||
}}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turning on office fan event received.
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.office_fan
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''switch_on_fridge_freezer''
|
||
}}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turning on fridge freezer event received.
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.ecoflow_kitchen_plug
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''switch_on_freezer'' }}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turning on freezer event received.
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.freezer
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''guest_mode_arm_alarm_and_turn_off_devices''
|
||
}}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':bell: Guest mode override. Turning alarm on and devices off.'
|
||
- action: script.set_alarm_to_away_mode
|
||
- action: script.lock_front_door
|
||
- action: script.everybody_leave_home
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''guest_mode_arm_alarm_away''
|
||
}}'
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Guest
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':bell: Guest mode override. Turning alarm in away mode (motion
|
||
and sensors) on only.'
|
||
- action: script.set_alarm_to_away_mode
|
||
- action: script.lock_front_door
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''guest_mode_turn_off_devices''
|
||
}}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Guest mode override. Turning devices off only.
|
||
- action: script.everybody_leave_home
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''switch_off_alarm'' }}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Alarm override. Turning Alarm off.
|
||
- action: script.set_alarm_to_disarmed_mode
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''switch_off_attic_lights''
|
||
}}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turning attic lights off event.
|
||
- action: light.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: light.attic
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''update_home_assistant''
|
||
}}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Upgrade Home Assistant event.
|
||
- action: update.install
|
||
data:
|
||
backup: true
|
||
target:
|
||
entity_id: update.home_assistant_core_update
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.action == ''zappi_stop'' }}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Stop Zappi event.
|
||
- action: select.select_option
|
||
data:
|
||
option: Stopped
|
||
target:
|
||
entity_id: select.myenergi_zappi_charge_mode
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1701033189010'
|
||
alias: 'Porch: Front Door Lock Status Change'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- lock.front_door
|
||
not_from:
|
||
- unlocked
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.front_door
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_front_door_lock_automations
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: lock.front_door
|
||
state: locking
|
||
- condition: state
|
||
entity_id: lock.front_door
|
||
state: unlocking
|
||
sequence:
|
||
- parallel:
|
||
- action: script.front_door_lock_status
|
||
data: {}
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Front door "{{ states('lock.front_door') }}".
|
||
title: Porch
|
||
log_level: Normal
|
||
- conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: lock.front_door
|
||
state: locked
|
||
- condition: state
|
||
entity_id: lock.front_door
|
||
state: unlocked
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Front door "{{ states('lock.front_door') }}".
|
||
title: Porch
|
||
log_level: Normal
|
||
- action: script.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: script.front_door_lock_status
|
||
mode: single
|
||
- id: '1752928735125'
|
||
alias: 'Nuki: Unavailable'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- lock.front_door
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: button.press
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: button.front_door_reboot_nuki
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Nuki hub is unavailable. Restarting Hub.
|
||
title: Nuki
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1608655560832'
|
||
alias: '3D Printer: Print Started'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.octoprint_printing
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_3d_printer_automations
|
||
state: 'on'
|
||
actions:
|
||
- wait_for_trigger:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.octoprint_estimated_finish_time
|
||
above: '0'
|
||
timeout: '60'
|
||
- parallel:
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.prusa_fan
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Printer priming. Turning on extruder :dash: fan.'
|
||
title: ':printer: :black_square_button: 3D printer'
|
||
log_level: Normal
|
||
- wait_for_trigger:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.octoprint_estimated_finish_time
|
||
above: '0'
|
||
timeout: '60'
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Printer started. Estimated time to completion: {{ states(''sensor.octoprint_estimated_finish_time'')
|
||
}}.'
|
||
title: ':printer: :black_square_button: 3D printer'
|
||
log_level: Normal
|
||
- choose:
|
||
- conditions:
|
||
- condition: sun
|
||
after: sunset
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':city_sunset: Printing started after sunset. Turning Printer
|
||
:high_brightness: :bulb: light on.'
|
||
title: ':printer: :black_square_button: 3D printer'
|
||
log_level: Normal
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.3d_printer_light_on
|
||
- conditions:
|
||
- condition: sun
|
||
before: sunrise
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':city_sunset: Printing started before sunrise. Turning Printer
|
||
:high_brightness: :bulb: light on.'
|
||
title: ':printer: :black_square_button: 3D printer'
|
||
log_level: Normal
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.3d_printer_light_on
|
||
- conditions:
|
||
- condition: sun
|
||
after: sunrise
|
||
before: sunset
|
||
- condition: state
|
||
entity_id: light.prusa
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':sunny: Printing started during the day. Turning Printer light
|
||
off.'
|
||
title: ':printer: :black_square_button: 3D printer'
|
||
log_level: Normal
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.3d_printer_light_off
|
||
default:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':sunrise: Printing started after sunrise. Not turning on printer
|
||
light.'
|
||
title: ':printer: :black_square_button: 3D printer'
|
||
log_level: Normal
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.3d_printer_light_off
|
||
mode: single
|
||
- id: '1619873649348'
|
||
alias: '3D Printer: 50% Complete'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.octoprint_job_percentage
|
||
above: '50'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_3d_printer_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 50% complete and due to finish at {{ states('sensor.octoprint_estimated_finish_time')
|
||
}}.
|
||
title: ':printer: :black_square_button: 3D printer'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1623087278802'
|
||
alias: '3D Printer: Check If Printing Light'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time_pattern
|
||
hours: '*'
|
||
seconds: '*'
|
||
minutes: /30
|
||
- trigger: sun
|
||
event: sunset
|
||
id: sunset
|
||
- trigger: sun
|
||
event: sunrise
|
||
conditions: []
|
||
actions:
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.prusa
|
||
state: 'on'
|
||
then:
|
||
- action: script.3d_printer_check_turn_off_light
|
||
else:
|
||
- action: script.3d_printer_check_turn_on_light
|
||
mode: single
|
||
- id: '1613321560216'
|
||
alias: '3D Printer: Finished Printing'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.octoprint_printing
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_3d_printer_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':white_check_mark: Completed 3D printing which started {{states(''sensor.octoprint_start_time'')}}'
|
||
title: ':printer: :black_square_button: 3D printer'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1656239435552'
|
||
alias: '3D Printer: Light Turned on'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- light.prusa
|
||
to: 'on'
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_3d_printer_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.3d_printer_check_turn_off_light
|
||
data: {}
|
||
mode: single
|
||
- id: '168962611780'
|
||
alias: 'Octopus Energy: Electricity Rates Changed'
|
||
description: ''
|
||
trace:
|
||
stored_traces: 40
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: sensor.octopus_energy_electricity_current_rate
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- alias: Check Solar Assistant
|
||
if:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_solar_assistant_automations
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: select.growatt_sph_work_mode_priority
|
||
state: unavailable
|
||
then:
|
||
- action: script.solar_assistant_check_charging_mode
|
||
data:
|
||
event: event
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
current_electricity_export_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_export_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
- alias: Check Zappi
|
||
choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_zappi_automations
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: sensor.myenergi_zappi_plug_status
|
||
state: EV Disconnected
|
||
sequence:
|
||
- alias: Check Zappi
|
||
action: script.zappi_check_ev_charge
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
default: []
|
||
- alias: Check Eddi
|
||
choose:
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: select.myenergi_eddi_operating_mode
|
||
state: Stopped
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
- condition: state
|
||
entity_id: input_boolean.enable_hot_water_automations
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.hvac_check_eddi_boost_hot_water
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
default: []
|
||
- alias: Check Ecoflow
|
||
choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ecoflow_automations
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.ecoflow_check_charging_mode
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
default: []
|
||
- alias: Conservatory underfloor heating
|
||
choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_conservatory_under_floor_heating_automations
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.conservatory_electricity_rate_change
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
default: []
|
||
- alias: Tesla not connected and home
|
||
choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.model_y_charger
|
||
state: Unplugged
|
||
- condition: state
|
||
entity_id: sensor.myenergi_zappi_plug_status
|
||
state: EV Disconnected
|
||
- condition: state
|
||
entity_id: input_boolean.enable_tesla_automations
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.tesla_notify_low_electricity_rates
|
||
data: {}
|
||
default: []
|
||
- alias: Check Airer
|
||
choose:
|
||
- conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_conservatory_airer_when_cost_below_nothing
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_conservatory_airer_when_cost_nothing
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.check_conservatory_airer
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
default: []
|
||
- id: '168962611781'
|
||
alias: Refresh intelligent dispatches
|
||
description: 'Example from: https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/services/#octopus_energyrefresh_intelligent_dispatches'
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: sensor.myenergi_zappi_plug_status
|
||
not_to: EV Disconnected
|
||
- trigger: time_pattern
|
||
minutes: /3
|
||
conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: sensor.myenergi_zappi_plug_status
|
||
state: EV Disconnected
|
||
actions:
|
||
- action: script.refresh_octopus_intelligent_dispatching
|
||
data: {}
|
||
mode: single
|
||
- id: '1744064001680'
|
||
alias: 'People: Update Danny''s Owntracks'
|
||
description: https://devblog.yvn.no/posts/replacing-maps-timeline-with-owntracks/
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- device_tracker.danny_s_phone
|
||
conditions: []
|
||
actions:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
topic: owntracks/danny/iphone
|
||
payload: "{\n \"_type\": \"location\",\n \"t\": \"p\",\n \"tid\": \"ha\"\
|
||
,\n \"lat\": {{ state_attr('device_tracker.danny_s_phone', 'latitude') }},\n\
|
||
\ \"lon\": {{ state_attr('device_tracker.danny_s_phone', 'longitude') }},\n\
|
||
\ \"alt\": {{ state_attr('device_tracker.danny_s_phone', 'altitude') | default(0)\
|
||
\ }},\n \"vac\": {{ state_attr('device_tracker.danny_s_phone', 'vertical_accuracy')\
|
||
\ | default(0) }},\n \"acc\": {{ state_attr('device_tracker.danny_s_phone',\
|
||
\ 'gps_accuracy') | default(0) }},\n \"vel\": {{ state_attr('device_tracker.danny_s_phone',\
|
||
\ 'speed') | default(0) }},\n \"cog\": {{ state_attr('device_tracker.danny_s_phone',\
|
||
\ 'course') | default(0) }},\n \"tst\": {{ now().timestamp() | int }}\n}\n"
|
||
retain: true
|
||
mode: single
|
||
- id: '1744064001681'
|
||
alias: 'People: Update Terina''s Owntracks'
|
||
description: https://devblog.yvn.no/posts/replacing-maps-timeline-with-owntracks/
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- device_tracker.oneplus_10
|
||
conditions: []
|
||
actions:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
topic: owntracks/terina/oneplus
|
||
payload: "{\n \"_type\": \"location\",\n \"t\": \"p\",\n \"tid\": \"ha\"\
|
||
,\n \"lat\": {{ state_attr('device_tracker.oneplus_10', 'latitude') }},\n\
|
||
\ \"lon\": {{ state_attr('device_tracker.oneplus_10', 'longitude') }},\n\
|
||
\ \"alt\": {{ state_attr('device_tracker.oneplus_10', 'altitude') | default(0)\
|
||
\ }},\n \"vac\": {{ state_attr('device_tracker.oneplus_10', 'vertical_accuracy')\
|
||
\ | default(0) }},\n \"acc\": {{ state_attr('device_tracker.oneplus_10',\
|
||
\ 'gps_accuracy') | default(0) }},\n \"vel\": {{ state_attr('device_tracker.oneplus_10',\
|
||
\ 'speed') | default(0) }},\n \"cog\": {{ state_attr('device_tracker.oneplus_10',\
|
||
\ 'course') | default(0) }},\n \"tst\": {{ now().timestamp() | int }}\n}\n"
|
||
retain: true
|
||
mode: single
|
||
- id: '1744064001682'
|
||
alias: 'People: Update Leo''s Owntracks'
|
||
description: https://devblog.yvn.no/posts/replacing-maps-timeline-with-owntracks/
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- device_tracker.leos_iphone
|
||
conditions: []
|
||
actions:
|
||
- action: mqtt.publish
|
||
metadata: {}
|
||
data:
|
||
topic: owntracks/leo/iphone
|
||
payload: "{\n \"_type\": \"location\",\n \"t\": \"p\",\n \"tid\": \"ha\"\
|
||
,\n \"lat\": {{ state_attr('device_tracker.leos_iphone', 'latitude') }},\n\
|
||
\ \"lon\": {{ state_attr('device_tracker.leos_iphone', 'longitude') }},\n\
|
||
\ \"alt\": {{ state_attr('device_tracker.leos_iphone', 'altitude') | default(0)\
|
||
\ }},\n \"vac\": {{ state_attr('device_tracker.leos_iphone', 'vertical_accuracy')\
|
||
\ | default(0) }},\n \"acc\": {{ state_attr('device_tracker.leos_iphone',\
|
||
\ 'gps_accuracy') | default(0) }},\n \"vel\": {{ state_attr('device_tracker.leos_iphone',\
|
||
\ 'speed') | default(0) }},\n \"cog\": {{ state_attr('device_tracker.leos_iphone',\
|
||
\ 'course') | default(0) }},\n \"tst\": {{ now().timestamp() | int }}\n}\n"
|
||
retain: true
|
||
mode: single
|
||
- id: '1661076689668'
|
||
alias: 'Energy: Battery Charged And Forecasted Excess Solar'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.growatt_sph_battery_state_of_charge
|
||
above: input_number.battery_charged_notification
|
||
conditions:
|
||
- condition: or
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.total_solar_forecast_estimated_energy_production_this_hour
|
||
above: '0'
|
||
- condition: numeric_state
|
||
entity_id: sensor.total_solar_forecast_estimated_energy_production_next_hour
|
||
above: '0'
|
||
- not:
|
||
- condition: state
|
||
entity_id: sensor.growatt_sph_inverter_mode
|
||
state: Battery first
|
||
- alias: Not from an unknown state before
|
||
condition: template
|
||
value_template: '{{ trigger.from_state.state != ''unknown''}}'
|
||
actions:
|
||
- action: script.energy_notify_excess_solar
|
||
data: {}
|
||
mode: single
|
||
- id: '1660858653319'
|
||
alias: 'Energy: Solar Forecast Tomorrow'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: '21:00:00'
|
||
conditions:
|
||
- alias: Check tariff is on Agile
|
||
condition: template
|
||
value_template: '{{ ''AGILE'' in state_attr(''event.octopus_energy_electricity_current_day_rates'',
|
||
''tariff_code'')|upper }}'
|
||
actions:
|
||
- alias: update forecast
|
||
action: script.update_solcast
|
||
data: {}
|
||
- parallel:
|
||
- if:
|
||
- condition: numeric_state
|
||
entity_id: sensor.total_solar_forecast_estimated_energy_production_tomorrow
|
||
below: input_number.solar_generation_minimum_threshold
|
||
then:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Forecast generation is expected to be low ({{ states(''sensor.total_solar_forecast_estimated_energy_production_tomorrow'')
|
||
}}< {{ states(''input_number.solar_generation_minimum_threshold'', with_unit=True)
|
||
}}).
|
||
|
||
Incrementing counter from {{ states(''input_number.consecutive_forecast_days_below_solar_generation'')
|
||
}} to {{ (states(''input_number.consecutive_forecast_days_below_solar_generation'')|int(0))
|
||
+ 1 }} {{ state_attr(''input_number.consecutive_forecast_days_below_solar_generation'',
|
||
''unit_of_measurement'') }}.'
|
||
title: ':sunny: :zap: Solar'
|
||
log_level: Normal
|
||
- action: input_number.increment
|
||
data: {}
|
||
target:
|
||
entity_id: input_number.consecutive_forecast_days_below_solar_generation
|
||
else:
|
||
- action: input_number.set_value
|
||
data:
|
||
value: 0
|
||
target:
|
||
entity_id: input_number.consecutive_forecast_days_below_solar_generation
|
||
- action: script.energy_notify_tomorrows_solar_forecast
|
||
data: {}
|
||
mode: single
|
||
- id: '1664743590782'
|
||
alias: 'Energy: Battery Charged Today'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.growatt_sph_battery_state_of_charge
|
||
above: input_number.growatt_battery_charged_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.battery_charged_today
|
||
state: 'off'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Battery charged today
|
||
title: ':sunny: :zap: Solar'
|
||
log_level: Debug
|
||
- action: input_boolean.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id: input_boolean.battery_charged_today
|
||
- if:
|
||
- condition: numeric_state
|
||
entity_id: input_number.consecutive_days_battery_not_charged
|
||
above: 0
|
||
then:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Resetting days not fully charged.
|
||
title: ':sunny: :zap: Solar'
|
||
log_level: Debug
|
||
- action: input_number.set_value
|
||
data:
|
||
value: 0
|
||
target:
|
||
entity_id: input_number.consecutive_days_battery_not_charged
|
||
mode: single
|
||
- id: '1664743700827'
|
||
alias: 'Energy: Reset Battery Charged Today'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 00:00:00
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.battery_charged_today
|
||
state: 'on'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Resetting battery charged today.
|
||
title: ':sunny: :zap: Solar'
|
||
log_level: Debug
|
||
- action: input_boolean.turn_off
|
||
data: {}
|
||
target:
|
||
entity_id: input_boolean.battery_charged_today
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.battery_charged_today
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Battery did not fully charge today (> {{ states('input_number.growatt_battery_charged_threshold',
|
||
with_unit=True) }}). Adding a day to count ({{ states('input_number.consecutive_days_battery_not_charged')
|
||
}}).
|
||
title: ':sunny: :zap: Solar'
|
||
log_level: Debug
|
||
- action: input_number.increment
|
||
data: {}
|
||
target:
|
||
entity_id: input_number.consecutive_days_battery_not_charged
|
||
mode: single
|
||
- id: '1663589154517'
|
||
alias: 'Energy: Solar Production exceed threshold'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.total_solar_forecast_estimated_energy_production_today
|
||
above: input_number.solar_generation_minimum_threshold
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Production above threshold. Resetting Forecast
|
||
title: ':sunny: :zap: Solar'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1664744505278'
|
||
alias: 'Energy: Consecutive Days Battery Not Charged'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: input_number.consecutive_days_battery_not_charged
|
||
above: 6
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: It has been {{ states('input_number.consecutive_days_battery_not_charged')
|
||
}} days where the battery has not been charged fully.
|
||
title: ':sunny: :zap: Solar'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1663588514009'
|
||
alias: 'Energy: Consecutive Low Solar Generation'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: input_number.consecutive_forecast_days_below_solar_generation
|
||
above: 6
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: It has been {{ states('input_number.consecutive_forecast_days_below_solar_generation')
|
||
}} days with low solar generation.
|
||
title: ':sunny: :zap: Solar'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1674508693884'
|
||
alias: 'Energy: Battery Charge Notification'
|
||
description: Used for Demand Flexibility Service
|
||
triggers:
|
||
- trigger: time
|
||
at: '15:55:00'
|
||
conditions:
|
||
- condition: template
|
||
value_template: '{{ (states(''sensor.growatt_sph_battery_state_of_charge'')|int(0))
|
||
> ((states(''number.growatt_sph_load_first_stop_discharge'')|int(0)) + 1) }}'
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: '{{ states(''sensor.growatt_sph_battery_state_of_charge'') }}% (That
|
||
is {{ state_attr(''sensor.battery_charge_remaining_hours'', ''duration'')
|
||
}}) remaining.'
|
||
title: ':house_with_garden: :battery: House Battery'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1704121569476'
|
||
alias: 'Energy: Low Battery Before Peak Time'
|
||
description: 'TODO: Make this dynamic'
|
||
triggers:
|
||
- trigger: time
|
||
at: '14:00:00'
|
||
- trigger: time
|
||
at: '15:00:00'
|
||
conditions:
|
||
- alias: Battery runtime less than 19:00 (usually end of peak time)
|
||
condition: template
|
||
value_template: '{{ today_at("19:00") > as_datetime(states(''sensor.battery_charge_remaining_hours''))
|
||
}}'
|
||
- alias: Not already charging battery
|
||
not:
|
||
- condition: state
|
||
entity_id: sensor.growatt_sph_inverter_mode
|
||
state: Battery first
|
||
- alias: Check tariff is on Agile
|
||
condition: template
|
||
value_template: '{{ ''AGILE'' in state_attr(''event.octopus_energy_electricity_current_day_rates'',
|
||
''tariff_code'')|upper }}'
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: Battery will not last beyond 19:00 today ({{ as_datetime(states('sensor.battery_charge_remaining_hours'))
|
||
}}). Consider charging the battery.
|
||
title: Solar
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1680444237958'
|
||
alias: 'Energy: Power Cut Notification'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.growatt_sph_load_power
|
||
to: '0'
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: No electricity consumption detected for over a minute. Check for power
|
||
cut.
|
||
title: ':warning: :zap: :house_with_garden: House :warning:'
|
||
mode: single
|
||
- id: '1712404842177'
|
||
alias: 'Energy: High Grid Power Draw'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.house_current
|
||
above: sensor.grid_max_import_power_warning
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Current draw is close to cut out fuse ({{ (states('sensor.grid_max_import_power_warning')|float(0))|round(2)
|
||
}}/{{ states('input_number.cut_out_fuse_size') }}). Consider turning devices
|
||
off.
|
||
title: 'Energy: House'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1719080490915'
|
||
alias: 'Energy: Saving Session Started'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.octopus_energy_octoplus_saving_sessions
|
||
not_from: unavailable
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Energy Saver Session Started
|
||
title: Energy
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1719080490916'
|
||
alias: 'Energy: Saving Session Finished'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.octopus_energy_octoplus_saving_sessions
|
||
not_from: unavailable
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Energy Saver Session Finished
|
||
title: Energy
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1606428361967'
|
||
alias: 'Office: Motion Detected And Light Is On'
|
||
description: Split automation depending on light state due to dynamic attributes
|
||
based on state. See https://community.home-assistant.io/t/dynamic-attributes/93226/2?u=tuxinator94
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.office_motion_2_presence
|
||
to: 'on'
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.office_motion_2_target_distance
|
||
above: 0.1
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_motion_triggers
|
||
state: 'on'
|
||
- or:
|
||
- condition: state
|
||
entity_id: light.office_2
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.office_3
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- and:
|
||
- condition: sun
|
||
before: sunset
|
||
before_offset: -01:00:00
|
||
- condition: numeric_state
|
||
entity_id: sensor.office_motion_2_illuminance
|
||
above: input_number.office_light_level_threshold
|
||
- not:
|
||
- condition: state
|
||
entity_id: sensor.office_motion_2_illuminance
|
||
state: unavailable
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: :bulb: :high_brightness: Motion detected in the
|
||
office but it''s bright enough ({{ states(''sensor.office_motion_2_illuminance'')
|
||
}} > {{ states(''input_number.office_light_level_threshold'', with_unit=True)
|
||
}}). Skipping turning light on.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: timer.cancel
|
||
data: {}
|
||
target:
|
||
entity_id: timer.office_lights_off
|
||
- conditions:
|
||
- and:
|
||
- condition: numeric_state
|
||
entity_id: sensor.office_motion_2_illuminance
|
||
below: input_number.office_light_level_threshold
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: light.office_2
|
||
attribute: brightness
|
||
below: '200'
|
||
- condition: numeric_state
|
||
entity_id: light.office_3
|
||
attribute: brightness
|
||
below: '200'
|
||
sequence:
|
||
- parallel:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.office_main_light_on
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: :bulb: :high_brightness: Motion detected in the
|
||
office and it''s dark ({{ states(''sensor.office_motion_2_illuminance'')
|
||
}} < {{ states(''input_number.office_light_level_threshold'', with_unit=True)
|
||
}}). Turning up :bulb: :high_brightness: lights.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: timer.cancel
|
||
data: {}
|
||
target:
|
||
entity_id: timer.office_lights_off
|
||
- conditions:
|
||
- and:
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: sensor.office_motion_2_illuminance
|
||
above: input_number.office_light_level_threshold
|
||
- condition: state
|
||
entity_id: sensor.office_motion_2_illuminance
|
||
state: unavailable
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: light.office_2
|
||
attribute: brightness
|
||
below: '200'
|
||
- condition: numeric_state
|
||
entity_id: light.office_3
|
||
attribute: brightness
|
||
below: '200'
|
||
sequence:
|
||
- parallel:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.office_main_light_off
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: :bulb: :high_brightness: Motion detected in the
|
||
office and bright ({{ states(''sensor.office_motion_2_illuminance'')
|
||
}} < {{ states(''input_number.office_light_level_threshold'', with_unit=True)
|
||
}}). Turning office lights off.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: timer.cancel
|
||
data: {}
|
||
target:
|
||
entity_id: timer.office_lights_off
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: timer.office_lights_off
|
||
state: active
|
||
sequence:
|
||
- parallel:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.office_main_light_off
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: :bulb: :high_brightness: Motion detected in the
|
||
office Cancelling Timer.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: timer.cancel
|
||
data: {}
|
||
target:
|
||
entity_id: timer.office_lights_off
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1632064858461'
|
||
alias: 'Office: Motion Detected And Light Is Off'
|
||
description: Split automation depending on light state due to dynamic attributes
|
||
based on state. See https://community.home-assistant.io/t/dynamic-attributes/93226/2?u=tuxinator94
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.office_motion_2_presence
|
||
to: 'on'
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.office_motion_2_target_distance
|
||
above: 0.1
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_motion_triggers
|
||
state: 'on'
|
||
- or:
|
||
- condition: state
|
||
entity_id: light.office_2
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: light.office_3
|
||
state: 'off'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- or:
|
||
- and:
|
||
- condition: sun
|
||
before: sunset
|
||
before_offset: -01:00:00
|
||
- condition: numeric_state
|
||
entity_id: sensor.office_motion_2_illuminance
|
||
above: input_number.office_light_level_threshold
|
||
- condition: state
|
||
entity_id: sensor.office_motion_2_illuminance
|
||
state: unavailable
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: :bulb: :high_brightness: Motion detected in the
|
||
office but it''s bright enough ({{ states(''sensor.office_motion_2_illuminance'')
|
||
}} > {{ states(''input_number.office_light_level_threshold'', with_unit=True)
|
||
}}). Skipping turning light on.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: timer.cancel
|
||
data: {}
|
||
target:
|
||
entity_id: timer.office_lights_off
|
||
- sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.office_room_brightness_above_threshold
|
||
data: {}
|
||
- delay:
|
||
seconds: 1
|
||
- action: light.turn_off
|
||
target:
|
||
entity_id:
|
||
- light.office_4
|
||
data: {}
|
||
default:
|
||
- parallel:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.office_main_light_on
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: :bulb: :high_brightness: Motion detected in the office
|
||
and it''s dark ({{ states(''sensor.office_motion_2_illuminance'') }} <
|
||
{{ states(''input_number.office_light_level_threshold'') }}). Turning
|
||
:bulb: :high_brightness: lights on.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: timer.cancel
|
||
data: {}
|
||
target:
|
||
entity_id: timer.office_lights_off
|
||
mode: single
|
||
- id: '1587044886896'
|
||
alias: 'Office: No Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.office_motion_2_target_distance
|
||
below: 0.01
|
||
for: 00:02:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_motion_triggers
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: sensor.office_motion_2_target_distance
|
||
below: 0.01
|
||
- condition: state
|
||
entity_id: binary_sensor.office_motion_2_presence
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion in the office. Starting :hourglass_flowing_sand:
|
||
timer for 2 minutes before turning lights off.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: timer.start
|
||
data:
|
||
duration: 00:01:00
|
||
target:
|
||
entity_id: timer.office_lights_off
|
||
mode: single
|
||
- id: '1587044886897'
|
||
alias: 'Office: Office Light Off Timer Finished'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: timer.finished
|
||
event_data:
|
||
entity_id: timer.office_lights_off
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_motion_triggers
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion in the office for 2 minutes. Turning
|
||
lights off.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.office_main_light_off
|
||
mode: single
|
||
- id: '1622584959878'
|
||
alias: 'Office: High Temperature'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.office_area_mean_temperature
|
||
above: '26'
|
||
- trigger: numeric_state
|
||
entity_id: sensor.office_area_mean_temperature
|
||
above: '29'
|
||
for: 00:01:00
|
||
- trigger: numeric_state
|
||
entity_id: sensor.office_area_mean_temperature
|
||
for: 00:01:00
|
||
above: '31'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: switch.office_fan
|
||
state: 'off'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: home
|
||
- condition: time
|
||
before: '22:00:00'
|
||
- condition: time
|
||
after: 08:30:00
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':hotsprings: :people_holding_hands: Office temperature is high
|
||
({{ states(''sensor.office_area_mean_temperature'') }}c) and someone
|
||
is home. Turning on fan.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.office_fan
|
||
- conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.office_area_mean_temperature
|
||
above: '29'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :hotsprings: Office temperature is above 29c ({{ states(''sensor.office_area_mean_temperature'')
|
||
}}c).'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: script.send_actionable_notification_with_2_buttons
|
||
data:
|
||
message: Turn on office fan?
|
||
title: ♨️🏢Office temperature is 29c+
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
action1_title: 'Yes'
|
||
action1_name: switch_on_office_fan
|
||
action2_title: 'No'
|
||
action2_name: ignore
|
||
- conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.office_area_mean_temperature
|
||
above: '31'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :hotsprings: Temperature is above 31c. Turning fan
|
||
on.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.office_fan
|
||
default: []
|
||
mode: single
|
||
- id: '1728046359271'
|
||
alias: 'Office: Fan Turns Off at 3am'
|
||
description: Turns off the office fan at 3am when it's on
|
||
triggers:
|
||
- trigger: time
|
||
at: 03:00:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: switch.office_fan
|
||
state: 'on'
|
||
actions:
|
||
- action: switch.turn_off
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: switch.office_fan
|
||
mode: single
|
||
- id: '1619865008647'
|
||
alias: 'Office: Computer Turned On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: group.jd_computer
|
||
from: not_home
|
||
to: home
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':level_slider: Turned on GoXLR.'
|
||
title: ':desktop_computer: Computer'
|
||
log_level: Debug
|
||
- if:
|
||
- condition: state
|
||
entity_id: switch.office_monitor_bar
|
||
state: 'off'
|
||
then:
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.office_monitor_bar
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turned on monitor light.
|
||
title: ':desktop_computer: Computer'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1606256309890'
|
||
alias: 'Office: Computer Turned Off For A Period Of Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: group.jd_computer
|
||
for: 00:10:00
|
||
to: not_home
|
||
from: home
|
||
conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: device_tracker.udm_pro
|
||
state: unavailable
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turned off for more than 10 minutes.
|
||
title: ':desktop_computer: Computer'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.office_desk_lights_off
|
||
- action: script.send_to_home_log
|
||
data:
|
||
messsage: Turned off desk lights.
|
||
log_level: Debug
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Turned off for more than 10 minutes. Turned off :level_slider: goXLR'
|
||
title: ':desktop_computer: Computer'
|
||
log_level: Debug
|
||
- action: script.office_turn_off_backup_drive
|
||
- action: script.ecoflow_office_turn_off_plug
|
||
mode: single
|
||
- id: '1678741966796'
|
||
alias: 'Office: Computer Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- group.jd_computer
|
||
from: home
|
||
to: not_home
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- if:
|
||
- alias: Is work computer on?
|
||
condition: state
|
||
entity_id: group.dannys_work_computer
|
||
state: not_home
|
||
then:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Computer turned off. Turning monitor light off.
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: switch.turn_off
|
||
target:
|
||
entity_id:
|
||
- switch.office_monitor_bar
|
||
mode: single
|
||
- id: '1678741966794'
|
||
alias: 'Office: Computer Turned Off After Sunrise'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- group.jd_computer
|
||
from: home
|
||
to: not_home
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_blind_automations
|
||
state: 'on'
|
||
- condition: sun
|
||
after: sunrise
|
||
- condition: time
|
||
after: 08:00:30
|
||
- condition: sun
|
||
before: sunset
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Computer turned off. Opening blinds.
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: script.office_open_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1619865008649'
|
||
alias: 'Office: Work Computer Turned On'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: group.dannys_work_computer
|
||
from: not_home
|
||
to: home
|
||
conditions:
|
||
- condition: state
|
||
entity_id: switch.office_monitor_bar
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.office_monitor_bar
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turned on monitor light.
|
||
title: ':desktop_computer: Computer'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1678741966795'
|
||
alias: 'Office: Work Computer Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- group.dannys_work_computer
|
||
from: home
|
||
to: not_home
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- if:
|
||
- alias: Is personal computer on?
|
||
condition: state
|
||
entity_id: group.jd_computer
|
||
state: not_home
|
||
then:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Danny's work computer turned off. Turning monitor light off.
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: switch.turn_off
|
||
target:
|
||
entity_id:
|
||
- switch.office_monitor_bar
|
||
mode: single
|
||
- id: '1622374444832'
|
||
alias: 'Office: Open Blinds In The Morning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 08:00:00
|
||
conditions: []
|
||
actions:
|
||
- action: weather.get_forecasts
|
||
target:
|
||
entity_id: weather.home
|
||
data:
|
||
type: hourly
|
||
response_variable: weather
|
||
- choose:
|
||
- alias: Really bright and blinds are closed already
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
above: input_number.blind_high_brightness_threshold
|
||
- or:
|
||
- condition: state
|
||
entity_id: group.dannys_work_computer
|
||
state: home
|
||
- condition: state
|
||
entity_id: group.jd_computer
|
||
state: home
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Keeping blinds
|
||
closed.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
above: input_number.blind_low_brightness_threshold
|
||
- condition: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
below: input_number.blind_high_brightness_threshold
|
||
- or:
|
||
- condition: state
|
||
entity_id: group.dannys_work_computer
|
||
state: home
|
||
- condition: state
|
||
entity_id: group.jd_computer
|
||
state: home
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute |
|
||
int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: It''s
|
||
bright outside ({{ states(''sensor.front_garden_motion_illuminance'',
|
||
with_unit=True) }}) so partially opening office blinds.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
target:
|
||
entity_id: cover.office_blinds
|
||
data:
|
||
tilt_position: 25
|
||
default:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Opening blinds.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: script.office_open_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1622374233312'
|
||
alias: 'Office: Close Office Blinds At Night 2'
|
||
description: ''
|
||
triggers:
|
||
- trigger: sun
|
||
event: sunset
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: cover.office_blinds
|
||
attribute: current_tilt_position
|
||
above: 25
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.office_windows
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :window: Office window is still open so not closing
|
||
blinds. before closing blinds. :warning:'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
default:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':city_sunset: :sun_with_face: :window: It''s getting dark, closing
|
||
office blinds.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
target:
|
||
entity_id: cover.office_blinds
|
||
data:
|
||
tilt_position: 25
|
||
mode: single
|
||
- id: '1622374233310'
|
||
alias: 'Office: Close Office Blinds At Night 2'
|
||
description: ''
|
||
triggers:
|
||
- trigger: sun
|
||
event: sunset
|
||
offset: 01:00:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: cover.office_blinds
|
||
attribute: current_tilt_position
|
||
above: 0
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.office_windows
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :window: Office window is still open so not closing
|
||
blinds. before closing blinds. :warning:'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
default:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':city_sunset: :sun_with_face: :window: It''s getting dark, closing
|
||
office blinds.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: script.office_close_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1622666920056'
|
||
alias: 'Office: Window Closed At Night'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.office_windows
|
||
from: 'on'
|
||
to: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_blind_automations
|
||
state: 'on'
|
||
- or:
|
||
- condition: sun
|
||
after: sunset
|
||
after_offset: -01:00:00
|
||
- condition: sun
|
||
before: sunrise
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':window: :city_sunset: Office window closed and it''s dark. Closing
|
||
blinds.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: script.office_close_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1680528200295'
|
||
alias: 'Office: No Direct Sun Light In The Morning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
below: input_number.office_blinds_morning_sun_azimuth_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: cover.office_blinds
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
- condition: time
|
||
after: 08:10:00
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: state
|
||
entity_id: binary_sensor.office_windows
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Morning :sun: sun is out of the way. Opening :office: office blinds.
|
||
|
||
Azimuth: {{ state_attr(''sun.sun'', ''azimuth'') }} ({{ states(''input_number.living_room_blinds_morning_sun_azimuth_threshold'')}}).
|
||
|
||
Elevation: {{ state_attr(''sun.sun'', ''elevation'') }}.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: script.office_open_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1680528200297'
|
||
alias: 'Office: No Direct Sun Light In The Afternoon'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
above: input_number.office_blinds_afternoon_sun_azimuth_threshold
|
||
- trigger: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: elevation
|
||
above: input_number.office_blinds_afternoon_sun_elevation_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
above: input_number.office_blinds_afternoon_sun_azimuth_threshold
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: elevation
|
||
above: input_number.office_blinds_afternoon_sun_elevation_threshold
|
||
- condition: numeric_state
|
||
entity_id: cover.office_blinds
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
- condition: state
|
||
entity_id: binary_sensor.office_windows
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: light.office_key_lights
|
||
state: 'off'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Afternoon :sun: sun is out of the way. Opening :office: office blinds.
|
||
|
||
Azimuth: {{ state_attr(''sun.sun'', ''azimuth'') }} ({{ states(''input_number.office_blinds_afternoon_sun_azimuth_threshold'')}}).
|
||
|
||
Elevation: {{ state_attr(''sun.sun'', ''elevation'') }} ({{ states(''input_number.office_blinds_afternoon_sun_elevation_threshold'')}}).'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: script.office_open_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1678300398737'
|
||
alias: 'Office: Bright Outside'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
above: input_number.blind_low_brightness_threshold
|
||
for: 00:01:00
|
||
conditions:
|
||
- condition: sun
|
||
after: sunrise
|
||
- condition: time
|
||
after: 08:10:00
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
above: input_number.blind_high_brightness_threshold
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
above: input_number.office_blinds_morning_sun_azimuth_threshold
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
below: input_number.office_blinds_afternoon_sun_azimuth_threshold
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: elevation
|
||
below: input_number.office_blinds_afternoon_sun_elevation_threshold
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: cover.office_blinds
|
||
attribute: current_tilt_position
|
||
above: 25
|
||
- condition: state
|
||
entity_id: binary_sensor.office_windows
|
||
state: 'off'
|
||
- or:
|
||
- condition: state
|
||
entity_id: group.dannys_work_computer
|
||
state: home
|
||
- condition: state
|
||
entity_id: group.jd_computer
|
||
state: home
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'It''s bright outside ({{ states(''sensor.front_garden_motion_illuminance'',
|
||
with_unit=True) }}) and computer is on. Partially closing blinds.
|
||
|
||
Azimuth: {{ state_attr(''sun.sun'', ''azimuth'') }}.
|
||
|
||
Elevation: {{ state_attr(''sun.sun'', ''elevation'') }}.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: cover.set_cover_tilt_position
|
||
target:
|
||
entity_id: cover.office_blinds
|
||
data:
|
||
tilt_position: 25
|
||
mode: single
|
||
- id: '1678300398736'
|
||
alias: 'Office: Really Bright Outside'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
above: input_number.blind_high_brightness_threshold
|
||
for: 00:01:00
|
||
conditions:
|
||
- condition: sun
|
||
after: sunrise
|
||
- condition: time
|
||
after: 08:00:30
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: cover.office_blinds
|
||
attribute: current_tilt_position
|
||
above: 0
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
above: input_number.office_blinds_morning_sun_azimuth_threshold
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: azimuth
|
||
below: input_number.office_blinds_afternoon_sun_azimuth_threshold
|
||
- condition: state
|
||
entity_id: binary_sensor.office_windows
|
||
state: 'off'
|
||
- or:
|
||
- condition: state
|
||
entity_id: group.dannys_work_computer
|
||
state: home
|
||
- condition: state
|
||
entity_id: group.jd_computer
|
||
state: home
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: It's really bright outside ({{ states('sensor.front_garden_motion_illuminance',
|
||
with_unit=True) }}). Closing blinds.
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: script.office_close_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1678637987424'
|
||
alias: 'Office: Outside Went Darker'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
below: input_number.blind_low_brightness_threshold
|
||
conditions:
|
||
- condition: sun
|
||
after: sunrise
|
||
- condition: time
|
||
after: 08:00:30
|
||
- condition: sun
|
||
before: sunset
|
||
- condition: numeric_state
|
||
entity_id: cover.office_blinds
|
||
attribute: current_tilt_position
|
||
below: 50
|
||
- condition: state
|
||
entity_id: input_boolean.enable_office_blind_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.office_windows
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: light.office_key_lights
|
||
state: 'off'
|
||
- condition: numeric_state
|
||
entity_id: sun.sun
|
||
attribute: elevation
|
||
above: input_number.office_blinds_afternoon_sun_elevation_threshold
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: It is not as bright outside ({{ states('sensor.front_garden_motion_illuminance',
|
||
with_unit=True) }}). Opening Blinds
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: script.office_open_blinds
|
||
data: {}
|
||
mode: single
|
||
- id: '1719349686247'
|
||
alias: 'Office: Light On And Bright Room'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- light.office_area_lights
|
||
to: 'on'
|
||
for:
|
||
hours: 1
|
||
minutes: 0
|
||
seconds: 0
|
||
conditions:
|
||
- condition: sun
|
||
before: sunset
|
||
after: sunrise
|
||
- condition: numeric_state
|
||
entity_id: sensor.office_area_mean_light_level
|
||
above: input_number.office_light_level_threshold
|
||
actions:
|
||
- parallel:
|
||
- action: light.turn_off
|
||
metadata: {}
|
||
data:
|
||
transition: 1
|
||
target:
|
||
entity_id:
|
||
- light.office_3
|
||
- light.office_2
|
||
- sequence:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.office_room_brightness_above_threshold
|
||
data: {}
|
||
- delay:
|
||
seconds: 1
|
||
- action: light.turn_off
|
||
target:
|
||
entity_id:
|
||
- light.office_4
|
||
data: {}
|
||
mode: single
|
||
- id: '1721434316175'
|
||
alias: 'Office: Fly Zapper'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- switch.fly_zapper
|
||
for:
|
||
hours: 2
|
||
minutes: 0
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Turning off fly zapper after 2 hours.
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: switch.turn_off
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: switch.fly_zapper
|
||
mode: single
|
||
- id: '1722108194998'
|
||
alias: 'Office: Remote Keylight'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 589ffdf441f33bc8f72a6f9faf153da2
|
||
type: action
|
||
subtype: open
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Remote command received: toggle key lights.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: light.toggle
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: light.office_key_lights
|
||
mode: single
|
||
- id: '1722108194999'
|
||
alias: 'Office: Remote Fan'
|
||
description: ''
|
||
triggers:
|
||
- trigger: device
|
||
domain: mqtt
|
||
device_id: 589ffdf441f33bc8f72a6f9faf153da2
|
||
type: action
|
||
subtype: close
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Remote command received: toggle fan.'
|
||
title: ':office: Office'
|
||
log_level: Debug
|
||
- action: switch.toggle
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: switch.office_fan
|
||
mode: single
|
||
- id: '1743186662871'
|
||
alias: 'Office: Front Door Status On For Long Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- light.office_light
|
||
to: 'on'
|
||
for:
|
||
hours: 0
|
||
minutes: 3
|
||
seconds: 0
|
||
- trigger: state
|
||
entity_id:
|
||
- light.office_light
|
||
to: 'on'
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.front_door
|
||
state: 'off'
|
||
actions:
|
||
- action: light.turn_off
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: light.office_light
|
||
mode: single
|
||
- id: '1687019771710'
|
||
alias: 'Paperless: New Document'
|
||
description: ''
|
||
triggers:
|
||
- trigger: webhook
|
||
allowed_methods:
|
||
- POST
|
||
local_only: false
|
||
webhook_id: 5dc5fc04-365e-4834-97e9-c6967bda3909
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: 'New document ({{trigger.json[''id'']}}) {{trigger.json[''name'']}}
|
||
from {{trigger.json[''correspondent'']}}.
|
||
|
||
Download: {{trigger.json[''download_url'']}} Tags: {{trigger.json[''tags'']}}'
|
||
title: ':leaves: Paperless'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: queued
|
||
max: 10
|
||
- id: '1630082312356'
|
||
alias: 'PiHole: Change Status'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- switch.pi_hole
|
||
- switch.pi_hole_2
|
||
- switch.pi_holes
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Network filtering on {{ trigger.to_state.name }} has been turned {{
|
||
trigger.to_state.state }}.
|
||
title: ':pie: :hole: Pi-Hole'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1737283018707'
|
||
alias: 'Porch: Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.porch_motion_occupancy
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.porch_motion_occupancy
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: light.turn_on
|
||
metadata: {}
|
||
data:
|
||
brightness_pct: 100
|
||
target:
|
||
entity_id: light.porch
|
||
- action: timer.cancel
|
||
target:
|
||
entity_id: timer.porch_light
|
||
data: {}
|
||
mode: single
|
||
- id: '1737283018708'
|
||
alias: 'Porch: No Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.porch_motion_occupancy
|
||
to: 'off'
|
||
for: 00:01:00
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'No motion. Starting :bulb: light timer.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: timer.start
|
||
data:
|
||
duration: 00:01:00
|
||
target:
|
||
entity_id: timer.porch_light
|
||
mode: single
|
||
- id: '1737283018709'
|
||
alias: 'Porch: Light Timer Finished'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: timer.finished
|
||
event_data:
|
||
entity_id: timer.porch_light
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Timer finished. Turning light off.
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: light.turn_off
|
||
target:
|
||
entity_id: light.porch
|
||
mode: single
|
||
- id: '1606157753577'
|
||
alias: 'Porch: Front Door Opened'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.front_door
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.porch_motion_illuminance
|
||
below: '100'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Front :door: door opened it''s dark ({{ states(''sensor.porch_motion_illuminance'')
|
||
}} < 100). Turning on :bulb: :high_brightness: light.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.porch_light_on
|
||
- action: timer.cancel
|
||
target:
|
||
entity_id: timer.porch_light
|
||
data: {}
|
||
default: []
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Front :door: door opened. Incrementing counter :abacus: from {{ states(''counter.front_door_opened_closed'')
|
||
}} to {{ states(''counter.front_door_opened_closed'') | int + state_attr(''counter.front_door_opened_closed'',
|
||
''step'') | int }}.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: counter.increment
|
||
data: {}
|
||
entity_id: counter.front_door_opened_closed
|
||
- alias: Add delay otherwise the picture is too quick to capture someone walking
|
||
through the door
|
||
delay:
|
||
seconds: 2
|
||
mode: single
|
||
- id: '1614033445487'
|
||
alias: 'Porch: Front Door Opened Once For More than 20 seconds'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.front_door
|
||
to: 'on'
|
||
from: 'off'
|
||
for: 00:00:20
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: counter.front_door_opened_closed
|
||
below: '2'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Front door has been opened for more than 20 secs. Resetting :abacus:
|
||
counter from {{ states(''counter.front_door_opened_closed'') }} to 0.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: counter.reset
|
||
data: {}
|
||
entity_id: counter.front_door_opened_closed
|
||
- id: '1611931052908'
|
||
alias: 'Porch: Front Door Open Indicator'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.front_door
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: home
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'front :door: door is open and:people_holding_hands: someone is home.
|
||
Turning on notification :bulb: :high_brightness: light.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: script.front_door_open_notification
|
||
data: {}
|
||
mode: single
|
||
- id: '1615224190495'
|
||
alias: 'Porch: Front Door Closed For More than 20 seconds'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.front_door
|
||
to: 'off'
|
||
from: 'on'
|
||
for: 00:00:20
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Front door closed for more than 20 secs. Resetting :abacus: counter
|
||
from {{ states(''counter.front_door_opened_closed'') }} to 0.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: counter.reset
|
||
target:
|
||
entity_id: counter.front_door_opened_closed
|
||
mode: single
|
||
- id: '1611931640441'
|
||
alias: 'Porch: Front Door Closed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.front_door
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Front :door: door closed.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: script.front_door_closed_notification
|
||
data: {}
|
||
mode: single
|
||
- id: '1606157835544'
|
||
alias: 'Porch: Front Door Closed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.front_door
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: timer.start
|
||
data:
|
||
duration: 00:01:00
|
||
target:
|
||
entity_id: timer.porch_light
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Front :door: door closed. Starting timer.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Front door closed. Turning stairs light off as fall back.
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.stairs_light_off
|
||
default: []
|
||
mode: single
|
||
- id: '1708895092115'
|
||
alias: 'Porch: Light On And Door Is Shut'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- light.porch
|
||
to: 'on'
|
||
for:
|
||
minutes: 5
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.front_door
|
||
state: 'off'
|
||
- not:
|
||
- condition: state
|
||
entity_id: timer.porch_light
|
||
state: active
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
metadata: {}
|
||
data:
|
||
log_level: Debug
|
||
title: Porch
|
||
message: 'Light has been on for 5 minutes and :door: is closed. Turning light
|
||
off.'
|
||
- action: light.turn_off
|
||
metadata: {}
|
||
data:
|
||
transition: 2
|
||
target:
|
||
entity_id: light.porch
|
||
mode: single
|
||
- id: '1700940016581'
|
||
alias: 'Porch: Light Switch'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.porch_main_light_input
|
||
not_from:
|
||
- unknown
|
||
- unavailable
|
||
not_to:
|
||
- unknown
|
||
- unavailable
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
log_level: Debug
|
||
title: Porch
|
||
message: Light switch changed
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.porch
|
||
state: 'off'
|
||
then:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.porch_light_on
|
||
else:
|
||
- action: light.turn_off
|
||
target:
|
||
entity_id: light.porch
|
||
data:
|
||
transition: 2
|
||
- action: timer.cancel
|
||
target:
|
||
entity_id: timer.porch_light
|
||
data: {}
|
||
mode: queued
|
||
max: 10
|
||
- id: '1750929784418'
|
||
alias: 'Predbat: Daily Summary'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 08:00:00
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: '
|
||
|
||
|
||
{{ state_attr(''predbat.plan_html'', ''text'')|replace(''<li>'', ''- '') |replace(''</li>'',
|
||
'''')|replace(''<ul>'', '''')|replace(''</ul>'', '''')|replace(''%'',
|
||
''%'') }}'
|
||
title: Predbat
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1752209130762'
|
||
alias: 'Predbat: Mode Check'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- predbat.status
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_predbat_automations
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: predbat.status
|
||
state: Demand
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.growatt_sph_inverter_mode
|
||
state: Load first
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: inverter is not in the right mode
|
||
title: Predbat
|
||
people:
|
||
entity_id: person.danny
|
||
- id: '1689193654844'
|
||
alias: 'Slack: Command Received'
|
||
description: Slack bot command.
|
||
triggers:
|
||
- trigger: webhook
|
||
allowed_methods:
|
||
- POST
|
||
- PUT
|
||
local_only: false
|
||
webhook_id: -aPu0u0W8nvlYImwa85lwDMoo
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'user_id: {{ trigger.data.user_id }}
|
||
|
||
user_name: {{ trigger.data.user_name }}
|
||
|
||
channel_id: {{ trigger.data.channel_id }}
|
||
|
||
channel_name: {{ trigger.data.channel_name }}
|
||
|
||
command: {{ trigger.data.command }}
|
||
|
||
text: {{ trigger.data.text }}
|
||
|
||
response_url: {{ trigger.data.response_url }}'
|
||
title: Slack
|
||
log_level: Debug
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ trigger.data.channel_name != ''privategroup'' }}'
|
||
then:
|
||
- choose:
|
||
- alias: Message from Danny
|
||
conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.data.user_id|string|default('''', true) ==
|
||
states(''input_text.dannys_slack_id'') }}'
|
||
sequence:
|
||
- action: conversation.process
|
||
data:
|
||
agent_id: '{{ states(''input_text.dannys_selected_conversation_agent'')
|
||
}}'
|
||
text: '{{ trigger.data.text }}'
|
||
response_variable: assist
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ assist.response.response_type|default(none, true) !=
|
||
none and assist.response.response_type == ''error''}}'
|
||
then:
|
||
- parallel:
|
||
- action: script.post_slack_notification
|
||
data:
|
||
message: '{%- set wait_response = [''hmm...'', ''thinking...'',
|
||
''...'', ''er...'', ''um...'', ''well''] -%} {{ wait_response[range(0,
|
||
wait_response|length)|random] }}'
|
||
title: '{{ trigger.data.text }}'
|
||
people: '{{ ''<@''~trigger.data.user_name~''>'' }}'
|
||
target: '{{ trigger.data.channel_name }}'
|
||
- action: conversation.process
|
||
data:
|
||
agent_id: '{{ states(''input_text.dannys_secondary_selected_conversation_agent'')
|
||
}}'
|
||
text: '{{ trigger.data.text }}'
|
||
response_variable: assist
|
||
- action: script.post_slack_notification
|
||
data:
|
||
message: '{{ assist.response.speech.plain.speech }}'
|
||
title: '{{ trigger.data.text }}'
|
||
people: '{{ ''<@''~trigger.data.user_name~''>'' }}'
|
||
target: '{{ trigger.data.channel_name }}'
|
||
else:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'user_id: {{ trigger.data.user_id }}
|
||
|
||
user_name: {{ trigger.data.user_name }}
|
||
|
||
channel_id: {{ trigger.data.channel_id }}
|
||
|
||
channel_name: {{ trigger.data.channel_name }}
|
||
|
||
command: {{ trigger.data.command }}
|
||
|
||
text: {{ trigger.data.text }}
|
||
|
||
response_url: {{ trigger.data.response_url }}'
|
||
title: Slack
|
||
log_level: Normal
|
||
mode: queued
|
||
max: 10
|
||
- id: '1614285576722'
|
||
alias: 'Sleep As Android: Event'
|
||
description: ''
|
||
triggers:
|
||
- trigger: webhook
|
||
webhook_id: sleep_as_android
|
||
allowed_methods:
|
||
- POST
|
||
local_only: false
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: input_text.set_value
|
||
entity_id: input_text.sleep_as_android
|
||
data:
|
||
value: '{{ trigger.json.event }}'
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.sleep_as_android_notification_level
|
||
state: Start/Stop
|
||
- condition: template
|
||
value_template: '{{ trigger.json.event in [''sleep_tracking_started'', ''sleep_tracking_stopped'']
|
||
}}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Changed to {{ trigger.json.event }}
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Debug
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.sleep_as_android_notification_level
|
||
state: Start/Stop/Alarms
|
||
- or:
|
||
- condition: template
|
||
value_template: '{{ ''alarm'' in trigger.json.event }}'
|
||
- condition: template
|
||
value_template: '{{ trigger.json.event in [''sleep_tracking_started'',
|
||
''sleep_tracking_stopped''] }}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Changed to {{ trigger.json.event }}
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Debug
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.sleep_as_android_notification_level
|
||
state: All
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Changed to {{ trigger.json.event }}
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Debug
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1658438667856'
|
||
alias: 'Sleep As Android: Started Tracking'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_text.sleep_as_android
|
||
to: sleep_tracking_started
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: person.danny
|
||
state: home
|
||
sequence:
|
||
- parallel:
|
||
- action: timer.start
|
||
data:
|
||
duration: '{% set new_ts = states(''input_number.sleep_timer_duration'')|int(60)
|
||
* 60 %} {{ ''{:02d}:{:02d}:{:02d}''.format(new_ts // 3600, (new_ts %
|
||
3600) // 60, (new_ts % 3600) % 60) }}'
|
||
target:
|
||
entity_id: timer.sleep
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Sleep :hourglass_flowing_sand: timer :arrow_forward: started.
|
||
Time remaining: {% set new_ts = states(''input_number.sleep_timer_duration'')|int(60)
|
||
* 60 %} {{ ''{:02d}:{:02d}:{:02d}''.format(new_ts // 3600, (new_ts %
|
||
3600) // 60, (new_ts % 3600) % 60) }}'
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Normal
|
||
default: []
|
||
- alias: Turn on bedroom fan
|
||
if:
|
||
- condition: numeric_state
|
||
entity_id: sensor.bedroom_area_mean_temperature
|
||
above: 22.5
|
||
- condition: state
|
||
entity_id: person.danny
|
||
state: home
|
||
- condition: state
|
||
entity_id: switch.bedroom_fan
|
||
state: 'off'
|
||
then:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Bedroom is warm ({{ states('sensor.bedroom_area_mean_temperature')
|
||
}} > 22.5). Turning on bedroom fan.
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Debug
|
||
- action: switch.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: switch.bedroom_fan
|
||
mode: single
|
||
- id: '1658843567854'
|
||
alias: 'Sleep As Android: Awake'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_text.sleep_as_android
|
||
to: awake
|
||
conditions:
|
||
- condition: state
|
||
entity_id: timer.sleep
|
||
state: active
|
||
actions:
|
||
- parallel:
|
||
- action: timer.pause
|
||
data: {}
|
||
target:
|
||
entity_id: timer.sleep
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':pause_button: Pausing sleep :hourglass_flowing_sand: timer. Time
|
||
remaining: {{ state_attr(''timer.sleep'', ''remaining'') }}'
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Normal
|
||
mode: queued
|
||
max: 10
|
||
- id: '1658843828191'
|
||
alias: 'Sleep As Android: Fall Asleep'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- input_text.sleep_as_android
|
||
from: awake
|
||
conditions:
|
||
- condition: state
|
||
entity_id: timer.sleep
|
||
state: paused
|
||
actions:
|
||
- parallel:
|
||
- action: timer.start
|
||
data:
|
||
duration: '{% set t = state_attr(''timer.sleep'', ''remaining'').split('':'')
|
||
%} {% set ts = (t[0]|int * 3600) + (t[1]|int * 60) + t[2]|int + (states(''input_number.sleep_as_android_time_to_add'')|int(0)
|
||
* 60) %} {% set new_ts = states(''input_number.sleep_timer_duration'')|int(0)
|
||
* 60 if ts > states(''input_number.sleep_timer_duration'')|int(0) * 60 else
|
||
ts %} {{ ''{:02d}:{:02d}:{:02d}''.format(new_ts // 3600, (new_ts % 3600)
|
||
// 60, (new_ts % 3600) % 60) }}'
|
||
target:
|
||
entity_id: timer.sleep
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Fell back asleep. :arrow_forward: Unpausing :hourglass_flowing_sand:
|
||
timer and adding {{ states(''input_number.sleep_as_android_time_to_add'')|int(0)
|
||
}} minutes to {{ state_attr(''timer.sleep'', ''remaining'') }}. New time
|
||
remaining: {{ state_attr(''timer.sleep'', ''remaining'') }}'
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1659861914053'
|
||
alias: 'Sleep As Android: Danny Asleep For A Period Of Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.danny_asleep
|
||
to: 'on'
|
||
for:
|
||
hours: 0
|
||
minutes: 15
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: timer.sleep
|
||
state: active
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Asleep for 15 minutes. Taking 5 minutes off the timer.
|
||
log_level: Normal
|
||
- alias: Pause to get the remainging time value.
|
||
action: timer.pause
|
||
data: {}
|
||
target:
|
||
entity_id: timer.sleep
|
||
- if:
|
||
- condition: template
|
||
value_template: '{% set t = state_attr(''timer.sleep'', ''remaining'').split('':'')
|
||
%} {% set ts = (t[0]|int * 3600) + (t[1]|int * 60) + t[2]|int + states(''input_number.sleep_as_android_time_to_add'')|int(0)
|
||
%} {{ (ts - (states(''input_number.sleep_as_android_time_to_subtract'')|int(0)
|
||
* 60)) > 0 }}'
|
||
then:
|
||
- parallel:
|
||
- action: timer.start
|
||
data:
|
||
duration: '{% set t = state_attr(''timer.sleep'', ''remaining'').split('':'')
|
||
%} {% set ts = (t[0]|int * 3600) + (t[1]|int * 60) + t[2]|int + states(''input_number.sleep_as_android_time_to_add'')|int(0)
|
||
%} {% set new_ts = ts if (ts - (states(''input_number.sleep_as_android_time_to_subtract'')|int(0)
|
||
* 60)) < 0 else (ts - (states(''input_number.sleep_as_android_time_to_subtract'')|int(0)
|
||
* 60)) %} {{ ''{:02d}:{:02d}:{:02d}''.format(new_ts // 3600, (new_ts %
|
||
3600) // 60, (new_ts % 3600) % 60) }}'
|
||
target:
|
||
entity_id: timer.sleep
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Danny has been asleep for more than 15 minutes. Taking {{ states(''input_number.sleep_as_android_time_to_subtract'')
|
||
}} minutes off sleeper timer. New time remaining: {{ state_attr(''timer.sleep'',
|
||
''remaining'') }}'
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Normal
|
||
else:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Danny has been asleep for more than 15 minutes with less than {{
|
||
states('input_number.sleep_as_android_time_to_subtract') }} minutes to go
|
||
({{ state_attr('timer.sleep', 'remaining') }}).
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1658842750488'
|
||
alias: 'Timer: Sleep Timer Complete'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: timer.finished
|
||
event_data:
|
||
entity_id: timer.sleep
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Sleep timer finished. Turning everything off.
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Normal
|
||
- action: script.bedroom_sleep
|
||
data: {}
|
||
- alias: Turn off bedroom fan
|
||
if:
|
||
- condition: state
|
||
entity_id: switch.bedroom_fan
|
||
state: 'on'
|
||
then:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Bedroom is warm ({{ states('sensor.bedroom_area_mean_temperature')
|
||
}} > 21c). Turning on bedroom fan.
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Debug
|
||
- action: switch.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: switch.bedroom_fan
|
||
mode: single
|
||
- id: '1644769166837'
|
||
alias: 'Bedroom: Danny''s Alarm'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: input_text.sleep_as_android
|
||
to: alarm_alert_start
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: person.danny
|
||
state: home
|
||
- condition: state
|
||
entity_id: input_boolean.enable_bedroom_blind_automations
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: cover.bedroom_blinds
|
||
attribute: current_position
|
||
below: input_number.blind_closed_position_threshold
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':alarm_clock: Alarm triggered. Opening bedroom blinds in 1 minute.'
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Normal
|
||
- delay:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
milliseconds: 0
|
||
- action: cover.open_cover
|
||
data: {}
|
||
target:
|
||
entity_id: cover.bedroom_blinds
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: person.danny
|
||
state: home
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':bed: :alarm_clock: alarm triggered.'
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Normal
|
||
default: []
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.bedroom_clock_matrix
|
||
state: 'off'
|
||
then:
|
||
- action: light.turn_on
|
||
data: {}
|
||
target:
|
||
entity_id: light.bedroom_clock_matrix
|
||
mode: single
|
||
- id: '1667424349110'
|
||
alias: 'Sleep As Android: Stop Sleep Timer'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 05:00:00
|
||
conditions:
|
||
- condition: or
|
||
conditions:
|
||
- condition: state
|
||
entity_id: timer.sleep
|
||
state: active
|
||
- condition: state
|
||
entity_id: timer.sleep
|
||
state: paused
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Cancelling sleep timer.
|
||
title: ':zzz: Sleep as :robot_face: Android'
|
||
log_level: Normal
|
||
- action: timer.cancel
|
||
data: {}
|
||
target:
|
||
entity_id: timer.sleep
|
||
mode: single
|
||
- id: '1646778676345'
|
||
alias: 'Living Room: Carbon Monoxide Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.nest_protect_living_room_co_status
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':skull_and_crossbones: Carbon Monoxide detected on the living room.'
|
||
title: ':skull_and_crossbones: CO Detected on the living room'
|
||
- action: script.set_central_heating_to_off
|
||
data: {}
|
||
- action: script.set_hot_water_to_home_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1646778927330'
|
||
alias: 'Living Room: Smoked Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.nest_protect_living_room_smoke_status
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':smoking: Smoke detected on the living room.'
|
||
title: ':smoking: Smoke detected on the living room'
|
||
- action: script.set_central_heating_to_off
|
||
data: {}
|
||
- action: script.set_hot_water_to_home_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1646778627153'
|
||
alias: 'Office: Carbon Monoxide Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.nest_protect_office_co_status
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
title: ':skull_and_crossbones: CO Detected in the office'
|
||
message: ':skull_and_crossbones: Carbon Monoxide detected in the :office:
|
||
office.'
|
||
- action: script.set_central_heating_to_off
|
||
data: {}
|
||
- action: script.set_hot_water_to_home_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1646778909669'
|
||
alias: 'Office: Smoked Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.nest_protect_office_smoke_status
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
title: ':smoking: Smoke detected in the office'
|
||
message: ':smoking: Smoke detected in the :office: office.'
|
||
- action: script.set_central_heating_to_off
|
||
data: {}
|
||
- action: script.set_hot_water_to_home_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1646778676344'
|
||
alias: 'Stairs: Carbon Monoxide Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.nest_protect_upstairs_co_status
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
title: ':skull_and_crossbones: CO Detected on the stairs'
|
||
message: ':skull_and_crossbones: Carbon Monoxide detected on the stairs.'
|
||
- action: script.set_central_heating_to_off
|
||
data: {}
|
||
- action: script.set_hot_water_to_home_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1646778927329'
|
||
alias: 'Stairs: Smoked Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.nest_protect_upstairs_smoke_status
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
title: ':smoking: Smoke detected on the stairs'
|
||
message: ':smoking: Smoke detected on the stairs.'
|
||
- action: script.set_central_heating_to_off
|
||
data: {}
|
||
- action: script.set_hot_water_to_home_mode
|
||
data: {}
|
||
mode: single
|
||
- id: '1691009694611'
|
||
alias: 'Solar Assistant: Check Solar Mode'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time_pattern
|
||
minutes: '1'
|
||
id: time
|
||
- trigger: time_pattern
|
||
minutes: '5'
|
||
id: time_backup
|
||
- trigger: time_pattern
|
||
minutes: '31'
|
||
id: time
|
||
- trigger: time_pattern
|
||
minutes: '35'
|
||
id: time_backup
|
||
- trigger: state
|
||
entity_id: sensor.growatt_sph_inverter_mode
|
||
from: unknown
|
||
id: event
|
||
- trigger: state
|
||
entity_id: sensor.growatt_sph_inverter_mode
|
||
from: unavailable
|
||
id: event
|
||
- trigger: state
|
||
entity_id: predbat.status
|
||
to: null
|
||
id: event
|
||
conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_solar_assistant_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_predbat_automations
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: select.growatt_sph_work_mode_priority
|
||
state: unavailable
|
||
- condition: state
|
||
entity_id: sensor.growatt_sph_inverter_mode
|
||
state: unknown
|
||
- condition: state
|
||
entity_id: sensor.growatt_sph_inverter_mode
|
||
state: unavailable
|
||
actions:
|
||
- choose:
|
||
- alias: Rates remain above export
|
||
conditions:
|
||
- condition: trigger
|
||
id:
|
||
- event
|
||
- condition: numeric_state
|
||
entity_id: sensor.electricity_previous_rate
|
||
above: sensor.octopus_energy_electricity_export_current_rate
|
||
- condition: numeric_state
|
||
entity_id: sensor.octopus_energy_electricity_current_rate
|
||
above: sensor.octopus_energy_electricity_export_current_rate
|
||
sequence:
|
||
- action: script.solar_assistant_check_charging_mode
|
||
data:
|
||
event: event
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
default:
|
||
- choose:
|
||
- conditions:
|
||
- condition: trigger
|
||
id: time_backup
|
||
sequence:
|
||
- action: script.solar_assistant_check_charging_mode
|
||
data:
|
||
event: time
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
default: []
|
||
mode: restart
|
||
- id: '1691767286139'
|
||
alias: 'Solcast: Update Forecast'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 08:00:00
|
||
conditions: []
|
||
actions:
|
||
- action: script.update_solcast
|
||
data: {}
|
||
mode: single
|
||
- id: '1612998168529'
|
||
alias: 'Spotify: Playing'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: media_player.spotify_danny
|
||
to: playing
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ state_attr(''media_player.spotify_danny'', ''media_position'')
|
||
!= none and state_attr(''media_player.spotify_danny'', ''media_duration'')
|
||
!= none and state_attr(''media_player.spotify_danny'', ''media_title'')
|
||
!= none and state_attr(''media_player.spotify_danny'', ''media_artist'')
|
||
!= none }}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Playing *{{ state_attr('media_player.spotify_danny', 'media_title')
|
||
}}* by _{{ state_attr('media_player.spotify_danny', 'media_artist') }}_
|
||
and is at {{ state_attr('media_player.spotify_danny', 'media_position')
|
||
| int | timestamp_custom('%H:%M:%S') }}/{{ state_attr('media_player.spotify_danny',
|
||
'media_duration') | int | timestamp_custom('%H:%M:%S') }} ({{ ((state_attr('media_player.spotify_danny',
|
||
'media_position') | int / state_attr('media_player.spotify_danny', 'media_duration')
|
||
| int) * 100) | round(2, 'common') }}%) way through.
|
||
title: ':musical_note: Spotify'
|
||
log_level: Debug
|
||
default:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Playing *{{ state_attr('media_player.spotify_danny', 'media_content_type')
|
||
}}*.
|
||
title: ':musical_note: Spotify'
|
||
log_level: Debug
|
||
mode: queued
|
||
max: 10
|
||
- id: '1624918278463'
|
||
alias: 'Stairs: Motion Detected For Ambient Lights'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.stairs_motion_occupancy
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: sun
|
||
after: sunrise
|
||
- condition: state
|
||
entity_id: light.stairs_2
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion on lower :ladder: stairs and it''s night
|
||
time. Turning ambient :bulb: light on :low_brightness: dim.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_2_on
|
||
data:
|
||
transition: 0.5
|
||
- conditions:
|
||
- condition: time
|
||
after: 00:00:00
|
||
- condition: sun
|
||
before: sunrise
|
||
- condition: state
|
||
entity_id: light.stairs_2
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion on lower :ladder: stairs and it''s night
|
||
time. Dimming ambient :bulb: :low_brightness: light.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_2_dim
|
||
data:
|
||
transition: 0.5
|
||
default: []
|
||
mode: single
|
||
- id: '1598726353326'
|
||
alias: 'Stairs: Upstairs Dark, Before Kids Bed Time, Light Off And Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.upstairs_area_motion
|
||
from: 'off'
|
||
to: 'on'
|
||
- alias: If Ring integration d/c then fall back to Zigbee specifically.
|
||
trigger: state
|
||
entity_id: binary_sensor.upstairs_motion_occupancy
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- below: input_number.stairs_light_level_threshold
|
||
condition: numeric_state
|
||
entity_id: sensor.stairs_motion_illuminance
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
- condition: time
|
||
after: 07:00:00
|
||
before: input_datetime.childrens_bed_time
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion on the :ladder: upstairs, before bed time and
|
||
it''s dark ({{ states(''sensor.stairs_motion_illuminance'', with_unit=True)
|
||
}} < {{ states(''input_number.stairs_light_level_threshold'', with_unit=True)
|
||
}}). Turning :bulb: :high_brightness: light on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.stairs_light_on
|
||
mode: queued
|
||
max: 10
|
||
- id: '1598726353327'
|
||
alias: 'Stairs: Upstairs Dark, Before Kids Bed Time, Light On And Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.upstairs_area_motion
|
||
from: 'off'
|
||
to: 'on'
|
||
- alias: If Ring integration d/c then fall back to Zigbee specifically.
|
||
trigger: state
|
||
entity_id: binary_sensor.upstairs_motion_occupancy
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- below: input_number.stairs_light_level_threshold
|
||
condition: numeric_state
|
||
entity_id: sensor.stairs_motion_illuminance
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
- condition: time
|
||
after: 07:00:00
|
||
before: input_datetime.childrens_bed_time
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: light.stairs
|
||
attribute: brightness
|
||
below: '5'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion on upstairs, before bed time, :bulb: light is
|
||
on and it''s dark ({{ states(''sensor.stairs_motion_illuminance'', with_unit=True)
|
||
}} < {{ states(''input_number.stairs_light_level_threshold'', with_unit=True)
|
||
}}). Turning :bulb: :high_brightness: light on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.stairs_light_on
|
||
mode: single
|
||
- id: '1587595659605'
|
||
alias: 'Stairs: Upstairs Dark, After Bed Time, Light Off and Motion Detected Before
|
||
Midnight'
|
||
description: Deliberately default to dim light because it's safer than having the
|
||
light go to full brightness at night. Bed time ends when the sun is up or after
|
||
7am which ever is first.
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.upstairs_area_motion
|
||
from: 'off'
|
||
to: 'on'
|
||
- alias: If Ring integration d/c then fall back to Zigbee specifically.
|
||
trigger: state
|
||
entity_id: binary_sensor.upstairs_motion_occupancy
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- below: input_number.stairs_light_level_threshold
|
||
condition: numeric_state
|
||
entity_id: sensor.stairs_motion_illuminance
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
- condition: time
|
||
after: input_datetime.childrens_bed_time
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion :ladder: upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and in No Children Mode. Turning stairs :bulb: :high_brightness:
|
||
light on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.childrens_bedroom_doors
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion on the and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and :people_holding_hands: children''s doors are shut. Turning
|
||
:bulb: :high_brightness: light on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.childrens_bedroom_doors
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion on the :ladder: upstairs and it''s dark
|
||
({{ states(''sensor.stairs_motion_illuminance'') }} < 5 lux) and :people_holding_hands:
|
||
children''s :door: doors are open. :bulb: :low_brightness: Dimming light.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_dim
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: binary_sensor.leos_bedroom_door_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and :boy: Leo''s :door: door is shut. Turning :bulb: :high_brightness:
|
||
light on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_dim
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.ashlees_bedroom_door_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and :girl: Ashlee''s :door: door is shut. Turning :bulb:
|
||
:high_brightness: light on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1587595659608'
|
||
alias: 'Stairs: Upstairs Dark, After Bed Time, Light On and Motion Detected Before
|
||
Midnight'
|
||
description: Deliberately default to dim light because it's safer than having the
|
||
light go to full brightness at night. Bed time ends when the sun is up or after
|
||
7am which ever is first.
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.upstairs_area_motion
|
||
from: 'off'
|
||
to: 'on'
|
||
- alias: If Ring integration d/c then fall back to Zigbee specifically.
|
||
trigger: state
|
||
entity_id: binary_sensor.upstairs_motion_occupancy
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- below: input_number.stairs_light_level_threshold
|
||
condition: numeric_state
|
||
entity_id: sensor.stairs_motion_illuminance
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
- condition: time
|
||
after: input_datetime.childrens_bed_time
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: light.stairs
|
||
attribute: brightness
|
||
below: '5'
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'',
|
||
with_unit=True) }} < {{ states(''input_number.stairs_light_level_threshold'',
|
||
with_unit=True) }}) and in No Children Mode. Turning up :bulb: :high_brightness:
|
||
light.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.childrens_bedroom_doors
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and :people_holding_hands: children''s doors are shut. Turning
|
||
up :bulb: :high_brightness: light.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.childrens_bedroom_doors
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and :people_holding_hands: children''s doors are open. :bulb:
|
||
:low_brightness: Dimming light.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_dim
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: binary_sensor.leos_bedroom_door_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and :boy: Leo''s door is shut. Turning up :bulb: :high_brightness:
|
||
light.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
- conditions:
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.ashlees_bedroom_door_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and :girl: Ashlee''s door is shut. Turning up :bulb: :high_brightness:
|
||
light.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
default: []
|
||
mode: single
|
||
- id: '1587595659606'
|
||
alias: 'Stairs: Dark, After Bed Time, Light Off and Motion Detected After Midnight'
|
||
description: Deliberately default to dim light because it's safer than having the
|
||
light go to full brightness at night. Bed time ends when the sun is up or after
|
||
7am which ever is first.
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.upstairs_area_motion
|
||
from: 'off'
|
||
to: 'on'
|
||
- alias: If Ring integration d/c then fall back to Zigbee specifically.
|
||
trigger: state
|
||
entity_id: binary_sensor.upstairs_motion_occupancy
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- below: input_number.stairs_light_level_threshold
|
||
condition: numeric_state
|
||
entity_id: sensor.stairs_motion_illuminance
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
- or:
|
||
- condition: sun
|
||
before: sunrise
|
||
- condition: time
|
||
before: 07:00:00
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'off'
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- alias: Bedroom light is on
|
||
conditions:
|
||
- condition: state
|
||
entity_id: light.bedroom_lamps
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'',
|
||
with_unit=True) }} < {{ states(''input_number.stairs_light_level_threshold'',
|
||
with_unit=True) }}) :bed: bedroom light is on and it''s :clock12: late
|
||
but bedroom light(s) are on. Turning :bulb: :high_brightness: light
|
||
on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
- alias: Check if night light settings is turned on.
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_night_light
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and it''s :clock12: late. Turning night :bulb: :low_brightness:
|
||
light on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_night_light
|
||
default:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and it''s :clock12: late. Night mode is turned off so turning
|
||
:bulb: :high_brightness: light on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
mode: single
|
||
- id: '1587595659607'
|
||
alias: 'Stairs: Dark, After Bed Time, Light On and Motion Detected After Midnight'
|
||
description: Deliberately default to dim light because it's safer than having the
|
||
light go to full brightness at night. Bed time ends when the sun is up or after
|
||
7am which ever is first.
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.upstairs_area_motion
|
||
from: 'off'
|
||
to: 'on'
|
||
- alias: If Ring integration d/c then fall back to Zigbee specifically.
|
||
trigger: state
|
||
entity_id: binary_sensor.upstairs_motion_occupancy
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- below: input_number.stairs_light_level_threshold
|
||
condition: numeric_state
|
||
entity_id: sensor.stairs_motion_illuminance
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
- or:
|
||
- condition: sun
|
||
before: sunrise
|
||
- condition: time
|
||
before: 07:00:00
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'on'
|
||
- condition: numeric_state
|
||
entity_id: light.stairs
|
||
attribute: brightness
|
||
below: '5'
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- alias: Bedroom light is on
|
||
conditions:
|
||
- condition: state
|
||
entity_id: light.bedroom_lamps
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'',
|
||
with_unit=True) }} < {{ states(''input_number.stairs_light_level_threshold'',
|
||
with_unit=True) }}) and it''s :clock12: late but bedroom light(s) are
|
||
on. Turning :bulb: :high_brightness: light on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
- alias: Check if night light settings is turned on.
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_night_light
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and it''s :clock1: late. Turning stairs night :bulb: :low_brightness:
|
||
light up.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_night_light
|
||
default:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion upstairs and it''s dark ({{ states(''sensor.stairs_motion_illuminance'')
|
||
}} < 5 lux) and it''s :clock12: late. Night mode is turned off so turning
|
||
:bulb: :high_brightness: light on.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_on
|
||
mode: single
|
||
- id: '1592062695452'
|
||
alias: 'Stairs: Motion Detected And MagicMirror Is Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.living_room_area_motion
|
||
to: 'on'
|
||
- trigger: state
|
||
entity_id: binary_sensor.stairs_motion_occupancy
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: switch.magic_mirror_plug
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_magic_mirror_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: switch.turn_on
|
||
target:
|
||
entity_id: switch.magic_mirror_plug
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Turning on :mirror: Magic Mirror.'
|
||
title: ':paw_prints: Motion on the :ladder: stairs/lounge'
|
||
log_level: Debug
|
||
mode: queued
|
||
max: 10
|
||
- id: '1587595847618'
|
||
alias: 'Stairs: No Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.upstairs_area_motion
|
||
for: 00:01:00
|
||
to: 'off'
|
||
- trigger: state
|
||
entity_id: binary_sensor.stairs_motion_occupancy
|
||
to: 'off'
|
||
for: 00:01:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion at the top of the stairs for 1 minute.
|
||
Turning light off.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_off
|
||
data:
|
||
transition: 1
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: light.stairs_2
|
||
state: 'on'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion at the bottom of the stairs for
|
||
1 minute. Turning ambient light off.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_2_off
|
||
data:
|
||
transition: 2
|
||
- delay:
|
||
hours: 0
|
||
minutes: 0
|
||
seconds: 1
|
||
milliseconds: 0
|
||
- action: light.turn_off
|
||
target:
|
||
entity_id: light.stairs_2
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1624918387840'
|
||
alias: 'Stairs: No Motion Detected Bottom Of Stairs'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.stairs_motion_occupancy
|
||
to: 'off'
|
||
for: 00:01:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: light.stairs_2
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion at the bottom of the stairs for 1 minute.
|
||
Turning light off.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.stairs_light_2_off
|
||
data:
|
||
transition: 2
|
||
mode: single
|
||
- id: '1591553945554'
|
||
alias: 'Stairs: No Motion At Night Turn Off Magic Mirror'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.stairs_motion_occupancy
|
||
for: 00:03:00
|
||
to: 'off'
|
||
- trigger: time
|
||
at: '23:30:00'
|
||
conditions:
|
||
- after: '23:00:00'
|
||
before: 05:00:00
|
||
condition: time
|
||
- condition: state
|
||
entity_id: switch.magic_mirror_plug
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_magic_mirror_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: switch.turn_off
|
||
target:
|
||
entity_id: switch.magic_mirror_plug
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :no_pedestrians:
|
||
Turning off :mirror: Magic Mirror because no motion was detected.'
|
||
title: Porch
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1714869692076'
|
||
alias: 'Stairs: Light Switch'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.stairs_light_input_0_input
|
||
not_from:
|
||
- unknown
|
||
- unavailable
|
||
not_to:
|
||
- unknown
|
||
- unavailable
|
||
conditions: []
|
||
actions:
|
||
- action: light.toggle
|
||
metadata: {}
|
||
data:
|
||
transition: 1
|
||
brightness: 255
|
||
target:
|
||
entity_id: light.stairs
|
||
mode: single
|
||
- id: '1615849889104'
|
||
alias: 'Stairs: Light On And Children''s Door Open After Bedtime And Before Midnight'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.leos_bedroom_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
- trigger: state
|
||
entity_id: binary_sensor.ashlees_bedroom_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- condition: time
|
||
after: input_datetime.childrens_bed_time
|
||
before: '23:59:59'
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.leos_bedroom_door_contact
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: :door: :low_brightness: {{ trigger.to_state.name
|
||
}} opened after bed time and the stairs light are on. :bulb: :low_brightness:
|
||
Dimming all lights.'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.stairs_light_dim
|
||
- scene.stairs_light_2_on
|
||
data:
|
||
transition: 0.5
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.ashlees_bedroom_door_contact
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: :high_brightness: {{ trigger.to_state.name }} opened
|
||
after bed time and the stairs light are on. :bulb: :low_brightness:
|
||
Dimming all lights.'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.stairs_light_on
|
||
- scene.stairs_light_2_on
|
||
data:
|
||
transition: 0.5
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1615850302527'
|
||
alias: 'Stairs: Light On And Children''s Door Closed Before Midnight'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.leos_bedroom_door_contact
|
||
from: 'on'
|
||
to: 'off'
|
||
- trigger: state
|
||
entity_id: binary_sensor.ashlees_bedroom_door_contact
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions:
|
||
- condition: time
|
||
after: input_datetime.childrens_bed_time
|
||
before: '23:59:59'
|
||
- condition: state
|
||
entity_id: light.stairs
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Normal
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.childrens_bedroom_doors
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: :high_brightness: {{ trigger.to_state.name }} closed
|
||
after bed time, :people_holding_hands: children''s :door: doors are
|
||
closed and the light are on. Turn up :bulb: :high_brightness: all lights.'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.stairs_light_on
|
||
- scene.stairs_light_2_on
|
||
data:
|
||
transition: 0.5
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: binary_sensor.leos_bedroom_door_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':boy: Leo''s :door: door closed after bed time and the lights
|
||
are on. Turn up :bulb: :high_brightness: all lights.'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.stairs_light_on
|
||
- scene.stairs_light_2_on
|
||
data:
|
||
transition: 0.5
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_leos_door_automations
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ashlees_door_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.ashlees_bedroom_door_contact
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':girl: Ashlee''s :door: door closed after bed time and the stairs
|
||
light are on. Turn up :bulb: :high_brightness: all lights.'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.stairs_light_on
|
||
- scene.stairs_light_2_on
|
||
data:
|
||
transition: 0.5
|
||
default: []
|
||
mode: single
|
||
- id: '1588856667889'
|
||
alias: 'MagicMirror: Turn Off Based On Time During Weekday'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.stairs_motion_occupancy
|
||
to: 'off'
|
||
for: 00:05:00
|
||
from: 'on'
|
||
conditions:
|
||
- condition: time
|
||
after: 09:00:00
|
||
before: '17:30:00'
|
||
weekday:
|
||
- mon
|
||
- tue
|
||
- wed
|
||
- thu
|
||
- fri
|
||
- condition: state
|
||
entity_id: input_boolean.enable_magic_mirror_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_motion_triggers
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: switch.turn_off
|
||
target:
|
||
entity_id: switch.magic_mirror_plug
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motioned detected. Turning off :mirror: Magic
|
||
Mirror based on time of the day.'
|
||
title: Porch
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1630760046947'
|
||
alias: 'Stairs: Close Blinds At Night'
|
||
description: ''
|
||
triggers:
|
||
- trigger: sun
|
||
event: sunset
|
||
offset: 01:00:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: cover.stairs_blinds
|
||
state: open
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_blind_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':city_sunrise: :window: Closing blinds.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: cover.close_cover
|
||
target:
|
||
entity_id: cover.stairs_blinds
|
||
mode: single
|
||
- id: '1630760149356'
|
||
alias: 'Stairs: Open Blinds In The Morning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 08:00:00
|
||
conditions:
|
||
- condition: state
|
||
entity_id: cover.stairs_blinds
|
||
state: closed
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stairs_blind_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':sunrise: Opening blinds.'
|
||
title: Porch
|
||
log_level: Debug
|
||
- action: cover.open_cover
|
||
target:
|
||
entity_id: cover.stairs_blinds
|
||
mode: single
|
||
- id: '1630015410190'
|
||
alias: 'Stairs: Person Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.stairs_person_detected
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_away
|
||
actions:
|
||
- parallel:
|
||
- action: camera.snapshot
|
||
data_template:
|
||
filename: '{{ states(''input_text.latest_frigate_upstairs_person_file_path'')
|
||
}}'
|
||
target:
|
||
entity_id: camera.stairs_high_resolution_channel
|
||
- action: script.send_home_log_with_local_attachments
|
||
data_template:
|
||
title: Person detected on stairs
|
||
message: Frigate detected a person on the stairs.
|
||
filePath: '{{ states(''input_text.latest_frigate_upstairs_person_file_path'')
|
||
}}'
|
||
mode: queued
|
||
max: 10
|
||
- id: '1743186662872'
|
||
alias: 'Stairs: Front Door Status On For Long Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- light.stairs_ambient
|
||
to: 'on'
|
||
for:
|
||
hours: 0
|
||
minutes: 3
|
||
seconds: 0
|
||
- trigger: state
|
||
entity_id:
|
||
- light.stairs_ambient
|
||
to: 'on'
|
||
for:
|
||
hours: 0
|
||
minutes: 5
|
||
seconds: 0
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.front_door
|
||
state: 'off'
|
||
actions:
|
||
- action: light.turn_off
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: light.office_light
|
||
mode: single
|
||
- id: '1619254173099'
|
||
alias: 'Steam: Status Change'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: sensor.steam_danny
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_steam_notifications
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_home_log_with_url
|
||
data:
|
||
message: Steam status changed to {{ trigger.to_state.state|default('Unknown',
|
||
true) }}.
|
||
title: ':video_game: Steam'
|
||
url: '{{ state_attr(trigger.entity_id|default(''sensor.steam_danny'', true),
|
||
''entity_picture'') }}'
|
||
mode: queued
|
||
max: 10
|
||
- id: '1619254173097'
|
||
alias: 'Steam: Playing Game'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.steam_danny
|
||
attribute: game
|
||
conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.to_state.attributes.game|default(none, true) != none
|
||
}}'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_steam_notifications
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_home_log_with_url
|
||
data:
|
||
message: Playing {{ state_attr(trigger.entity_id|default('sensor.steam_danny',
|
||
true), 'game') }}.
|
||
title: ':video_game: Steam'
|
||
url: '{{ trigger.to_state.attributes.game_image_main|default(state_attr(trigger.entity_id|default(''sensor.steam_danny'',
|
||
true), ''game_image_main'')) }}'
|
||
mode: queued
|
||
max: 10
|
||
- id: '1674411819883'
|
||
alias: 'Add-Ons: File Editor Started'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.file_editor_running
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stop_add_ons
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: timer.start
|
||
data:
|
||
duration: 01:00:00
|
||
target:
|
||
entity_id: timer.stop_add_on_file_editor
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: File Editor started.
|
||
title: ':heavy_plus_sign: Add-on'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1638101465298'
|
||
alias: 'Add-ons: Automatically Disable File Editor'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: timer.finished
|
||
event_data:
|
||
entity_id: timer.stop_add_on_file_editor
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stop_add_ons
|
||
state: 'on'
|
||
actions:
|
||
- action: script.stop_add_on
|
||
data:
|
||
addonEntityId: core_configurator
|
||
message: ':writing_hand: File editor has been on for more than an hour. Turning
|
||
File editor off.'
|
||
mode: single
|
||
- id: '1674411819884'
|
||
alias: 'Add-Ons: Advanced SSH & Web Terminal'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.advanced_ssh_web_terminal_running
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stop_add_ons
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: timer.start
|
||
data:
|
||
duration: 01:00:00
|
||
target:
|
||
entity_id: timer.stop_add_on_terminal_ssh
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Terminal SSH started.
|
||
title: ':heavy_plus_sign: Add-on'
|
||
log_level: Normal
|
||
mode: single
|
||
- id: '1638101748990'
|
||
alias: 'Add-ons: Automatically Disable Advanced SSH & Web Terminal'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: timer.finished
|
||
event_data:
|
||
entity_id: timer.stop_add_on_terminal_ssh
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stop_add_ons
|
||
state: 'on'
|
||
actions:
|
||
- action: script.stop_add_on
|
||
data:
|
||
addonEntityId: a0d7b954_ssh
|
||
message: SSH has been on for more than an hour. Turning SSH off.
|
||
mode: single
|
||
- id: '1638101748992'
|
||
alias: 'Add-ons: Zigbee 2 MQTT Proxy Started'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.zigbee2mqtt_proxy_running
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stop_add_ons
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Zigbee 2 MQTT Proxy started.
|
||
title: ':heavy_plus_sign: Add-on'
|
||
log_level: Debug
|
||
- action: timer.start
|
||
metadata: {}
|
||
data:
|
||
duration: 00:30:00
|
||
target:
|
||
entity_id: timer.stop_add_on_zigbee_2_mqtt_proxy
|
||
- id: '1638101748993'
|
||
alias: 'Add-ons: Automatically Disable Zigbee 2 MQTT Proxy'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: timer.finished
|
||
event_data:
|
||
entity_id: timer.stop_add_on_zigbee_2_mqtt_proxy
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_stop_add_ons
|
||
state: 'on'
|
||
actions:
|
||
- action: script.stop_add_on
|
||
data:
|
||
addonEntityId: 45df7312_zigbee2mqtt_proxy
|
||
message: Zigbee2MQTT Proxy has been on for more than an hour. Turning Zigbee2MQTT
|
||
Proxy off.
|
||
mode: single
|
||
- id: '1700062541454'
|
||
alias: 'Add-On: Update For File Editor'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.file_editor_newest_version
|
||
conditions:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.file_editor_newest_version
|
||
state: sensor.file_editor_version
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: File Editor updated from {{ states('sensor.file_editor_version')
|
||
}} to {{ states('sensor.file_editor_newest_version')}}.
|
||
title: ':heavy_plus_sign: Add-on'
|
||
log_level: Normal
|
||
- action: update.install
|
||
data: {}
|
||
target:
|
||
entity_id: update.file_editor_update
|
||
mode: single
|
||
- id: '1700062541455'
|
||
alias: 'Add-On: Update For Terminal & Web'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.advanced_ssh_web_terminal_newest_version
|
||
conditions:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.advanced_ssh_web_terminal_newest_version
|
||
state: sensor.advanced_ssh_web_terminal_version
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Terminal & SSH updated from {{ states('sensor.advanced_ssh_web_terminal_version')
|
||
}} to {{ states('sensor.advanced_ssh_web_terminal_newest_version')}}.
|
||
title: ':heavy_plus_sign: Add-on'
|
||
log_level: Normal
|
||
- action: update.install
|
||
data: {}
|
||
target:
|
||
entity_id: update.advanced_ssh_web_terminal_update
|
||
mode: single
|
||
- id: '1700062541456'
|
||
alias: 'Add-On: Update For ESPHome'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.esphome_newest_version
|
||
conditions:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.esphome_newest_version
|
||
state: sensor.esphome_version
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ESPHome updated from {{ states('sensor.esphome_version') }} to {{
|
||
states('sensor.esphome_newest_version')}}.
|
||
title: ':heavy_plus_sign: Add-on'
|
||
log_level: Normal
|
||
- action: update.install
|
||
data: {}
|
||
target:
|
||
entity_id: update.esphome_update
|
||
mode: single
|
||
- id: '1700062541457'
|
||
alias: 'Add-On: Update For Zigbee2MQTT Proxy'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.zigbee2mqtt_proxy_newest_version
|
||
conditions:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.zigbee2mqtt_proxy_newest_version
|
||
state: sensor.zigbee2mqtt_proxy_version
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Zigbee2MQTT Proxy updated from {{ states('sensor.zigbee2mqtt_proxy_version')
|
||
}} to {{ states('sensor.zigbee2mqtt_proxy_newest_version')}}.
|
||
title: ':heavy_plus_sign: Add-on'
|
||
log_level: Normal
|
||
- action: update.install
|
||
data: {}
|
||
target:
|
||
entity_id: update.zigbee2mqtt_proxy_update
|
||
mode: single
|
||
- id: '1700062541458'
|
||
alias: 'Add-On: Update For Log Viewer'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.log_viewer_newest_version
|
||
conditions:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.log_viewer_newest_version
|
||
state: sensor.log_viewer_version
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Log Viewer updated from {{ states('sensor.log_viewer_version') }}
|
||
to {{ states('sensor.log_viewer_newest_version')}}.
|
||
title: ':heavy_plus_sign: Add-on'
|
||
log_level: Normal
|
||
- action: update.install
|
||
data: {}
|
||
target:
|
||
entity_id: update.log_viewer_update
|
||
mode: single
|
||
- id: '1700062541459'
|
||
alias: 'Add-On: Update For Log Viewer'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.visual_studio_code_newest_version
|
||
conditions:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.visual_studio_code_newest_version
|
||
state: sensor.visual_studio_code_version
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Log Viewer updated from {{ states('sensor.visual_studio_code_version')
|
||
}} to {{ states('sensor.visual_studio_code_newest_version')}}.
|
||
title: ':heavy_plus_sign: Add-on'
|
||
log_level: Normal
|
||
- action: update.install
|
||
data: {}
|
||
target:
|
||
entity_id: update.studio_code_server_update
|
||
mode: single
|
||
- id: '1653739708849'
|
||
alias: 'Telegram: Event Received'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: telegram_command
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.command == ''get_camera'' }}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Getting camera {{ trigger.event.data.args}}
|
||
default:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Recieved Telegram event:
|
||
|
||
|
||
command: {{ trigger.event.data.command }}
|
||
|
||
args: {{ trigger.event.data.args }}
|
||
|
||
from_first: {{ trigger.event.data.from_first }}
|
||
|
||
from_last: {{ trigger.event.data.from_last }}
|
||
|
||
user_id: {{ trigger.event.data.user_id }}
|
||
|
||
chat_id: {{ trigger.event.data.chat_id }}
|
||
|
||
chat: {{ trigger.event.data.chat }}'
|
||
title: Telegram
|
||
log_level: Debug
|
||
mode: queued
|
||
max: 10
|
||
- id: '1653739708850'
|
||
alias: 'Telegram: Message Received'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: telegram_text
|
||
conditions: []
|
||
actions:
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.text|default(none, true) != none }}'
|
||
then:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':speech_balloon: Received Telegram event:
|
||
|
||
chat: {{ trigger.event.data.chat }}
|
||
|
||
from_first: {{ trigger.event.data.from_first }}
|
||
|
||
from_last: {{ trigger.event.data.from_last }}
|
||
|
||
user_id: {{ trigger.event.data.user_id }}
|
||
|
||
chat_id: {{ trigger.event.data.chat_id }}
|
||
|
||
text: {{ trigger.event.data.text }}'
|
||
title: Telegram
|
||
log_level: Debug
|
||
- choose:
|
||
- alias: Message from Danny
|
||
conditions:
|
||
- condition: template
|
||
value_template: '{{ trigger.event.data.user_id|string|default('''', true) ==
|
||
states(''input_text.dannys_telegram_chat_id'') }}'
|
||
sequence:
|
||
- action: conversation.process
|
||
data:
|
||
agent_id: conversation.llama3_2_vision
|
||
text: '{{ trigger.event.data.text }}'
|
||
response_variable: assist
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ assist.response.response_type|default(none, true)
|
||
!= none and assist.response.response_type == ''error''}}'
|
||
then:
|
||
- parallel:
|
||
- action: telegram_bot.send_message
|
||
data:
|
||
message: '{%- set wait_response = [''hmm...'', ''thinking...'',
|
||
''...'', ''er...'', ''um...'', ''well''] -%} {{ wait_response[range(0,
|
||
wait_response|length)|random] }}'
|
||
config_entry_id: 01K3E0RTD04WM71CZ2G3F6VZ3W
|
||
- action: conversation.process
|
||
data:
|
||
agent_id: conversation.home_assistant
|
||
text: '{{ trigger.event.data.text }}'
|
||
response_variable: assist
|
||
- action: telegram_bot.send_message
|
||
data:
|
||
message: '{{ assist.response.speech.plain.speech }}'
|
||
config_entry_id: 01K3E0RTD04WM71CZ2G3F6VZ3W
|
||
default:
|
||
- action: conversation.process
|
||
data:
|
||
agent_id: conversation.llama3_2_vision
|
||
text: '{{ trigger.event.data.text }}'
|
||
response_variable: assist
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ assist.response.response_type|default(none, true) !=
|
||
none and assist.response.response_type == ''error''}}'
|
||
then:
|
||
- parallel:
|
||
- action: telegram_bot.send_message
|
||
data:
|
||
message: '{%- set wait_response = [''hmm...'', ''thinking...'', ''...'',
|
||
''er...'', ''um...'', ''well''] -%} {{ wait_response[range(0, wait_response|length)|random]
|
||
}}'
|
||
config_entry_id: 01K3E0RTD04WM71CZ2G3F6VZ3W
|
||
- action: conversation.process
|
||
data:
|
||
agent_id: conversation.home_assistant
|
||
text: '{{ trigger.event.data.text }}'
|
||
response_variable: assist
|
||
- action: telegram_bot.send_message
|
||
data:
|
||
message: '{{ assist.response.speech.plain.speech }}'
|
||
config_entry_id: 01K3E0RTD04WM71CZ2G3F6VZ3W
|
||
mode: queued
|
||
max: 10
|
||
- id: '1653739708851'
|
||
alias: 'Telegram: Callback Received'
|
||
description: ''
|
||
triggers:
|
||
- trigger: event
|
||
event_type: telegram_callback
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':speech_balloon: Recieved Telegram event:
|
||
|
||
data: {{ trigger.event.data.data }}
|
||
|
||
|
||
message: {{ trigger.event.data.message }}
|
||
|
||
|
||
from_first: {{ trigger.event.data.from_first }}
|
||
|
||
|
||
from_last: {{ trigger.event.data.from_last }}
|
||
|
||
|
||
user_id: {{ trigger.event.data.user_id }}
|
||
|
||
|
||
id: {{ trigger.event.data.id }}
|
||
|
||
|
||
chat_id: {{ trigger.event.data.chat_id }}
|
||
|
||
|
||
text: {{ trigger.event.data.text }}'
|
||
title: Telegram
|
||
log_level: Debug
|
||
mode: queued
|
||
max: 10
|
||
- id: '1726077652711'
|
||
alias: 'Tesla: USB Archive'
|
||
description: ''
|
||
triggers:
|
||
- trigger: webhook
|
||
allowed_methods:
|
||
- POST
|
||
local_only: true
|
||
webhook_id: teslausb
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: '{{ trigger.json.value2 }}'
|
||
title: Tesla
|
||
log_level: Normal
|
||
mode: queued
|
||
max: 10
|
||
- id: '1750161174574'
|
||
alias: 'Tesla: Windows Open At Night'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: '23:00:00'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.model_3_windows
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
title: 'Car :car:'
|
||
message: 'Model 3 windows :window: are open.'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1622667704047'
|
||
alias: 'Time: Warn Doors or Windows Still Open At Night'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: '22:00:00'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.alarmed_doors_and_windows
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':warning: :clock{{ now().strftime(''%I'') | int }}{% if now().minute
|
||
| int > 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :door: :window:
|
||
The following entrances are still open: {% for entity in state_attr(''binary_sensor.alarmed_doors_and_windows'',''entity_id'')
|
||
%}{% if states(entity) == ''on'' %}{{ ''
|
||
|
||
* '' ~ state_attr(entity, ''friendly_name'') }} {% endif %}{% endfor %}'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1619466600288'
|
||
alias: 'Time: Delete Old Camera Files'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time_pattern
|
||
hours: /2
|
||
conditions: []
|
||
actions:
|
||
parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Deleting :camera:
|
||
files'
|
||
log_level: Debug
|
||
- action: delete.files_in_folder
|
||
data:
|
||
folder: /config/camera/
|
||
scan_subfolders: true
|
||
remove_subfolders: false
|
||
time: 14400
|
||
except_files:
|
||
- .gitignore
|
||
- deepstack_object_conservatory_latest.png
|
||
- deepstack_object_conservatory_none.png
|
||
- deepstack_object_driveway_latest.png
|
||
- deepstack_object_driveway_none.png
|
||
- deepstack_object_front_door_latest.png
|
||
- deepstack_object_front_door_None.png
|
||
- deepstack_object_kitchen_latest.png
|
||
- deepstack_object_kitchen_none.png
|
||
- deepstack_object_lounge_latest.png
|
||
- deepstack_object_lounge_none.png
|
||
- deepstack_object_upstairs_latest.png
|
||
- deepstack_object_upstairs_none.png
|
||
- README.md
|
||
mode: single
|
||
- id: '1588859384208'
|
||
alias: 'Time: Reset Morning Run'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at: 04:59:00
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: input_boolean.turn_on
|
||
entity_id: input_boolean.enable_morning_routine
|
||
data: {}
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: :sunny: Reset
|
||
morning routine run flag'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1582406380123'
|
||
alias: 'Timed: Turn Off Downstairs Lights at 2am'
|
||
description: Fall back to turn off all lights should there be any connectivity issues
|
||
etc.
|
||
triggers:
|
||
- trigger: time
|
||
at: 02:00:00
|
||
id: 2am
|
||
- trigger: time
|
||
at: 03:00:00
|
||
- trigger: time
|
||
at: 04:00:00
|
||
conditions:
|
||
- not:
|
||
- condition: time
|
||
weekday:
|
||
- sun
|
||
- condition: trigger
|
||
id:
|
||
- 2am
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':clock{{ now().strftime(''%I'') | int }}{% if now().minute | int
|
||
> 25 and now().minute | int < 35 %}30{% else %}{% endif %}: Turning downstairs
|
||
light off.'
|
||
log_level: Debug
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id: scene.turn_off_downstairs_lights
|
||
mode: single
|
||
- id: '1745396436913'
|
||
alias: 'Time: Announce Bed Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: time
|
||
at:
|
||
entity_id: input_datetime.childrens_bed_time
|
||
offset: '-1:15:00'
|
||
id: 1h
|
||
- trigger: time
|
||
at:
|
||
entity_id: input_datetime.childrens_bed_time
|
||
offset: -0:15:00
|
||
id: 0h
|
||
conditions:
|
||
- condition: or
|
||
conditions:
|
||
- condition: state
|
||
entity_id: person.leo
|
||
state: home
|
||
- condition: state
|
||
entity_id: person.ashlee
|
||
state: home
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
- condition: time
|
||
weekday:
|
||
- thu
|
||
- wed
|
||
- tue
|
||
- mon
|
||
- sun
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- 1h
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
metadata: {}
|
||
data:
|
||
log_level: Debug
|
||
message: Sending bed time notification
|
||
- action: script.alexa_announce
|
||
metadata: {}
|
||
data:
|
||
method: speak
|
||
message: It's one hour before bedtime.
|
||
- conditions:
|
||
- condition: trigger
|
||
id:
|
||
- 0h
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
metadata: {}
|
||
data:
|
||
log_level: Debug
|
||
message: Sending bed time notification
|
||
- action: script.alexa_announce
|
||
metadata: {}
|
||
data:
|
||
method: speak
|
||
message: It's bed time. Don't forget your reading book.
|
||
mode: single
|
||
- id: '1588609147280'
|
||
alias: 'People: Someone Arrives Home'
|
||
description: Someone is home.
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: group.tracked_people
|
||
from: not_home
|
||
to: home
|
||
conditions:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_away
|
||
- condition: state
|
||
entity_id: input_boolean.enable_home_presence_detection
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_away
|
||
- condition: state
|
||
entity_id: input_boolean.enable_morning_routine
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':house: :running: Someone arrived home.'
|
||
log_level: Debug
|
||
- action: script.set_alarm_to_disarmed_mode
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_morning_routine
|
||
state: 'on'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':house: :running: Someone arrived home before :city_sunrise:
|
||
sunrise.'
|
||
log_level: Debug
|
||
- action: script.set_alarm_to_disarmed_mode
|
||
default: []
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: climate.thermostat
|
||
state: 'off'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Heating is off. Turning heating on.
|
||
title: ':hotsprings: :droplet: Boiler'
|
||
log_level: Debug
|
||
- action: script.set_central_heating_to_home_mode
|
||
default: []
|
||
mode: single
|
||
- id: '1655063863297'
|
||
alias: 'People: Heading Home'
|
||
description: Triggers when someone has been away for long distance and heading back
|
||
home.
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.danny_home_nearest_distance
|
||
below: input_number.distance_close_to_home
|
||
- trigger: numeric_state
|
||
entity_id: sensor.terina_home_nearest_distance
|
||
below: input_number.distance_close_to_home
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
- condition: or
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.danny_home_nearest_direction_of_travel
|
||
state: towards
|
||
- condition: state
|
||
entity_id: sensor.terina_home_nearest_direction_of_travel
|
||
state: towards
|
||
sequence:
|
||
- action: input_text.set_value
|
||
data:
|
||
value: '{%- if trigger.entity_id == ''sensor.danny_home_nearest_distance''
|
||
-%} person.danny {%- elif trigger.entity_id == ''sensor.terina_home_nearest_distance''
|
||
-%} person.terina {%- endif -%}'
|
||
target:
|
||
entity_id: input_text.origin_address
|
||
- action: input_text.set_value
|
||
data:
|
||
value: zone.home
|
||
target:
|
||
entity_id: input_text.destination_address
|
||
- action: homeassistant.update_entity
|
||
data: {}
|
||
target:
|
||
entity_id: sensor.google_travel_time_by_car
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: '{%- if trigger.entity_id == ''sensor.danny_home_nearest_distance''
|
||
-%} {{ state_attr(''person.danny'', ''friendly_name'') }} {%- elif trigger.entity_id
|
||
== ''sensor.terina_home_nearest_distance'' -%} {{ state_attr(''person.terina'',
|
||
''friendly_name'') }} {%- endif -%} is {{ states(''trigger.entity_id'',
|
||
with_unit=True) }} from home and will arrive in {{ states(''sensor.google_travel_time_by_car'',
|
||
with_unit=True) }}.'
|
||
log_level: Debug
|
||
- if:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
then:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Changing to normal mode
|
||
log_level: Debug
|
||
- action: input_select.select_option
|
||
data:
|
||
option: Normal
|
||
target:
|
||
entity_id: input_select.home_mode
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: '{%- if trigger.entity_id == ''sensor.danny_home_nearest_distance''
|
||
-%} {{ state_attr(''person.danny'', ''friendly_name'') }} {%- elif trigger.entity_id
|
||
== ''sensor.terina_home_nearest_distance'' -%} {{ state_attr(''person.terina'',
|
||
''friendly_name'') }} {%- endif -%} is {{ states(''trigger.entity_id'',
|
||
with_unit=True) }} from home and will arrive in {{ states(''sensor.google_travel_time_by_car'',
|
||
with_unit=True) }}.'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
default: []
|
||
mode: single
|
||
- id: '1680450183660'
|
||
alias: 'People: Near Home'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.danny_home_nearest_distance
|
||
below: input_number.distance_almost_to_home
|
||
- trigger: numeric_state
|
||
entity_id: sensor.terina_home_nearest_distance
|
||
below: input_number.distance_almost_to_home
|
||
conditions:
|
||
- or:
|
||
- condition: state
|
||
entity_id: sensor.danny_home_nearest_direction_of_travel
|
||
state: towards
|
||
- condition: state
|
||
entity_id: sensor.terina_home_nearest_direction_of_travel
|
||
state: towards
|
||
- or:
|
||
- condition: state
|
||
entity_id: person.danny
|
||
state: home
|
||
- condition: state
|
||
entity_id: person.terina
|
||
state: home
|
||
actions:
|
||
- action: input_text.set_value
|
||
data:
|
||
value: '{% if trigger.entity_id == ''sensor.danny_home_nearest_distance'' %}
|
||
person.danny {% elif trigger.entity_id == ''sensor.terina_home_nearest_distance''%}
|
||
person.terina {% endif %}'
|
||
target:
|
||
entity_id: input_text.origin_address
|
||
- action: input_text.set_value
|
||
data:
|
||
value: zone.home
|
||
target:
|
||
entity_id: input_text.destination_address
|
||
- action: homeassistant.update_entity
|
||
data: {}
|
||
target:
|
||
entity_id: sensor.google_travel_time_by_car
|
||
- if:
|
||
- condition: state
|
||
entity_id: person.danny
|
||
state: home
|
||
then:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: '{% if trigger.entity_id == ''sensor.danny_home_nearest_distance''
|
||
%} {{ state_attr(''person.danny'', ''friendly_name'') }} {% elif trigger.entity_id
|
||
== ''sensor.terina_home_nearest_distance''%} {{ state_attr(''person.terina'',
|
||
''friendly_name'') }} {% endif %} is {{ states(''trigger.entity_id'', with_unit=True)
|
||
}} from home and will arrive in {{ states(''sensor.google_travel_time_by_car'',
|
||
with_unit=True) }}.'
|
||
log_level: Normal
|
||
people:
|
||
- person.terina
|
||
- if:
|
||
- condition: state
|
||
entity_id: person.terina
|
||
state: home
|
||
then:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: '{% if trigger.entity_id == ''sensor.danny_home_nearest_distance''
|
||
%} {{ state_attr(''person.danny'', ''friendly_name'') }} {% elif trigger.entity_id
|
||
== ''sensor.terina_home_nearest_distance''%} {{ state_attr(''person.terina'',
|
||
''friendly_name'') }} {% endif %} is {{ states(''trigger.entity_id'', with_unit=True)
|
||
}} from home and will arrive in {{ states(''sensor.google_travel_time_by_car'',
|
||
with_unit=True) }}.'
|
||
log_level: Normal
|
||
people:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1595524992207'
|
||
alias: 'People: No One Home'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: group.tracked_people
|
||
for: 00:01:00
|
||
to: not_home
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_home_presence_detection
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: device_tracker.udm_pro
|
||
state: unavailable
|
||
actions:
|
||
- parallel:
|
||
- action: script.lock_house
|
||
- action: script.3d_printer_left_unattended
|
||
- action: calendar.get_events
|
||
target:
|
||
entity_id:
|
||
- calendar.tsang_children
|
||
- calendar.family
|
||
data:
|
||
start_date_time: '{{ as_timestamp(now())|timestamp_custom(''%Y-%m-%d %H:%M:%S'')
|
||
}}'
|
||
duration:
|
||
hours: 1
|
||
minutes: 0
|
||
seconds: 0
|
||
response_variable: calendar
|
||
- alias: Check if there's a family calendar event.
|
||
choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ calendar[''calendar.family''].events | count > 0 }}'
|
||
- condition: template
|
||
value_template: '{{ calendar[''calendar.family''].events[0].location is
|
||
not defined }}'
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: 'No one home and there''s a family event on:
|
||
|
||
Name: {{ calendar[''calendar.family''].events[0].summary }}
|
||
|
||
Location: {{ calendar[''calendar.family''].events[0].location | default('''',
|
||
true) }}
|
||
|
||
Start Time: {{ calendar[''calendar.family''].events[0].start }}
|
||
|
||
End Time: {{ calendar[''calendar.family''].events[0].end }}'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
default: []
|
||
- alias: Check if there's a children calendar event.
|
||
choose:
|
||
- conditions:
|
||
- condition: template
|
||
value_template: '{{ calendar[''calendar.family''].events | count > 0 }}'
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: 'No one home and there''s a childrens'' event on:
|
||
|
||
Name: {{ calendar[''calendar.tsang_children''].events[0].summary }}
|
||
|
||
Location: {{ calendar[''calendar.tsang_children''].events[0].location
|
||
| default('''', true) }}
|
||
|
||
Start Time: {{ calendar[''calendar.tsang_children''].events[0].start
|
||
}}
|
||
|
||
End Time: {{ calendar[''calendar.tsang_children''].events[0].end }}'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
default: []
|
||
- id: '1655063863296'
|
||
alias: 'People: Long Distance Away From Home'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.danny_home_nearest_distance
|
||
above: input_number.long_distance_away_from_home
|
||
- trigger: numeric_state
|
||
entity_id: sensor.terina_home_nearest_distance
|
||
above: input_number.long_distance_away_from_home
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.terina_home_nearest_distance
|
||
above: input_number.long_distance_away_from_home
|
||
- condition: numeric_state
|
||
entity_id: sensor.danny_home_nearest_distance
|
||
above: input_number.long_distance_away_from_home
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Everyone is far away from home.
|
||
log_level: Normal
|
||
- if:
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
then:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Changing to holiday mode.
|
||
title: Home Mode
|
||
log_level: Normal
|
||
- action: input_select.select_option
|
||
data:
|
||
option: Holiday
|
||
target:
|
||
entity_id: input_select.home_mode
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1674735382445'
|
||
alias: 'People: Danny Arriving Home'
|
||
description: Heading towards home and very close.
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.danny_home_nearest_distance
|
||
below: input_number.arriving_home_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_alarm_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_home
|
||
- condition: state
|
||
entity_id: sensor.danny_home_nearest_direction_of_travel
|
||
state: towards
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Danny is arriving home. Turning alarm off.
|
||
title: ':man: Danny'
|
||
log_level: Normal
|
||
- action: script.set_alarm_to_disarmed_mode
|
||
mode: single
|
||
- id: '1581867286886'
|
||
alias: 'People: Danny Arrives Home'
|
||
description: At Home.
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: person.danny
|
||
from: not_home
|
||
to: home
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_home_presence_detection
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.living_room_lamps
|
||
state: 'off'
|
||
then:
|
||
- action: script.front_door_lock_status
|
||
data: {}
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':house: :running: Arrived home and it''s dark. Turning Lounge and
|
||
kitchen ambient lights on.'
|
||
title: ':man: Danny'
|
||
log_level: Normal
|
||
- action: script.announce_delayed_notifications
|
||
data:
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
test: false
|
||
mode: single
|
||
- id: '1582456019025'
|
||
alias: 'People: Danny Leaves Home'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: person.danny
|
||
from: home
|
||
to: not_home
|
||
conditions:
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: not_home
|
||
actions:
|
||
- parallel:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.turn_off_downstairs_lights
|
||
- scene.office_all_lights_off
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':running: :house: Danny has left the house and no one is home. Turning
|
||
off lights.'
|
||
title: ':man: Danny'
|
||
log_level: Normal
|
||
- id: '1674735382446'
|
||
alias: 'People: Terina Arriving Home'
|
||
description: Heading towards home and very close.
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.terina_home_nearest_distance
|
||
below: input_number.arriving_home_threshold
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_alarm_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: alarm_control_panel.house_alarm
|
||
state: armed_home
|
||
- condition: state
|
||
entity_id: sensor.danny_home_nearest_direction_of_travel
|
||
state: towards
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Terina is arriving home. Turning alarm off.
|
||
title: ':woman: Terina'
|
||
log_level: Normal
|
||
- action: script.set_alarm_to_disarmed_mode
|
||
mode: single
|
||
- id: '1582754128581'
|
||
alias: 'People: Terina Arrives Home'
|
||
description: At Home.
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: person.terina
|
||
from: not_home
|
||
to: home
|
||
conditions:
|
||
- condition: numeric_state
|
||
entity_id: sensor.living_room_motion_3_illuminance
|
||
below: '55'
|
||
actions:
|
||
- parallel:
|
||
- if:
|
||
- condition: state
|
||
entity_id: light.living_room_lamps
|
||
state: 'off'
|
||
then:
|
||
- action: script.front_door_lock_status
|
||
data: {}
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':dancer: :house: :bulb: Arrived home and it''s dark. Turning Lounge
|
||
and kitchen ambient lights on.'
|
||
title: ':woman: Terina'
|
||
log_level: Normal
|
||
- action: script.announce_delayed_notifications
|
||
data:
|
||
people:
|
||
entity_id:
|
||
- person.terina
|
||
test: false
|
||
- id: '1582456025977'
|
||
alias: 'People: Terina Leaves Home'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: person.terina
|
||
from: home
|
||
to: not_home
|
||
conditions:
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: not_home
|
||
actions:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.turn_off_downstairs_lights
|
||
- scene.office_all_lights_off
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':house: :dancer: Left the house and no one is home.'
|
||
title: ':woman: Terina'
|
||
log_level: Normal
|
||
- id: '1582456025978'
|
||
alias: 'People: Leo Leaves Home'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: person.leo
|
||
from: home
|
||
to: not_home
|
||
conditions:
|
||
- condition: state
|
||
entity_id: group.tracked_people
|
||
state: not_home
|
||
actions:
|
||
- action: scene.turn_on
|
||
target:
|
||
entity_id:
|
||
- scene.turn_off_downstairs_lights
|
||
- scene.office_all_lights_off
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':house: :boy: Left the house and no one is home.'
|
||
title: ':boy: Leo'
|
||
log_level: Normal
|
||
- id: '1712574983598'
|
||
alias: 'People: Children Home And In No Children Mode'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- device_tracker.leos_nintendo_switch
|
||
to: home
|
||
from: not_home
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: No Children
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
metadata: {}
|
||
data:
|
||
log_level: Debug
|
||
message: Leo's Nintendo Switch came home and in No Children mode. Switching
|
||
to Normal.
|
||
title: People
|
||
- action: input_select.select_option
|
||
metadata: {}
|
||
data:
|
||
option: Normal
|
||
target:
|
||
entity_id: input_select.home_mode
|
||
mode: single
|
||
- id: '1722162099476'
|
||
alias: 'People: Music Follow Danny'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.dannys_phone_ble_area
|
||
not_to: unknown
|
||
conditions:
|
||
- condition: state
|
||
entity_id: media_player.spotify_danny
|
||
state: playing
|
||
actions:
|
||
- variables:
|
||
target_source: '{{ states(''sensor.dannys_phone_ble_area'') }}'
|
||
adjusted_source: '{%- if target_source|lower == ''office'' and states(''group.jd_computer'')
|
||
== ''home'' -%} JD {%- elif target_source|lower == ''office'' -%} Office Echo
|
||
Show {%- elif target_source|lower == ''living room'' -%} DO NOT CAST {%- else
|
||
-%} {{ target_source }} {%- endif -%}'
|
||
continue_on_error: true
|
||
- if:
|
||
- condition: template
|
||
value_template: '{{ adjusted_source|lower != state_attr(''media_player.spotify_danny'',
|
||
''source'')|lower }}'
|
||
- condition: template
|
||
value_template: '{{ adjusted_source|lower in state_attr(''media_player.spotify_danny'',
|
||
''source_list'')|lower }}'
|
||
then:
|
||
- action: media_player.select_source
|
||
data:
|
||
source: '{{ adjusted_source }}'
|
||
target:
|
||
entity_id: media_player.spotify_danny
|
||
mode: single
|
||
- id: '1757534420170'
|
||
alias: 'Unifi Protect: Personal Vehicles'
|
||
description: ''
|
||
triggers:
|
||
- trigger: webhook
|
||
allowed_methods:
|
||
- POST
|
||
local_only: true
|
||
webhook_id: personal-vehicles
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_unifi_protect_events_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: 'Personal vehicles detected
|
||
|
||
|
||
Trigger Value: {{ trigger.json.alarm.triggers[0].value }}
|
||
|
||
Event ID: {{ trigger.json.alarm.triggers[0].eventId }}'
|
||
title: Front Garden
|
||
log_level: Normal
|
||
mode: queued
|
||
max: 10
|
||
- id: '1757533154370'
|
||
alias: 'Unifi Protect: Known Faces'
|
||
description: ''
|
||
triggers:
|
||
- trigger: webhook
|
||
allowed_methods:
|
||
- POST
|
||
local_only: true
|
||
webhook_id: known-faces
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_unifi_protect_events_automations
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: 'Unknown person
|
||
|
||
|
||
Event ID: {{ trigger.json.alarm.triggers[0].eventId }}
|
||
|
||
Event Path: {{ trigger.json.alarm.eventPath }}
|
||
|
||
Event Local Link: {{ trigger.json.alarm.eventLocalLink }}'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1757533154371'
|
||
alias: 'Unifi Protect: Unknown Faces'
|
||
description: ''
|
||
triggers:
|
||
- trigger: webhook
|
||
allowed_methods:
|
||
- POST
|
||
local_only: true
|
||
webhook_id: unknown-faces
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_unifi_protect_events_automations
|
||
state: 'on'
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: input_select.home_mode
|
||
state: Holiday
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: 'Unknown person
|
||
|
||
|
||
Event ID: {{ trigger.json.alarm.triggers[0].eventId }}
|
||
|
||
Event Path: {{ trigger.json.alarm.eventPath }}
|
||
|
||
Event Local Link: {{ trigger.json.alarm.eventLocalLink }}'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
default: []
|
||
mode: queued
|
||
max: 10
|
||
- id: '1591963855737'
|
||
alias: 'UPS: Status Change'
|
||
description: Notification of interested states
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.lounge_ups_status_data
|
||
- sensor.computer_ups_status
|
||
- sensor.server_ups_status_data
|
||
- sensor.threedprinterups_status_data
|
||
- sensor.familycomputerups_status_data
|
||
to: unavailable
|
||
conditions: []
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- alias: Error conditions
|
||
condition: template
|
||
value_template: '{{ states(trigger.entity_id) in ("OB DISCHRG", "OL OFF",
|
||
"ALARM OL RB") }}'
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':battery: Battery is {{ states(''trigger.entity_id'') }}.'
|
||
title: ':bangbang: :battery: UPS: {%- if trigger.entity_id|default('''',
|
||
true) == ''sensor.lounge_ups_status_data'' -%} :couch_and_lamp: Living
|
||
Room {%- elif trigger.entity_id|default('''', true) == ''sensor.server_ups_status_data''
|
||
-%} Server {%- elif trigger.entity_id|default('''', true) == ''sensor.computer_ups_status_data''
|
||
-%} Computer {%- elif trigger.entity_id|default('''', true) == ''sensor.threedprinterups_status_data''
|
||
-%} 3D Printer {%- elif trigger.entity_id|default('''', true) == ''sensor.familycomputerups_status_data''
|
||
-%} :couch_and_lamp: Family Computer {%- else -%} :warning: Unknown device
|
||
{{ trigger.entity_id }} {%- endif -%}
|
||
|
||
:bangbang:'
|
||
- conditions:
|
||
- alias: Warning conditions
|
||
condition: template
|
||
value_template: '{{ states(trigger.entity_id) in ("unavailable", "OB DISCHRG",
|
||
"OL OFF", "ALARM OL RB") }}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':battery: Battery is {{ states(''trigger.entity_id'') }}.'
|
||
title: ':warning: :battery: UPS: {%- if trigger.entity_id|default('''',
|
||
true) == ''sensor.lounge_ups_status_data'' -%} :couch_and_lamp: Living
|
||
Room {%- elif trigger.entity_id|default('''', true) == ''sensor.server_ups_status_data''
|
||
-%} Server {%- elif trigger.entity_id|default('''', true) == ''sensor.computer_ups_status_data''
|
||
-%} Computer {%- elif trigger.entity_id|default('''', true) == ''sensor.threedprinterups_status_data''
|
||
-%} 3D Printer {%- elif trigger.entity_id|default('''', true) == ''sensor.familycomputerups_status_data''
|
||
-%} :couch_and_lamp: Family Computer {%- else -%} :warning: Unknown device
|
||
{{ trigger.entity_id }} {%- endif -%} {{ states(''trigger.entity_id'')
|
||
}} :warning:'
|
||
log_level: Normal
|
||
- conditions:
|
||
- alias: Return to normal conditions
|
||
condition: template
|
||
value_template: '{{ states(trigger.entity_id) in ("OL CHRG") }}'
|
||
sequence:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':battery: UPS is {{ states(''trigger.entity_id'') }}.'
|
||
title: ':heavy_check_mark: :battery: UPS: {%- if trigger.entity_id|default('''',
|
||
true) == ''sensor.lounge_ups_status_data'' -%} :couch_and_lamp: Living
|
||
Room {%- elif trigger.entity_id|default('''', true) == ''sensor.server_ups_status_data''
|
||
-%} Server {%- elif trigger.entity_id|default('''', true) == ''sensor.computer_ups_status_data''
|
||
-%} Computer {%- elif trigger.entity_id|default('''', true) == ''sensor.threedprinterups_status_data''
|
||
-%} 3D Printer {%- elif trigger.entity_id|default('''', true) == ''sensor.familycomputerups_status_data''
|
||
-%} :couch_and_lamp: Living Room {%- else -%} :warning: Unknown device
|
||
{{ trigger.entity_id }} {%- endif -%} :heavy_check_mark:'
|
||
- conditions:
|
||
- alias: Return to normal conditions
|
||
condition: template
|
||
value_template: '{{ states(trigger.entity_id) in ("OL") }}'
|
||
sequence:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':battery: UPS is {{ states(''trigger.entity_id'') }}.'
|
||
title: ':battery: UPS: {%- if trigger.entity_id|default('''', true) == ''sensor.lounge_ups_status_data''
|
||
-%} :couch_and_lamp: Living Room {%- elif trigger.entity_id|default('''',
|
||
true) == ''sensor.server_ups_status_data'' -%} Server {%- elif trigger.entity_id|default('''',
|
||
true) == ''sensor.computer_ups_status_data'' -%} Computer {%- elif trigger.entity_id|default('''',
|
||
true) == ''sensor.threedprinterups_status_data'' -%} 3D Printer {%- elif
|
||
trigger.entity_id|default('''', true) == ''sensor.familycomputerups_status_data''
|
||
-%} :couch_and_lamp: Living Room {%- else -%} :warning: Unknown device
|
||
{{ trigger.entity_id }} {%- endif -%}'
|
||
log_level: Normal
|
||
- id: '1741438466512'
|
||
alias: 'Utility Room: Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.utility
|
||
- binary_sensor.utility_room_motion_occupancy
|
||
- binary_sensor.utility_room_light_trigger
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':paw_prints: Motion detected. Turning :bulb: light off.'
|
||
title: ':fountain: Utility Room'
|
||
log_level: Debug
|
||
- action: light.turn_on
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: light.utility_room_light
|
||
mode: single
|
||
- id: '1741438515604'
|
||
alias: 'Utility Room: No Motion Detected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.utility_room_light_trigger
|
||
to: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 2
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':no_pedestrians: No motion detected. Turning light off.'
|
||
title: ':fountain: Utility Room'
|
||
log_level: Debug
|
||
- action: light.turn_off
|
||
metadata: {}
|
||
data: {}
|
||
target:
|
||
entity_id: light.utility_room_light
|
||
mode: single
|
||
- id: '1595678795894'
|
||
alias: 'Utility: Freezer Door Open'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.utility_freezer_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: :snowflake: Freezer door is open.'
|
||
title: ':fountain: Utility Room'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1595678900777'
|
||
alias: 'Utility: Freezer Door Closed'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.utility_freezer_door_contact
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':door: :snowflake: Freezer door closed'
|
||
title: ':fountain: Utility Room'
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1595679010792'
|
||
alias: 'Utility: Freezer Open For A Long Period Of Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.utility_freezer_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
for: 00:04:00
|
||
- trigger: state
|
||
entity_id: binary_sensor.utility_freezer_door_contact
|
||
to: 'on'
|
||
for: 00:30:00
|
||
- trigger: state
|
||
entity_id: binary_sensor.utility_freezer_door_contact
|
||
to: 'on'
|
||
for: 00:45:00
|
||
- trigger: state
|
||
entity_id: binary_sensor.utility_freezer_door_contact
|
||
to: 'on'
|
||
for: 01:00:00
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':warning: :door: :snowflake: Freezer door has been open for more
|
||
than {{ relative_time(states.binary_sensor.utility_freezer_door_contact.last_changed)
|
||
}}!'
|
||
title: ':fountain: Utility Room'
|
||
- action: script.alexa_announce
|
||
data:
|
||
message: Utility Room ❄ Freezer door has been open for more than {{ relative_time(states.binary_sensor.utility_freezer_door_contact.last_changed)
|
||
}}!
|
||
mode: single
|
||
- id: '1657801925106'
|
||
alias: 'Utility: Freezer Plug Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- switch.freezer
|
||
to: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Freezer plug is turned off.
|
||
title: ':fountain: Utility Room'
|
||
log_level: Normal
|
||
- action: script.send_actionable_notification_with_2_buttons
|
||
data:
|
||
message: Freezer plug is turned off. Turn on?
|
||
title: ':fountain: Utility Room'
|
||
log_level: Normal
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
action1_title: 'Yes'
|
||
action1_name: switch_on_freezer
|
||
action2_title: 'No'
|
||
action2_name: ignore
|
||
mode: single
|
||
- id: '1595679010892'
|
||
alias: 'Utility: Freezer Open For A Long Period Of Time'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.utility_fridge_door_contact
|
||
from: 'off'
|
||
to: 'on'
|
||
for: 00:04:00
|
||
- trigger: state
|
||
entity_id: binary_sensor.utility_fridge_door_contact
|
||
to: 'on'
|
||
for: 00:30:00
|
||
- trigger: state
|
||
entity_id: binary_sensor.utility_fridge_door_contact
|
||
to: 'on'
|
||
for: 00:45:00
|
||
- trigger: state
|
||
entity_id: binary_sensor.utility_fridge_door_contact
|
||
to: 'on'
|
||
for: 01:00:00
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
data:
|
||
message: ':warning: :door: :snowflake: Fridge door has been open for more
|
||
than {{ relative_time(states.binary_sensor.utility_fridge_door_contact.last_changed)
|
||
}}!'
|
||
title: ':fountain: Utility Room'
|
||
- action: script.alexa_announce
|
||
data:
|
||
message: Utility Room ❄ Freezer door has been open for more than {{ relative_time(states.binary_sensor.utility_fridge_door_contact.last_changed)
|
||
}}!
|
||
mode: single
|
||
- id: '1657801925107'
|
||
alias: 'Utility: Fridge Plug Turned Off'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- switch.utility_fridge
|
||
to: 'off'
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: Fridge plug is turned off.
|
||
title: ':fountain: Utility Room'
|
||
log_level: Normal
|
||
- action: script.send_actionable_notification_with_2_buttons
|
||
data:
|
||
message: Fridge plug is turned off. Turn on?
|
||
title: ':fountain: Utility Room'
|
||
log_level: Normal
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
action1_title: 'Yes'
|
||
action1_name: switch_on_fridge
|
||
action2_title: 'No'
|
||
action2_name: ignore
|
||
mode: single
|
||
- id: '1595679010794'
|
||
alias: 'Utility: Washing Machine Started'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.washing_machine_powered_on
|
||
to: 'on'
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_to_home_log
|
||
data:
|
||
message: ':shirt: :soap: Washing Machine :arrow_forward: Started.'
|
||
title: Utility Room
|
||
log_level: Debug
|
||
mode: single
|
||
- id: '1595679010795'
|
||
alias: 'Utility: Washing Machine Finished'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id: binary_sensor.washing_machine_powered_on
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions: []
|
||
actions:
|
||
- action: script.washing_complete_notification
|
||
data:
|
||
message: ':shirt: :soap: Washing Machine :checkered_flag: Finished.'
|
||
title: Utility Room
|
||
mode: single
|
||
- id: '1622374233311'
|
||
alias: 'Weather: Forecast To Be Hot'
|
||
description: Watches weather forecast for hot temperatures
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: weather.home
|
||
attribute: temperature
|
||
above: input_number.forecast_high_temperature
|
||
- trigger: numeric_state
|
||
entity_id: sensor.temperature_forecast_next_hour
|
||
above: input_number.forecast_high_temperature
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.front_garden_motion_illuminance
|
||
- sensor.back_garden_motion_illuminance
|
||
above: input_number.close_blinds_brightness_threshold
|
||
conditions:
|
||
- or:
|
||
- condition: numeric_state
|
||
entity_id: weather.home
|
||
attribute: temperature
|
||
above: input_number.forecast_high_temperature
|
||
- condition: numeric_state
|
||
entity_id: sensor.temperature_forecast_next_hour
|
||
above: input_number.forecast_high_temperature
|
||
- condition: state
|
||
entity_id: sensor.season
|
||
state: summer
|
||
actions:
|
||
- parallel:
|
||
- if:
|
||
- condition: numeric_state
|
||
entity_id: sensor.front_garden_motion_illuminance
|
||
above: input_number.close_blinds_brightness_threshold
|
||
then:
|
||
- action: script.bedroom_close_blinds_by_weather
|
||
data:
|
||
temperature: '{{ state_attr(trigger.entity_id, ''temperature'') }}'
|
||
weather_condition: '{{ states(trigger.entity_id) }}'
|
||
- action: script.ashlees_bedroom_close_blinds_by_weather
|
||
data:
|
||
temperature: '{{ state_attr(trigger.entity_id, ''temperature'') }}'
|
||
weather_condition: '{{ states(trigger.entity_id) }}'
|
||
- if:
|
||
- condition: numeric_state
|
||
entity_id: sensor.back_garden_motion_illuminance
|
||
above: input_number.close_blinds_brightness_threshold
|
||
then:
|
||
- action: script.leos_bedroom_close_blinds_by_weather
|
||
data:
|
||
temperature: '{{ state_attr(trigger.entity_id, ''temperature'') }}'
|
||
weather_condition: '{{ states(trigger.entity_id) }}'
|
||
mode: single
|
||
- id: '1645568214221'
|
||
alias: 'Weather: Warning Notification'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id: sensor.met_office_rss_weather_warnings
|
||
above: 0
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification_with_url
|
||
data:
|
||
message: '{{ state_attr(''sensor.met_office_rss_weather_warnings'',''entries'')[0].title
|
||
}}
|
||
|
||
{{ state_attr(''sensor.met_office_rss_weather_warnings'',''entries'')[0].link
|
||
}}'
|
||
title: ':cloud: Weather'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
url: '{{state_attr(''sensor.met_office_rss_weather_warnings'', ''entries'')[0].links[1].href
|
||
}}'
|
||
mode: single
|
||
- id: '1734968573793'
|
||
alias: 'Weather: Storm Warning'
|
||
description: ''
|
||
triggers:
|
||
- trigger: numeric_state
|
||
entity_id:
|
||
- sensor.bedroom_air_pressure_difference
|
||
above: 4
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: ':thunder_cloud_and_rain: Storm Alert'
|
||
title: ':cloud: Weather'
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|
||
- id: '1712086876964'
|
||
alias: 'Zappi: Charging Schedule Started'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.ev_charger_schedule_1
|
||
- binary_sensor.ev_charger_schedule_2
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_zappi_automations
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: sensor.myenergi_zappi_plug_status
|
||
state: EV Disconnected
|
||
- or:
|
||
- and:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ev_charger_schedule_1
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.ev_charger_schedule_1
|
||
state: 'on'
|
||
- and:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ev_charger_schedule_2
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.ev_charger_schedule_2
|
||
state: 'on'
|
||
actions:
|
||
- action: script.zappi_check_ev_charge
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
mode: single
|
||
- id: '1712086876965'
|
||
alias: 'Zappi: Charging Schedule Stopped'
|
||
description: ''
|
||
trace:
|
||
stored_traces: 10
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.ev_charger_schedule_1
|
||
- binary_sensor.ev_charger_schedule_2
|
||
from: 'on'
|
||
to: 'off'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_zappi_automations
|
||
state: 'on'
|
||
- not:
|
||
- condition: state
|
||
entity_id: sensor.myenergi_zappi_plug_status
|
||
state: EV Disconnected
|
||
- not:
|
||
- condition: state
|
||
entity_id: sensor.myenergi_zappi_status
|
||
state: Paused
|
||
- or:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ev_charger_schedule_1
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: input_boolean.enable_ev_charger_schedule_2
|
||
state: 'on'
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Charging schedule stopped from {{ state_attr(trigger.entity_id, 'friendly_name')
|
||
}}
|
||
title: 'Zappi: Charging Scheduled Stop'
|
||
people:
|
||
entity_id:
|
||
- person.terina
|
||
- action: myenergi.myenergi_boost
|
||
target:
|
||
entity_id:
|
||
- select.myenergi_zappi_charge_mode
|
||
data:
|
||
amount: 1
|
||
- action: select.select_option
|
||
target:
|
||
entity_id:
|
||
- select.myenergi_zappi_charge_mode
|
||
data:
|
||
option: Eco+
|
||
mode: single
|
||
- id: '1712435997060'
|
||
alias: 'Zappi: Connected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.myenergi_zappi_plug_status
|
||
from: EV Disconnected
|
||
to: EV Connected
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_zappi_automations
|
||
state: 'on'
|
||
actions:
|
||
- action: script.zappi_check_ev_charge
|
||
data:
|
||
current_electricity_import_rate: '{{ states(''sensor.octopus_energy_electricity_current_rate'')
|
||
}}'
|
||
current_electricity_import_rate_unit: '{{ state_attr(''sensor.octopus_energy_electricity_current_rate'',
|
||
''unit_of_measurement'') }}'
|
||
current_electricity_export_rate: '{{ states(''sensor.octopus_energy_electricity_export_current_rate'')
|
||
}}'
|
||
mode: single
|
||
- id: '1715345710884'
|
||
alias: 'Zappi: Unidentified Vehicle Connected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.myenergi_zappi_plug_status
|
||
from: EV Disconnected
|
||
not_to: unavailable
|
||
for:
|
||
minutes: 15
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_zappi_automations
|
||
state: 'on'
|
||
- condition: state
|
||
entity_id: binary_sensor.model_y_charger
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: binary_sensor.model_3_charger
|
||
state: 'off'
|
||
- condition: state
|
||
entity_id: input_boolean.guest_ev
|
||
state: 'off'
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Vehicle connected and it's not a recognized car.
|
||
title: Zappi
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
- person.terina
|
||
mode: single
|
||
- id: '1715345710885'
|
||
alias: 'Zappi: Vehicle Disconnected'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.myenergi_zappi_plug_status
|
||
to: EV Disconnected
|
||
conditions:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_zappi_automations
|
||
state: 'on'
|
||
actions:
|
||
- parallel:
|
||
- action: script.send_to_home_log
|
||
metadata: {}
|
||
data:
|
||
message: Vehicle disconnected.
|
||
title: Zappi
|
||
debug: Debug
|
||
- alias: Turn off guest EV mode if it's on
|
||
if:
|
||
- condition: state
|
||
entity_id: input_boolean.guest_ev
|
||
state: 'on'
|
||
then:
|
||
- action: input_boolean.turn_off
|
||
target:
|
||
entity_id: input_boolean.guest_ev
|
||
data: {}
|
||
- alias: Update Predbat mode
|
||
if:
|
||
- condition: state
|
||
entity_id: input_boolean.enable_predbat_automations
|
||
state: 'on'
|
||
then:
|
||
- action: select.select_option
|
||
metadata: {}
|
||
target:
|
||
entity_id: select.predbat_mode
|
||
data:
|
||
option: Control charge & discharge
|
||
mode: single
|
||
- id: '1748515764878'
|
||
alias: 'Zappi: Set Target Charge Time For Weekday'
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- sensor.myenergi_zappi_plug_status
|
||
to: EV Connected
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.model_y_charger
|
||
to: 'on'
|
||
conditions:
|
||
- condition: state
|
||
entity_id: sensor.myenergi_zappi_plug_status
|
||
state: EV Connected
|
||
- condition: state
|
||
entity_id: binary_sensor.model_y_charger
|
||
state: 'on'
|
||
- condition: time
|
||
weekday:
|
||
- sun
|
||
- mon
|
||
- tue
|
||
- wed
|
||
- thu
|
||
- condition: not
|
||
conditions:
|
||
- condition: state
|
||
entity_id: select.octopus_energy_intelligent_target_time
|
||
state: 08:00
|
||
actions:
|
||
- choose:
|
||
- conditions:
|
||
- condition: state
|
||
entity_id: binary_sensor.model_y_charger
|
||
state: 'on'
|
||
sequence:
|
||
- parallel:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
title: MyEnergi
|
||
message: Changing Zappi target ready by time to 08:00.
|
||
people:
|
||
entity_id:
|
||
- person.terina
|
||
mode: single
|
||
- id: '1741294780206'
|
||
alias: Zigbee Coordinator Unavailable
|
||
description: ''
|
||
triggers:
|
||
- trigger: state
|
||
entity_id:
|
||
- binary_sensor.zigbee2mqtt_bridge_connection_state
|
||
to: unavailable
|
||
for:
|
||
hours: 0
|
||
minutes: 1
|
||
seconds: 0
|
||
conditions: []
|
||
actions:
|
||
- action: script.send_direct_notification
|
||
metadata: {}
|
||
data:
|
||
message: Zigbee coordinator became unavailable.
|
||
people:
|
||
entity_id:
|
||
- person.danny
|
||
mode: single
|