3966 lines
112 KiB
YAML
3966 lines
112 KiB
YAML
- id: 81bee5ee-6820-4626-aebf-3deb8de69e4d
|
|
alias: Turn On Audible Notifications
|
|
initial_state: true
|
|
trigger:
|
|
platform: template
|
|
value_template: '{{ states(''sensor.time'') == (state_attr(''input_datetime.audible_notification_on'',
|
|
''timestamp'') | int | timestamp_custom(''%H:%M'', False)) }}'
|
|
action:
|
|
- service: input_boolean.turn_on
|
|
entity_id: input_boolean.audible_notifications
|
|
- id: e0e9c774-6abe-42aa-bdab-32108bebb0e9
|
|
alias: Turn Off Audible Notifications
|
|
initial_state: true
|
|
trigger:
|
|
- platform: template
|
|
value_template: '{{ states(''sensor.time'') == (state_attr(''input_datetime.audible_notification_off'',
|
|
''timestamp'') | int | timestamp_custom(''%H:%M'', False)) }}'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.audible_notifications
|
|
state: 'on'
|
|
action:
|
|
- service: input_boolean.turn_off
|
|
entity_id: input_boolean.audible_notifications
|
|
- id: time_for_bed_annc
|
|
alias: Time For Bed Announcement
|
|
mode: single
|
|
trigger:
|
|
- platform: time
|
|
at: '22:30:00'
|
|
condition: []
|
|
action:
|
|
- service: script.status_annc
|
|
data:
|
|
who: everywhere
|
|
call_time_for_bed: 1
|
|
- id: a3739bb0-632d-4526-bf82-ee4e27b80882
|
|
alias: Set Room Presence
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.room_audio
|
|
action:
|
|
- service: input_text.set_value
|
|
data:
|
|
entity_id: input_text.room_presence
|
|
value: '{{ states(''sensor.room_audio'') }}'
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: house/presence/current_room
|
|
payload: '{{ states(''sensor.room_audio'') }}'
|
|
retain: true
|
|
- id: 8a2711f5-a034-4df0-ba67-4b8f85ceaaee
|
|
alias: Notification Volume Dim
|
|
initial_state: true
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.audible_notifications
|
|
to: 'off'
|
|
action:
|
|
- service: media_player.volume_set
|
|
data:
|
|
entity_id:
|
|
- media_player.kitchen_echo_dot
|
|
- media_player.living_room_echo
|
|
- media_player.chris_s_echo_flex
|
|
- media_player.chris_s_echo_show
|
|
- media_player.lab_echo_dot
|
|
volume_level: 0.3
|
|
- id: d5fe0a64-9012-4446-b946-cbcafb2c0728
|
|
alias: Notification Volume Normal
|
|
initial_state: true
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.audible_notifications
|
|
to: 'on'
|
|
action:
|
|
- service: media_player.volume_set
|
|
data:
|
|
entity_id:
|
|
- media_player.kitchen_echo_dot
|
|
- media_player.living_room_echo
|
|
- media_player.chris_s_echo_flex
|
|
- media_player.chris_s_echo_show
|
|
- media_player.lab_echo_dot
|
|
volume_level: 0.5
|
|
- id: 28c0e7a6-4024-48c9-a422-8b8ffc3a86d1
|
|
alias: Set Last Alexa Called Time
|
|
initial_state: true
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- media_player.kitchen_echo_dot
|
|
- media_player.living_room_echo
|
|
- media_player.chris_s_echo_flex
|
|
- media_player.chris_s_echo_show
|
|
- media_player.lab_echo_dot
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.attributes.last_called_timestamp | float
|
|
> trigger.from_state.attributes.last_called_timestamp | float }}'
|
|
action:
|
|
- service: input_datetime.set_datetime
|
|
target:
|
|
entity_id: input_datetime.last_time_alexa_called
|
|
data:
|
|
datetime: '{{ now().strftime(''%Y-%m-%d %H:%M:%S'') }}'
|
|
- alias: Bathroom Humidity High
|
|
id: 06611dfc596b4d79bc1b3cde11e93347
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.bathroom_humidity
|
|
above: input_number.bathroom_humidity_high_level
|
|
for: 00:00:30
|
|
action:
|
|
- service: switch.turn_on
|
|
entity_id: switch.bathroom_fan
|
|
mode: single
|
|
- alias: Bathroom Humidity Low
|
|
id: 331455d398e7440d955caa48f35b6cde
|
|
trigger:
|
|
- below: input_number.bathroom_humidity_low_level
|
|
entity_id: sensor.bathroom_humidity
|
|
for: 00:10
|
|
platform: numeric_state
|
|
above: '40'
|
|
action:
|
|
- entity_id: switch.bathroom_fan
|
|
service: switch.turn_off
|
|
mode: single
|
|
- alias: Living Room Light Toggle by MQTT
|
|
id: '1587008568649'
|
|
description: ''
|
|
trigger:
|
|
- platform: mqtt
|
|
topic: living_room/light/toggle
|
|
condition: []
|
|
action:
|
|
- data: {}
|
|
entity_id: light.living_room_fan_light
|
|
service: light.toggle
|
|
- alias: Bedroom Light Toggle by MQTT
|
|
description: ''
|
|
trigger:
|
|
- platform: mqtt
|
|
topic: bedroom/fan_light/toggle
|
|
condition: []
|
|
action:
|
|
- data: {}
|
|
entity_id: light.bedroom_fan_lights
|
|
service: light.toggle
|
|
id: 6c9f49dabdea44c19255d71723f3dde4
|
|
- alias: iOS Test Trigger
|
|
id: '1601067953579'
|
|
description: ''
|
|
trigger:
|
|
- platform: event
|
|
event_type: ios.action_fired
|
|
event_data:
|
|
actionName: Test
|
|
condition: []
|
|
action:
|
|
- service: light.toggle
|
|
data: {}
|
|
entity_id: light.lab_fan_light
|
|
mode: single
|
|
- alias: Alexa Media Player TTS/Announce from Lovelace UI
|
|
id: '1615999793826'
|
|
description: ''
|
|
use_blueprint:
|
|
path: NachtaktiverHalbaffe/alexa-tts-announcement-from-lovelace-ui-and-without-nabu-casa-alexa-media-player.yaml
|
|
input:
|
|
message: input_text.alexa_message_text
|
|
target: input_select.alexa_devices
|
|
- alias: Bathroom Fan Toggle
|
|
id: '1616084444705'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 517105d1d709294e0650b8f8b53dc3f8
|
|
type: button_short_press
|
|
subtype: button_1
|
|
discovery_id: 500291793CC7_button_1_SINGLE
|
|
condition: []
|
|
action:
|
|
- type: toggle
|
|
device_id: 4e235ba7a5f7a2b3f420f7242e96d291
|
|
entity_id: switch.bathroom_fan
|
|
domain: switch
|
|
mode: single
|
|
- id: '1616451082602'
|
|
alias: Lab Fan Cycle
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 082f2d49dab1e06234cbc1a01d3787dc
|
|
type: button_long_press
|
|
subtype: button_1
|
|
discovery_id: ECFABC56F484_button_1_HOLD
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: f51e5de9797e5949aa2cacb1b5bbfb8f
|
|
type: button_long_press
|
|
subtype: button_1
|
|
discovery_id: 9C9C1F47AE83_button_1_HOLD
|
|
condition: []
|
|
action:
|
|
- service: fan.set_percentage
|
|
data:
|
|
percentage: "{% if states.fan.lab_fan.state == 'off' %}\n 33\n{% elif states.fan.lab_fan.attributes.percentage\
|
|
\ == 33 %}\n 66\n{% elif states.fan.lab_fan.attributes.percentage == 66 %}\n\
|
|
\ 100\n{% elif states.fan.lab_fan.attributes.percentage == 100 %}\n 0\n\
|
|
{% endif %}\n"
|
|
target:
|
|
entity_id: fan.lab_fan
|
|
mode: single
|
|
- id: '1616454279431'
|
|
alias: Bedroom Fan Cycle
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 7d85bf0a57468f7e8385682e13b24e1d
|
|
type: button_long_press
|
|
subtype: button_1
|
|
discovery_id: CC50E3E7FC32_button_1_HOLD
|
|
condition: []
|
|
action:
|
|
- service: fan.set_percentage
|
|
data:
|
|
percentage: "{% if states.fan.bedroom_fan.state == 'off' %}\n 33\n{% elif states.fan.bedroom_fan.attributes.percentage\
|
|
\ == 33 %}\n 66\n{% elif states.fan.bedroom_fan.attributes.percentage ==\
|
|
\ 66 %}\n 100\n{% elif states.fan.bedroom_fan.attributes.percentage == 100\
|
|
\ %}\n 0\n{% endif %}\n"
|
|
target:
|
|
entity_id: fan.bedroom_fan
|
|
mode: single
|
|
- alias: Bedroom Lamp Toggle
|
|
id: '1616454324529'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 7d85bf0a57468f7e8385682e13b24e1d
|
|
type: button_double_press
|
|
subtype: button_1
|
|
discovery_id: CC50E3E7FC32_button_1_DOUBLE
|
|
condition: []
|
|
action:
|
|
- service: light.toggle
|
|
data:
|
|
brightness_pct: 75
|
|
target:
|
|
device_id: e8b907a90b194fdc84c90957f919749d
|
|
mode: single
|
|
- alias: Kitchen LEDs Toggle
|
|
id: '1616476834323'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 7e8b95744c7040bbbee460145db11d97
|
|
type: button_double_press
|
|
subtype: button_1
|
|
discovery_id: 2CF432192D54_button_1_DOUBLE
|
|
condition: []
|
|
action:
|
|
- service: light.toggle
|
|
data:
|
|
brightness_pct: 100
|
|
target:
|
|
entity_id: light.kitchen_leds
|
|
mode: single
|
|
- id: '1616476916110'
|
|
alias: Living Roon Fan Cycle
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 251ad65bd1a0ec8b40cbd7a8fbf2a51d
|
|
type: button_long_press
|
|
subtype: button_1
|
|
discovery_id: 2CF432192E1D_button_1_HOLD
|
|
condition: []
|
|
action:
|
|
- service: fan.set_percentage
|
|
data:
|
|
percentage: "{% if states.fan.living_room_fan.state == 'off' %}\n 33\n{% elif\
|
|
\ states.fan.living_room_fan.attributes.percentage == 33 %}\n 66\n{% elif\
|
|
\ states.fan.living_room_fan.attributes.percentage == 66 %}\n 100\n{% elif\
|
|
\ states.fan.living_room_fan.attributes.percentage == 100 %}\n 0\n{% endif\
|
|
\ %}\n"
|
|
target:
|
|
entity_id: fan.living_room_fan
|
|
mode: single
|
|
- alias: Fish Tank Light Toggle
|
|
id: '1616477007406'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 6f7d6c6e1774cd155c791b5e55b771ee
|
|
type: button_long_press
|
|
subtype: button_1
|
|
discovery_id: BCDDC25346ED_button_1_HOLD
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: cfda927b6ff502b7d88f779339e28f5d
|
|
type: button_long_press
|
|
subtype: button_1
|
|
discovery_id: 84F3EBE0D784_button_1_HOLD
|
|
condition: []
|
|
action:
|
|
- service: light.toggle
|
|
target:
|
|
entity_id: light.fish_tank_leds
|
|
data:
|
|
color_temp: 269
|
|
brightness_pct: 100
|
|
mode: single
|
|
- alias: Patio Fan Toggle
|
|
id: '1616477064062'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 5351cc93aaae40182c0633e8de1a775e
|
|
type: button_long_press
|
|
subtype: button_1
|
|
discovery_id: 2CF43219288D_button_1_HOLD
|
|
condition: []
|
|
action:
|
|
- type: toggle
|
|
device_id: 0600c5452bc3651f1dbb0e9e6913bf7e
|
|
entity_id: switch.patio_fan
|
|
domain: switch
|
|
mode: single
|
|
- alias: Patio String Lights Toggle
|
|
id: '1620354646102'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 5351cc93aaae40182c0633e8de1a775e
|
|
type: button_double_press
|
|
subtype: button_1
|
|
discovery_id: 2CF43219288D_button_1_DOUBLE
|
|
condition: []
|
|
action:
|
|
- service: light.toggle
|
|
target:
|
|
entity_id: light.patio_string_lights
|
|
mode: single
|
|
- alias: Turn on bathroom fan for 10 mins
|
|
id: '1622521426971'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 517105d1d709294e0650b8f8b53dc3f8
|
|
type: button_double_press
|
|
subtype: button_1
|
|
discovery_id: 500291793CC7_button_1_DOUBLE
|
|
condition: []
|
|
action:
|
|
- type: turn_on
|
|
device_id: 4e235ba7a5f7a2b3f420f7242e96d291
|
|
entity_id: switch.bathroom_fan
|
|
domain: switch
|
|
- delay:
|
|
hours: 0
|
|
minutes: 10
|
|
seconds: 0
|
|
milliseconds: 0
|
|
- type: turn_off
|
|
device_id: 4e235ba7a5f7a2b3f420f7242e96d291
|
|
entity_id: switch.bathroom_fan
|
|
domain: switch
|
|
mode: single
|
|
- alias: Turn Off Bedroom Apple TV
|
|
id: '1625634502512'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
device_id: 6d0692c3ae0d749aa7037ca10f66291d
|
|
domain: media_player
|
|
entity_id: media_player.chriss_room
|
|
type: turned_off
|
|
condition: []
|
|
action:
|
|
- service: script.turn_off_bedroom_apple_tv
|
|
mode: single
|
|
- alias: Wake Bedroom Apple TV
|
|
id: '1625634770413'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
device_id: 6d0692c3ae0d749aa7037ca10f66291d
|
|
domain: media_player
|
|
entity_id: media_player.chriss_room
|
|
type: turned_on
|
|
condition: []
|
|
action:
|
|
- service: script.wake_bedroom_apple_tv
|
|
mode: single
|
|
- alias: Lab Light Toggle
|
|
id: '1628655116939'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: f51e5de9797e5949aa2cacb1b5bbfb8f
|
|
type: button_short_press
|
|
subtype: button_1
|
|
discovery_id: 9C9C1F47AE83_button_1_SINGLE
|
|
condition: []
|
|
action:
|
|
- service: light.toggle
|
|
target:
|
|
entity_id: light.lab_fan_light
|
|
mode: single
|
|
- id: '1628691692223'
|
|
alias: Western Electric Rectifier Controller
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: f51e5de9797e5949aa2cacb1b5bbfb8f
|
|
type: button_short_press
|
|
subtype: button_2
|
|
discovery_id: 9C9C1F47AE83_button_2_SINGLE
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: f51e5de9797e5949aa2cacb1b5bbfb8f
|
|
type: button_long_press
|
|
subtype: button_6
|
|
discovery_id: 9C9C1F47AE83_button_6_HOLD
|
|
enabled: false
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: a2acf2ee7393220e37087061d1b0566c
|
|
type: button_short_press
|
|
subtype: button_1
|
|
discovery_id: 3C71BF316A64_button_1_SINGLE
|
|
condition: []
|
|
action:
|
|
- service: switch.toggle
|
|
target:
|
|
entity_id: switch.western_electric_rectifier
|
|
data: {}
|
|
mode: single
|
|
- alias: 3D Printer Toggle Power
|
|
id: '1632278000510'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: f51e5de9797e5949aa2cacb1b5bbfb8f
|
|
type: button_short_press
|
|
subtype: button_5
|
|
discovery_id: 9C9C1F47AE83_button_5_SINGLE
|
|
condition:
|
|
- condition: state
|
|
entity_id: binary_sensor.octoprint_printing_2
|
|
state: 'off'
|
|
action:
|
|
- service: switch.toggle
|
|
target:
|
|
entity_id: switch.3d_printer
|
|
mode: single
|
|
- alias: 3D Printer Update Status Light
|
|
id: '1634268597502'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: switch.3d_printer
|
|
- platform: state
|
|
entity_id: sensor.octoprint_print_status
|
|
- platform: state
|
|
entity_id: sensor.octoprint_print_progress
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- alias: If the 3D printer turns on or goes idle, turn on the light white
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: sensor.octoprint_print_status
|
|
state: Operational
|
|
sequence:
|
|
- service: automation.turn_on
|
|
target:
|
|
entity_id:
|
|
- automation.3d_printer_update_bed_temperature_light
|
|
- automation.3d_printer_update_tool_temperature_light
|
|
- service: automation.trigger
|
|
target:
|
|
entity_id:
|
|
- automation.3d_printer_update_bed_temperature_light
|
|
- automation.3d_printer_update_tool_temperature_light
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id:
|
|
- light.3d_printer_status
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 202
|
|
- 138
|
|
effect: Solid
|
|
- alias: If the 3D printer turns off, turn off the light
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'off'
|
|
sequence:
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.3d_printer_status
|
|
- service: automation.turn_off
|
|
target:
|
|
entity_id:
|
|
- automation.3d_printer_update_bed_temperature_light
|
|
- automation.3d_printer_update_tool_temperature_light
|
|
- alias: If the 3D printer starts printing, make status light breathe white
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: sensor.octoprint_print_status
|
|
state: Printing
|
|
- condition: numeric_state
|
|
entity_id: sensor.octoprint_print_progress
|
|
below: '98'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.3d_printer_status
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 202
|
|
- 138
|
|
effect: Breathe
|
|
- alias: If the 3D printer is at >97% complete, make status light rainbow
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: sensor.octoprint_print_status
|
|
state: Printing
|
|
- condition: numeric_state
|
|
entity_id: sensor.octoprint_print_progress
|
|
above: '97'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.3d_printer_status
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 255
|
|
- 255
|
|
effect: Rainbow
|
|
default: []
|
|
mode: single
|
|
- alias: 3D Printer Update Tool Temperature Light
|
|
id: '1634272502278'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.octoprint_tool_0_temperature
|
|
- platform: state
|
|
entity_id: sensor.octoprint_tool_0_target
|
|
- platform: state
|
|
entity_id: switch.3d_printer
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- alias: If the tool is cold, make the light blue
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.octoprint_tool_0_temperature
|
|
below: '81'
|
|
- condition: state
|
|
entity_id: sensor.octoprint_tool_0_target
|
|
state: '32.0'
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
rgb_color:
|
|
- 0
|
|
- 255
|
|
- 255
|
|
effect: Solid
|
|
target:
|
|
entity_id: light.3d_printer_tool_temp
|
|
- alias: If the tool is warming up, make the light breathe orange
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.octoprint_tool_0_temperature") | int
|
|
< states("sensor.octoprint_tool_0_target") | int - 1 }}'
|
|
- condition: numeric_state
|
|
entity_id: sensor.octoprint_tool_0_target
|
|
above: '33'
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 142
|
|
- 0
|
|
effect: Breathe
|
|
target:
|
|
entity_id: light.3d_printer_tool_temp
|
|
- alias: If the tool is at target heat, make the light red
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.octoprint_tool_0_target
|
|
above: '33'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.octoprint_tool_0_temperature") | int
|
|
> states("sensor.octoprint_tool_0_target") | int - 2 }}'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.octoprint_tool_0_temperature") | int
|
|
< states("sensor.octoprint_tool_0_target") | int + 2 }}'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.3d_printer_tool_temp
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 0
|
|
- 0
|
|
effect: Solid
|
|
- alias: If the tool is cooling down but not turning off, make the light breathe
|
|
yellowish
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.octoprint_tool_0_temperature") | int
|
|
> states("sensor.octoprint_tool_0_target") | int + 1 }}'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.3d_printer_tool_temp
|
|
data:
|
|
rgb_color:
|
|
- 254
|
|
- 254
|
|
- 0
|
|
effect: Breathe
|
|
- alias: If the 3D printer turns off, turn off the light
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'off'
|
|
sequence:
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.3d_printer_tool_temp
|
|
default: []
|
|
mode: single
|
|
- alias: 3D Printer Update Bed Temperature Light
|
|
id: '1634273868202'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.octoprint_bed_target
|
|
- platform: state
|
|
entity_id: sensor.octoprint_bed_temperature
|
|
- platform: state
|
|
entity_id: switch.3d_printer
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- alias: If the bed is cold, make the light blue
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.octoprint_bed_temperature
|
|
below: '116'
|
|
- condition: state
|
|
entity_id: sensor.octoprint_bed_target
|
|
state: '32.0'
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
rgb_color:
|
|
- 0
|
|
- 255
|
|
- 255
|
|
effect: Solid
|
|
target:
|
|
entity_id: light.3d_printer_bed_temp
|
|
- alias: If the bed is warming up, make the light breathe orange
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.octoprint_bed_target
|
|
above: '33'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.octoprint_bed_temperature") | int < states("sensor.octoprint_bed_target")
|
|
| int - 1 }}'
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 142
|
|
- 0
|
|
effect: Breathe
|
|
target:
|
|
entity_id: light.3d_printer_bed_temp
|
|
- alias: If the bed is at target heat, make the light red
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.octoprint_bed_target
|
|
above: '33'
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states("sensor.octoprint_bed_temperature") | int >
|
|
states("sensor.octoprint_bed_target") | int - 2 }}'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.octoprint_bed_temperature") | int <
|
|
states("sensor.octoprint_bed_target") | int + 2 }}'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.3d_printer_bed_temp
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 0
|
|
- 0
|
|
effect: Solid
|
|
- alias: If the bed is cooling down but not turning off, make the light breathe
|
|
yellowish
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'on'
|
|
- condition: template
|
|
value_template: '{{ states("sensor.octoprint_bed_temperature") | int > states("sensor.octoprint_bed_target")
|
|
| int + 1 }}'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.3d_printer_bed_temp
|
|
data:
|
|
rgb_color:
|
|
- 254
|
|
- 254
|
|
- 0
|
|
effect: Breathe
|
|
- alias: If the 3D printer turns off, turn off the light
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.3d_printer
|
|
state: 'off'
|
|
sequence:
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.3d_printer_bed_temp
|
|
default: []
|
|
mode: single
|
|
- alias: 3D Printer Cancel Print
|
|
id: '1634606712756'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: f51e5de9797e5949aa2cacb1b5bbfb8f
|
|
type: button_long_press
|
|
subtype: button_5
|
|
discovery_id: 9C9C1F47AE83_button_5_HOLD
|
|
condition: []
|
|
action:
|
|
- service: switch.turn_on
|
|
target:
|
|
entity_id: switch.octoprint_cancel_print
|
|
mode: single
|
|
- alias: Living Room Light Toggle
|
|
id: '1634611734007'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: e4ac095d46cedd58ceb8bb01bbcf6440
|
|
type: button_double_press
|
|
subtype: button_2
|
|
discovery_id: BCDDC2594486_button_2_DOUBLE
|
|
condition: []
|
|
action:
|
|
- service: light.toggle
|
|
target:
|
|
entity_id: light.living_room_fan_light
|
|
mode: single
|
|
- id: '1637599699240'
|
|
alias: Lab TV Toggle
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: f51e5de9797e5949aa2cacb1b5bbfb8f
|
|
type: button_double_press
|
|
subtype: button_1
|
|
discovery_id: 9C9C1F47AE83_button_1_DOUBLE
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 082f2d49dab1e06234cbc1a01d3787dc
|
|
type: button_double_press
|
|
subtype: button_1
|
|
discovery_id: ECFABC56F484_button_1_DOUBLE
|
|
condition: []
|
|
action:
|
|
- service: media_player.toggle
|
|
target:
|
|
entity_id: media_player.lab_tv
|
|
data: {}
|
|
mode: single
|
|
- alias: Fish Tank Filter Toggle
|
|
id: '1638942926537'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: cfda927b6ff502b7d88f779339e28f5d
|
|
type: button_triple_press
|
|
subtype: button_1
|
|
discovery_id: 84F3EBE0D784_button_1_TRIPLE
|
|
condition: []
|
|
action:
|
|
- service: switch.toggle
|
|
target:
|
|
entity_id: switch.fish_tank_filter
|
|
mode: single
|
|
- alias: Thermostat Preset Select
|
|
id: '1642469538699'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.thermostat_preset
|
|
- platform: state
|
|
entity_id: input_boolean.windows_open
|
|
condition: []
|
|
action:
|
|
- service: script.thermostat_preset_handler
|
|
mode: single
|
|
- alias: Thermostat Automated Select
|
|
id: '1642470565005'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: person.steven
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: person.steven
|
|
state: home
|
|
- condition: state
|
|
entity_id: input_select.thermostat_preset
|
|
state: Daytime - Chris
|
|
sequence:
|
|
- service: input_select.select_option
|
|
target:
|
|
entity_id: input_select.thermostat_preset
|
|
data:
|
|
option: Daytime - Steven
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: person.chris
|
|
state: home
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: person.steven
|
|
state: home
|
|
- condition: state
|
|
entity_id: input_select.thermostat_preset
|
|
state: Daytime - Steven
|
|
sequence:
|
|
- service: input_select.select_option
|
|
target:
|
|
entity_id: input_select.thermostat_preset
|
|
data:
|
|
option: Daytime - Chris
|
|
default: []
|
|
mode: single
|
|
- alias: Mail Light Update
|
|
id: '1643264447175'
|
|
description: ''
|
|
trigger:
|
|
- platform: time
|
|
at: '12:00:00'
|
|
- platform: state
|
|
entity_id: binary_sensor.mail_button
|
|
to: 'on'
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.mail_button
|
|
state: 'on'
|
|
sequence:
|
|
- service: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.new_mail
|
|
data: {}
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.mail_light
|
|
data: {}
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.mail_usps_packages
|
|
above: '0'
|
|
- condition: numeric_state
|
|
entity_id: sensor.mail_usps_mail
|
|
above: '0'
|
|
sequence:
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.new_mail
|
|
data: {}
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.mail_light
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 200
|
|
- 151
|
|
default: []
|
|
mode: single
|
|
- alias: Trash Light Update
|
|
id: '1643341212029'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.trash_state
|
|
- platform: numeric_state
|
|
entity_id: sensor.garbage_collection
|
|
below: '2'
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.trash_state
|
|
state: Brought In
|
|
sequence:
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.trash_light
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.trash_state
|
|
state: Bring Out
|
|
- condition: numeric_state
|
|
entity_id: sensor.garbage_collection
|
|
below: '1'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.trash_light
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 0
|
|
- 0
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.trash_state
|
|
state: Bring Out
|
|
- condition: numeric_state
|
|
entity_id: sensor.garbage_collection
|
|
below: '2'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.trash_light
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 208
|
|
- 159
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.trash_state
|
|
state: Bring Back In
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.trash_light
|
|
data:
|
|
rgb_color:
|
|
- 0
|
|
- 255
|
|
- 255
|
|
default: []
|
|
mode: single
|
|
- alias: Trash State Handler
|
|
id: '1643347287312'
|
|
description: ''
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.garbage_collection
|
|
below: '2'
|
|
- platform: state
|
|
entity_id: binary_sensor.trash_button
|
|
to: 'on'
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.trash_button
|
|
state: 'on'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.trash_state
|
|
state: Bring Out
|
|
sequence:
|
|
- service: garbage_collection.collect_garbage
|
|
target:
|
|
entity_id: sensor.garbage_collection
|
|
default: []
|
|
- service: input_select.select_next
|
|
target:
|
|
entity_id: input_select.trash_state
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.garbage_collection
|
|
below: '2'
|
|
sequence:
|
|
- service: input_select.select_option
|
|
target:
|
|
entity_id: input_select.trash_state
|
|
data:
|
|
option: Bring Out
|
|
default: []
|
|
mode: single
|
|
- alias: Recycle Light Update
|
|
id: '1643347730280'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_select.recycle_state
|
|
- platform: numeric_state
|
|
entity_id: sensor.recycling
|
|
below: '2'
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.recycle_state
|
|
state: Brought In
|
|
sequence:
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.recycle_light
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.recycle_state
|
|
state: Bring Out
|
|
- condition: numeric_state
|
|
entity_id: sensor.recycling
|
|
below: '1'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.recycle_light
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 0
|
|
- 0
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.recycle_state
|
|
state: Bring Out
|
|
- condition: numeric_state
|
|
entity_id: sensor.recycling
|
|
below: '2'
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.recycle_light
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 208
|
|
- 159
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.recycle_state
|
|
state: Bring Back In
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.recycle_light
|
|
data:
|
|
rgb_color:
|
|
- 0
|
|
- 255
|
|
- 255
|
|
default: []
|
|
mode: single
|
|
- alias: Recycle State Handler
|
|
id: '1643348123383'
|
|
description: ''
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.recycling
|
|
below: '2'
|
|
- platform: state
|
|
entity_id: binary_sensor.recycle_button
|
|
to: 'on'
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.recycle_button
|
|
state: 'on'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_select.recycle_state
|
|
state: Bring Out
|
|
sequence:
|
|
- service: garbage_collection.collect_garbage
|
|
target:
|
|
entity_id: sensor.recycling
|
|
default: []
|
|
- service: input_select.select_next
|
|
target:
|
|
entity_id: input_select.recycle_state
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.recycling
|
|
below: '2'
|
|
sequence:
|
|
- service: input_select.select_option
|
|
target:
|
|
entity_id: input_select.recycle_state
|
|
data:
|
|
option: Bring Out
|
|
default: []
|
|
mode: single
|
|
- alias: Turn On Lab TV with WakeOnLan
|
|
id: '1644253838913'
|
|
description: ''
|
|
trigger:
|
|
- platform: webostv.turn_on
|
|
entity_id: media_player.lab_tv
|
|
condition: []
|
|
action:
|
|
- service: wake_on_lan.send_magic_packet
|
|
data:
|
|
mac: 20:17:42:D9:6D:4E
|
|
mode: single
|
|
- alias: Turn On Living Room TV with WakeOnLan
|
|
id: '1644253912444'
|
|
description: ''
|
|
trigger:
|
|
- platform: webostv.turn_on
|
|
entity_id: media_player.living_room_tv
|
|
condition: []
|
|
action:
|
|
- service: wake_on_lan.send_magic_packet
|
|
data:
|
|
mac: 74:40:BE:88:4F:80
|
|
mode: single
|
|
- id: '1650324443680'
|
|
alias: Doorbell
|
|
description: ''
|
|
trigger:
|
|
- type: occupied
|
|
platform: device
|
|
device_id: 9ac2e56d16554b6e839f0feab4c5a479
|
|
entity_id: binary_sensor.front_door_ring_ding
|
|
domain: binary_sensor
|
|
condition: []
|
|
action:
|
|
- service: script.status_annc
|
|
data:
|
|
who: everywhere
|
|
call_doorbell_chime: 1
|
|
call_snark_doorbell: 1
|
|
mode: single
|
|
- id: '1650326437602'
|
|
alias: Doorbell Motion Detected
|
|
description: ''
|
|
trigger:
|
|
- type: motion
|
|
platform: device
|
|
device_id: 9ac2e56d16554b6e839f0feab4c5a479
|
|
entity_id: binary_sensor.front_door_ring_motion
|
|
domain: binary_sensor
|
|
id: motion
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.do_not_disturb
|
|
state: 'off'
|
|
action:
|
|
- condition: state
|
|
entity_id: binary_sensor.front_door_recent_activity
|
|
state: 'off'
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- binary_sensor.front_door_recent_activity
|
|
to: 'on'
|
|
from: 'off'
|
|
id: door_activity
|
|
timeout: 00:00:05
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ wait.trigger.id is defined }}'
|
|
sequence:
|
|
- stop: '{{ wait.trigger.id }}'
|
|
default:
|
|
- service: script.status_annc
|
|
data:
|
|
who: everywhere
|
|
call_snark_door_motion: 1
|
|
mode: single
|
|
- id: '1651617197832'
|
|
alias: Lab Bathroom Fan Controller
|
|
description: ''
|
|
trigger:
|
|
- type: humidity
|
|
platform: device
|
|
device_id: 92463da5daafb2dda4f417ae7f643aa9
|
|
entity_id: sensor.lab_bathroom_humidity
|
|
domain: sensor
|
|
above: 80
|
|
id: high
|
|
- type: humidity
|
|
platform: device
|
|
device_id: 92463da5daafb2dda4f417ae7f643aa9
|
|
entity_id: sensor.lab_bathroom_humidity
|
|
domain: sensor
|
|
id: low
|
|
below: 60
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: high
|
|
sequence:
|
|
- service: switch.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: switch.lab_bathroom_fan
|
|
- conditions:
|
|
- condition: trigger
|
|
id: low
|
|
sequence:
|
|
- service: switch.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id: switch.lab_bathroom_fan
|
|
default: []
|
|
mode: single
|
|
- id: '1651635402480'
|
|
alias: Friend Arrival
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: person.kaitlyn
|
|
to: home
|
|
- platform: state
|
|
entity_id: person.ronald
|
|
to: home
|
|
- platform: state
|
|
entity_id: person.rheena
|
|
to: home
|
|
- platform: state
|
|
entity_id: person.danielle
|
|
to: home
|
|
- platform: state
|
|
entity_id: person.brian
|
|
to: home
|
|
- platform: state
|
|
entity_id: person.rathnam
|
|
to: home
|
|
- platform: state
|
|
entity_id: person.nico
|
|
to: home
|
|
- platform: state
|
|
entity_id:
|
|
- person.mari
|
|
to: home
|
|
condition: []
|
|
action:
|
|
- service: script.text_notify_everyone
|
|
data:
|
|
title: Guest Arrival
|
|
message: '{{ trigger.to_state.attributes.friendly_name }} has arrived'
|
|
mode: parallel
|
|
max: 10
|
|
- id: '1653577962938'
|
|
alias: Western Electric Cabinet Lights Controller
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: f51e5de9797e5949aa2cacb1b5bbfb8f
|
|
type: button_double_press
|
|
subtype: button_2
|
|
discovery_id: 9C9C1F47AE83_button_2_DOUBLE
|
|
id: button
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: a2acf2ee7393220e37087061d1b0566c
|
|
type: button_double_press
|
|
subtype: button_1
|
|
discovery_id: 3C71BF316A64_button_1_DOUBLE
|
|
id: button
|
|
- platform: state
|
|
entity_id:
|
|
- switch.western_electric_rectifier
|
|
from: 'off'
|
|
to: 'on'
|
|
id: rectifier_on
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: button
|
|
sequence:
|
|
- service: light.toggle
|
|
data:
|
|
color_temp: 380
|
|
effect: Wake up
|
|
brightness_pct: 100
|
|
target:
|
|
entity_id: light.western_electric_cabinet_lights
|
|
- conditions:
|
|
- condition: trigger
|
|
id: rectifier_on
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
brightness_pct: 100
|
|
color_temp: 380
|
|
effect: Wake up
|
|
target:
|
|
entity_id: light.western_electric_cabinet_lights
|
|
default: []
|
|
mode: single
|
|
- id: '1656455659129'
|
|
alias: Living Room Magic Cube
|
|
description: ''
|
|
use_blueprint:
|
|
path: rvaidya/aqara_magic_cube.yaml
|
|
input:
|
|
remote: 3146f49fef4d10d8cf2a4be6609f44f3
|
|
active_face: input_number.living_room_magic_cube_side
|
|
flip_90: true
|
|
cube_flip_90:
|
|
- service: light.toggle
|
|
data: {}
|
|
target:
|
|
entity_id: light.living_room_fan_light
|
|
flip_180: true
|
|
cube_flip_180: []
|
|
slide_any_side: true
|
|
cube_slide_any:
|
|
- service: media_player.media_play_pause
|
|
data: {}
|
|
target:
|
|
entity_id: media_player.living_room_apple_tv
|
|
knock_any_side: true
|
|
cube_knock_any:
|
|
- service: media_player.toggle
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- media_player.living_room_tv
|
|
rotate_right:
|
|
- service: media_player.volume_up
|
|
data: {}
|
|
target:
|
|
entity_id: media_player.living_room_pioneer
|
|
rotate_left:
|
|
- service: media_player.volume_down
|
|
data: {}
|
|
target:
|
|
entity_id: media_player.living_room_pioneer
|
|
rotate_any_side: true
|
|
cube_shake:
|
|
- service: script.downstairs_chill
|
|
data: {}
|
|
- id: '1657676381882'
|
|
alias: ZHA - Aqara Wireless Mini Switch
|
|
description: ''
|
|
use_blueprint:
|
|
path: SeanM/zha-aqara-wireless-mini-switch.yaml
|
|
input:
|
|
aqara_mini_switch: dbac350dab9bcea6d7548327a20cefee
|
|
button_single_press:
|
|
- service: script.text_notify_chris
|
|
data:
|
|
message: Single
|
|
button_double_press:
|
|
- service: script.text_notify_chris
|
|
data:
|
|
message: Double
|
|
button_long_press:
|
|
- service: script.text_notify_chris
|
|
data:
|
|
message: Long
|
|
- id: '1672953123172'
|
|
alias: NFC Tag Testing
|
|
description: ''
|
|
trigger:
|
|
- platform: event
|
|
event_type: test_tag_scan
|
|
event_data:
|
|
tag_type: chore
|
|
condition: []
|
|
action:
|
|
- service: notify.chris
|
|
data:
|
|
message: 'Scanned by {{ trigger.event.data.scanned_by }} | Tag: {{ trigger.event.data.tag_name
|
|
}}'
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.event.data.tag_name == "cleaned_master_bath" }}'
|
|
sequence: []
|
|
mode: single
|
|
- id: '1674004743050'
|
|
alias: Living Room TV Hyperion
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
device_id: 2cad1a38df4cb7030c6243f70d8af22b
|
|
domain: media_player
|
|
entity_id: media_player.living_room_tv
|
|
type: turned_on
|
|
id: 'on'
|
|
- platform: device
|
|
device_id: 2cad1a38df4cb7030c6243f70d8af22b
|
|
domain: media_player
|
|
entity_id: media_player.living_room_tv
|
|
type: turned_off
|
|
id: 'off'
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: 'on'
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
effect: USB Capture
|
|
brightness_pct: 100
|
|
target:
|
|
entity_id: light.living_room_tv_hyperion
|
|
- conditions:
|
|
- condition: trigger
|
|
id: 'off'
|
|
sequence:
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id: light.living_room_tv_hyperion
|
|
mode: single
|
|
- id: '1674014681253'
|
|
alias: Water Leak Handler
|
|
description: ''
|
|
trigger:
|
|
- type: moist
|
|
platform: device
|
|
device_id: cde28a301e62e5d305599aed2f12ce67
|
|
entity_id: binary_sensor.ac_water_leak_sensor
|
|
domain: binary_sensor
|
|
- type: moist
|
|
platform: device
|
|
device_id: bcae5b2003bfd3ce1b0080e08bcfe679
|
|
entity_id: binary_sensor.garage_water_leak_sensor
|
|
domain: binary_sensor
|
|
- type: moist
|
|
platform: device
|
|
device_id: cd2a7a3a6238358363f53e4a88984c4d
|
|
entity_id: binary_sensor.lumi_lumi_sensor_wleak_aq1_iaszone_2
|
|
domain: binary_sensor
|
|
condition: []
|
|
action:
|
|
- service: script.text_urgent_alert
|
|
data:
|
|
who: chris
|
|
title: Water Leak!!
|
|
message: '{% set name = trigger.to_state.name %} I have detected a water leak
|
|
{{- " in the A/C closet. " if "AC" in name -}} {{- " in the Garage. " if "Garage"
|
|
in name -}} {{- " under the kitchen sink. " if "Kitchen Sink" in name -}}
|
|
|
|
'
|
|
- service: script.alexa_voice
|
|
data:
|
|
who: presence
|
|
message: '{% set name = trigger.to_state.name %} I have detected a water leak
|
|
{{- " in the A/C closet. " if "AC" in name -}} {{- " in the Garage. " if "Garage"
|
|
in name -}} {{- " under the kitchen sink. " if "Kitchen Sink" in name -}}
|
|
|
|
'
|
|
mode: single
|
|
- id: alexa_snack_for_blaze
|
|
alias: Alexa Snack For Blaze
|
|
initial_state: true
|
|
trigger:
|
|
platform: state
|
|
entity_id:
|
|
- input_button.alexa_snack_for_blaze
|
|
action:
|
|
- service: script.snack_for_blaze
|
|
- alias: Clock Chime
|
|
id: clock_chime
|
|
mode: restart
|
|
trigger:
|
|
- platform: time_pattern
|
|
minutes: 0
|
|
id: '0'
|
|
- platform: time_pattern
|
|
minutes: 15
|
|
id: '15'
|
|
- platform: time_pattern
|
|
minutes: 30
|
|
id: '30'
|
|
- platform: time_pattern
|
|
minutes: 45
|
|
id: '45'
|
|
condition:
|
|
- condition: time
|
|
after: input_datetime.clock_chime_on_time
|
|
before: input_datetime.clock_chime_off_time
|
|
- condition: state
|
|
entity_id: input_boolean.audible_notifications
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.clock_chime
|
|
state: 'on'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: group.family
|
|
state: home
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'on'
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: trigger
|
|
id: '15'
|
|
- condition: trigger
|
|
id: '45'
|
|
sequence:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.clock_chime_quarter_toll
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_select.clock_chime_sound
|
|
state: Cuckoo Clock
|
|
- stop: Quarter Toll Disabled
|
|
- conditions:
|
|
- condition: trigger
|
|
id: '30'
|
|
sequence:
|
|
- condition: state
|
|
entity_id: input_boolean.clock_chime_half_toll
|
|
state: 'off'
|
|
- stop: Half Toll Disabled
|
|
default: []
|
|
- wait_template: '{{ not is_state("media_player.living_room_echo", "playing") }}'
|
|
continue_on_timeout: false
|
|
timeout: 00:02:00
|
|
- service: script.alexa_voice
|
|
data:
|
|
who: living_room
|
|
message: "{% if states(\"input_select.clock_chime_sound\") == \"Cuckoo Clock\"\
|
|
\ %}\n {% if trigger.id == \"30\" %}\n <audio src='https://heder-homeassistant.s3.amazonaws.com/cuckoo-clock/cuckoo-clock-01.mp3'/>\n\
|
|
\ {% else %}\n <audio src='https://heder-homeassistant.s3.amazonaws.com/cuckoo-clock/cuckoo-clock-{{now().strftime(\"\
|
|
%I\")}}.mp3'/>\n {% endif %}\n{% elif states(\"input_select.clock_chime_sound\"\
|
|
) == \"Grandfather Clock\" %}\n {% if trigger.id == \"15\" %}\n <audio\
|
|
\ src='https://heder-homeassistant.s3.amazonaws.com/gf-clock/toll-1quarter.mp3'/>\n\
|
|
\ {% elif trigger.id == \"30\" %}\n <audio src='https://heder-homeassistant.s3.amazonaws.com/gf-clock/toll-2quarter.mp3'/>\n\
|
|
\ {% elif trigger.id == \"45\" %}\n <audio src='https://heder-homeassistant.s3.amazonaws.com/gf-clock/toll-3quarter.mp3'/>\n\
|
|
\ {% else %}\n <audio src='https://heder-homeassistant.s3.amazonaws.com/gf-clock/{{now().strftime(\"\
|
|
%I\")}}-hour.mp3'/>\n {% endif %}\n{% endif %}\n"
|
|
- id: set_wakeup_time
|
|
alias: Set Wakeup Time
|
|
trigger:
|
|
- platform: time
|
|
at: 01:00:00
|
|
action:
|
|
- choose:
|
|
- alias: Home Day
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.workday
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.holiday
|
|
state: 'off'
|
|
sequence:
|
|
- service: input_datetime.set_datetime
|
|
data:
|
|
time: '{{ states(''input_datetime.workday_wakeup_time'') }}'
|
|
target:
|
|
entity_id: input_datetime.wakeup
|
|
- service: input_boolean.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: input_boolean.wakeup_alarm
|
|
default:
|
|
- service: input_datetime.set_datetime
|
|
data:
|
|
time: 09:00:00
|
|
target:
|
|
entity_id: input_datetime.wakeup
|
|
- service: input_boolean.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id: input_boolean.wakeup_alarm
|
|
- id: morning_routine
|
|
alias: Morning Routine
|
|
trigger:
|
|
- at: input_datetime.wakeup
|
|
platform: time
|
|
action:
|
|
- service: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.do_not_disturb
|
|
data: {}
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.audible_notifications
|
|
data: {}
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.windows_open
|
|
state: 'off'
|
|
sequence:
|
|
- service: fan.turn_off
|
|
target:
|
|
entity_id: fan.bedroom_fan
|
|
data: {}
|
|
default: []
|
|
- service: input_select.select_option
|
|
target:
|
|
entity_id: input_select.thermostat_preset
|
|
data:
|
|
option: "{% if is_state(\"person.steven\", \"home\") %}\n Daytime - Steven\n\
|
|
{% else %}\n Daytime - Chris\n{% endif %}\n"
|
|
- service: switch.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- switch.chris_s_echo_show_do_not_disturb_switch
|
|
- switch.lab_echo_dot_do_not_disturb_switch
|
|
- switch.living_room_echo_do_not_disturb_switch
|
|
- switch.kitchen_echo_dot_do_not_disturb_switch
|
|
- switch.chris_s_fire_do_not_disturb_switch
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.wakeup_alarm
|
|
state: 'on'
|
|
sequence:
|
|
- service: script.morning_wakeup_report
|
|
data: {}
|
|
default: []
|
|
mode: single
|
|
- alias: Front Lights On At Dusk
|
|
id: '1616533227405'
|
|
description: Trigger when it gets dark
|
|
trigger:
|
|
- type: illuminance
|
|
platform: device
|
|
device_id: 2db8b8a959026a5b8339a61834dd3197
|
|
entity_id: sensor.patio_ambient_light
|
|
domain: sensor
|
|
below: 20
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.front_lights_on_for_the_night
|
|
state: 'off'
|
|
action:
|
|
- service: notify.chris
|
|
data:
|
|
message: Lights are turning on
|
|
- service: script.front_lights_turn_on
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.front_lights_on_for_the_night
|
|
- condition: state
|
|
entity_id: input_boolean.columns_button_enabled
|
|
state: 'on'
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.front_columns_button_led
|
|
mode: single
|
|
- alias: Front lights off at night
|
|
id: '1599449030138'
|
|
description: ''
|
|
trigger:
|
|
- at: input_datetime.front_lights_off
|
|
platform: time
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.guests_over
|
|
state: 'off'
|
|
action:
|
|
- service: scene.turn_on
|
|
target:
|
|
entity_id: scene.front_lights_all_off
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id:
|
|
- input_boolean.front_lights_off_for_the_night
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.front_columns_button_led
|
|
- light.front_columns_black_lights
|
|
- light.columns_garland
|
|
- light.village
|
|
- light.fiber_optic_decoration
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.front_columns_button_led
|
|
data:
|
|
transition: 2
|
|
- service: switch.turn_off
|
|
target:
|
|
entity_id:
|
|
- switch.path_light_power_supply
|
|
- service: script.fpp_stop_now
|
|
mode: single
|
|
- alias: Front Lights Reset at noon
|
|
id: '1617760688958'
|
|
description: ''
|
|
trigger:
|
|
- platform: time
|
|
at: '12:00:00'
|
|
condition: []
|
|
action:
|
|
- service: input_boolean.turn_off
|
|
target:
|
|
entity_id:
|
|
- input_boolean.front_lights_on_for_the_night
|
|
- input_boolean.front_lights_off_for_the_night
|
|
mode: single
|
|
- alias: Toggle Flood Lights
|
|
id: '1617761350052'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: c05382e95d514cffc7ea5ddc936b93b9
|
|
type: button_double_press
|
|
subtype: button_1
|
|
discovery_id: CC50E3E75A8F_button_1_DOUBLE
|
|
condition: []
|
|
action:
|
|
- service: light.toggle
|
|
data:
|
|
brightness_pct: 100
|
|
rgb_color:
|
|
- 0
|
|
- 255
|
|
- 255
|
|
transition: 5
|
|
target:
|
|
entity_id:
|
|
- light.left_flood
|
|
- light.right_flood
|
|
mode: single
|
|
- alias: FPP Volume Set
|
|
id: '1632625438084'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_number.fpp_volume
|
|
condition: []
|
|
action:
|
|
- service: script.fpp_set_volume
|
|
data:
|
|
volume: '{{ states("input_number.fpp_volume") }}'
|
|
mode: single
|
|
- alias: FPP Status Sync
|
|
id: '1633371419662'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.fpp_status
|
|
condition: []
|
|
action:
|
|
- choose:
|
|
- alias: playing standby
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sensor.fpp_status
|
|
state: playing
|
|
- condition: template
|
|
value_template: '{{ "standby" in (states("sensor.fpp_current_playlist") |
|
|
lower) }}'
|
|
sequence:
|
|
- service: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.front_yard_motion_lights
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.porch_light
|
|
- alias: playing normal
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sensor.fpp_status
|
|
state: playing
|
|
sequence:
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.front_columns_button_led
|
|
data:
|
|
transition: 2
|
|
- service: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.front_yard_motion_lights
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.porch_light
|
|
- alias: idle
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sensor.fpp_status
|
|
state: idle
|
|
sequence:
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.front_yard_motion_lights
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.front_lights_on_for_the_night
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.front_lights_off_for_the_night
|
|
state: 'off'
|
|
then:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.front_columns_button_led
|
|
data:
|
|
transition: 2
|
|
- service: script.front_lights_turn_on
|
|
default: []
|
|
mode: single
|
|
- alias: Front Columns Button Press
|
|
id: '1633124084367'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 8e07dd38dc9354108f762038aec68c27
|
|
type: button_short_press
|
|
subtype: button_1
|
|
discovery_id: BCFF4D1916A5_button_1_SINGLE
|
|
condition:
|
|
- condition: state
|
|
state: 'on'
|
|
entity_id: light.front_columns_button_led
|
|
action:
|
|
- service: script.text_notify_chris
|
|
data:
|
|
title: Front Lights
|
|
message: Someone pressed the button
|
|
- alias: Set Volume
|
|
choose:
|
|
- conditions:
|
|
- condition: time
|
|
before: '20:30:00'
|
|
sequence:
|
|
- service: script.fpp_set_volume
|
|
data:
|
|
volume: 70
|
|
- conditions:
|
|
- condition: time
|
|
after: '20:30:00'
|
|
- condition: time
|
|
before: '21:30:00'
|
|
sequence:
|
|
- service: script.fpp_set_volume
|
|
data:
|
|
volume: 50
|
|
- conditions:
|
|
- condition: time
|
|
after: '21:30:00'
|
|
sequence:
|
|
- service: script.fpp_set_volume
|
|
data:
|
|
volume: 38
|
|
default: []
|
|
- service: script.fpp_start_playlist_at_random_song
|
|
mode: single
|
|
- alias: Front Columns Force Stop
|
|
id: '1633372254150'
|
|
description: ''
|
|
trigger:
|
|
- platform: device
|
|
domain: tasmota
|
|
device_id: 8e07dd38dc9354108f762038aec68c27
|
|
type: button_quadruple_press
|
|
subtype: button_1
|
|
discovery_id: BCFF4D1916A5_button_1_QUAD
|
|
condition:
|
|
- condition: state
|
|
entity_id: sensor.fpp_status
|
|
state: playing
|
|
action:
|
|
- service: script.fpp_stop_now
|
|
mode: single
|
|
- alias: Irrigation Timer Start
|
|
id: IrrigationTimerStart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: switch.irrigation
|
|
to: 'on'
|
|
action:
|
|
- service: timer.start
|
|
entity_id: timer.irrigation
|
|
- alias: Irrigation Timer Stop
|
|
id: IrrigationTimerStop
|
|
trigger:
|
|
- platform: event
|
|
event_type: timer.finished
|
|
event_data:
|
|
entity_id: timer.irrigation
|
|
action:
|
|
- service: notify.all_devices
|
|
data:
|
|
message: Irrigation complete
|
|
- service: switch.turn_off
|
|
entity_id: switch.irrigation
|
|
- id: bedroom_smart_light_handler
|
|
alias: Bedroom Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_bedroom_motion
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.do_not_disturb
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.motion_lights_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.bedroom_motion_lights
|
|
state: 'on'
|
|
action:
|
|
- choose:
|
|
- alias: Morning
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.morning
|
|
state: 'on'
|
|
- below: 200
|
|
condition: numeric_state
|
|
entity_id: sensor.bedroom_ambient_light
|
|
sequence:
|
|
- service: light.turn_on
|
|
target:
|
|
entity_id: light.bathroom_light
|
|
data:
|
|
brightness_pct: 35
|
|
- alias: Daytime
|
|
conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.noon
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.afternoon
|
|
state: 'on'
|
|
- below: 200
|
|
condition: numeric_state
|
|
entity_id: sensor.bedroom_ambient_light
|
|
sequence:
|
|
- service: script.master_bedroom_lights_w_level
|
|
data:
|
|
level: 170
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_bedroom_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states("input_number.motion_lights_delay")|int }}'
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- light.hue_color_lamp_1
|
|
- light.bedroom_fan_lights
|
|
- alias: Evening
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.evening
|
|
state: 'on'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- below: 200
|
|
condition: numeric_state
|
|
entity_id: sensor.bedroom_ambient_light
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
brightness_pct: 75
|
|
target:
|
|
entity_id: light.hue_color_lamp_1
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_bedroom_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states("input_number.motion_lights_delay")|int }}'
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- light.hue_color_lamp_1
|
|
- light.bedroom_fan_lights
|
|
default: []
|
|
- alias: Night
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.night
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.do_not_disturb
|
|
state: 'off'
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
brightness_pct: 75
|
|
target:
|
|
entity_id: light.hue_color_lamp_1
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_bedroom_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states("input_number.motion_lights_delay")|int }}'
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- light.hue_color_lamp_1
|
|
- light.bedroom_fan_lights
|
|
default: []
|
|
mode: restart
|
|
- id: lab_smart_light_handler
|
|
alias: Lab Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_lab_motion
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.do_not_disturb
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.motion_lights_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.lab_motion_lights
|
|
state: 'on'
|
|
- below: 100
|
|
condition: numeric_state
|
|
entity_id: sensor.lab_ambient_light
|
|
action:
|
|
- service: light.turn_on
|
|
entity_id: light.lab_fan_light
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_bedroom_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states(''input_number.motion_lights_delay'')|int }}'
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- light.lab_fan_light
|
|
mode: restart
|
|
- id: living_room_smart_light_handler
|
|
alias: Living Room Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_living_room_motion
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.do_not_disturb
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.motion_lights_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.living_room_motion_lights
|
|
state: 'on'
|
|
action:
|
|
- choose:
|
|
- alias: Daytime
|
|
conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.morning
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.noon
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.afternoon
|
|
state: 'on'
|
|
sequence:
|
|
- service: scene.turn_on
|
|
data:
|
|
entity_id: scene.living_room_lights_on
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_living_room_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states("input_number.motion_lights_delay")|int }}'
|
|
- service: scene.turn_on
|
|
data:
|
|
entity_id: scene.living_room_lights_off
|
|
- alias: Evening
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.evening
|
|
state: 'on'
|
|
sequence:
|
|
- service: scene.turn_on
|
|
data:
|
|
entity_id: scene.living_room_ambient
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_living_room_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states("input_number.motion_lights_delay")|int }}'
|
|
- service: scene.turn_on
|
|
data:
|
|
entity_id: scene.living_room_lights_off
|
|
- alias: Night
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.night
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.do_not_disturb
|
|
state: 'off'
|
|
sequence:
|
|
- service: scene.turn_on
|
|
data:
|
|
entity_id: scene.living_room_ambient
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_living_room_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states("input_number.motion_lights_delay")|int }}'
|
|
- service: scene.turn_on
|
|
data:
|
|
entity_id: scene.living_room_lights_off
|
|
default: []
|
|
mode: restart
|
|
- id: dining_room_smart_light_handler
|
|
alias: Dining Room Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_dining_room_motion
|
|
from: 'off'
|
|
to: 'on'
|
|
for:
|
|
seconds: 1
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.do_not_disturb
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.motion_lights_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.dining_room_motion_lights
|
|
state: 'on'
|
|
action:
|
|
- service: light.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: light.dining_room_light
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_dining_room_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states(''input_number.motion_lights_delay'')|int }}'
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id: light.dining_room_light
|
|
mode: restart
|
|
- id: kitchen_smart_light_handler
|
|
alias: Kitchen Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_kitchen_motion
|
|
id: motion_active
|
|
from: 'off'
|
|
to: 'on'
|
|
for:
|
|
seconds: 1
|
|
- platform: device
|
|
type: turned_on
|
|
device_id: 7e8b95744c7040bbbee460145db11d97
|
|
entity_id: light.kitchen_light
|
|
id: light_turned_on
|
|
domain: light
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.motion_lights_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.kitchen_motion_lights
|
|
state: 'on'
|
|
action:
|
|
- choose:
|
|
- alias: Light Turned On
|
|
conditions:
|
|
- condition: trigger
|
|
id: light_turned_on
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
brightness_pct: 100
|
|
target:
|
|
entity_id: light.kitchen_leds
|
|
- alias: Night
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.do_not_disturb
|
|
state: 'on'
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
brightness_pct: 85
|
|
target:
|
|
entity_id: light.kitchen_leds
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_kitchen_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states(''input_number.motion_lights_delay'')|int }}'
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.kitchen_light
|
|
- light.kitchen_leds
|
|
- alias: Evening and Night While Awake
|
|
conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.evening
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.night
|
|
state: 'on'
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
brightness_pct: 100
|
|
target:
|
|
entity_id: light.kitchen_leds
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_kitchen_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states(''input_number.motion_lights_delay'')|int }}'
|
|
- service: scene.turn_on
|
|
target:
|
|
entity_id: scene.kitchen_dim
|
|
default:
|
|
- service: light.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: light.kitchen_light
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_kitchen_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states(''input_number.motion_lights_delay'')|int }}'
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- light.kitchen_light
|
|
- light.kitchen_leds
|
|
mode: restart
|
|
- id: front_yard_smart_light_handler
|
|
alias: Front Yard Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.front_yard_motion
|
|
from: 'off'
|
|
to: 'on'
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.front_yard_motion_lights
|
|
state: 'on'
|
|
- below: 60
|
|
condition: numeric_state
|
|
entity_id: sensor.patio_ambient_light
|
|
action:
|
|
- type: turn_on
|
|
device_id: ea967cfc7f04c23b62f5b9f437966b3e
|
|
entity_id: light.porch_light
|
|
domain: light
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.front_yard_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states(''input_number.motion_lights_delay'')|int }}'
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id: light.porch_light
|
|
data: {}
|
|
mode: restart
|
|
- id: patio_smart_light_handler
|
|
alias: Patio Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.patio_ring_motion
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.motion_lights_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.patio_motion_lights
|
|
state: 'on'
|
|
- below: 60
|
|
condition: numeric_state
|
|
entity_id: sensor.patio_ambient_light
|
|
action:
|
|
- service: light.turn_on
|
|
entity_id: light.patio_string_lights
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.patio_motion
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states(''input_number.motion_lights_delay'')|int }}'
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- light.patio_string_lights
|
|
mode: restart
|
|
- id: garage_smart_light_handler
|
|
alias: Garage Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.garage_motion
|
|
id: motion_active
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: input_boolean.garage_motion
|
|
id: motion_inactive
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: '{{ states(''input_number.motion_lights_delay'')|int }}'
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_door
|
|
id: door_open
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_door
|
|
id: door_closed
|
|
from: 'on'
|
|
to: 'off'
|
|
action:
|
|
- choose:
|
|
- alias: Motion Active
|
|
conditions:
|
|
- condition: trigger
|
|
id: motion_active
|
|
- condition: state
|
|
entity_id: binary_sensor.garage_door
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.motion_lights_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.garage_motion_lights
|
|
state: 'on'
|
|
sequence:
|
|
- service: light.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: light.garage_light
|
|
- alias: Motion Inactive
|
|
conditions:
|
|
- condition: trigger
|
|
id: motion_inactive
|
|
- condition: state
|
|
entity_id: binary_sensor.garage_door
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.motion_lights_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.garage_motion_lights
|
|
state: 'on'
|
|
sequence:
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id: light.garage_light
|
|
- alias: Door Open
|
|
conditions:
|
|
- condition: trigger
|
|
id: door_open
|
|
sequence:
|
|
- service: light.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: light.garage_light
|
|
- alias: Door Closed
|
|
conditions:
|
|
- condition: trigger
|
|
id: door_closed
|
|
sequence:
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id: light.garage_light
|
|
default: []
|
|
mode: restart
|
|
- id: hallway_smart_light_handler
|
|
alias: Hallway Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- type: motion
|
|
platform: device
|
|
device_id: 7a7926b5a8d399f1cf7fcd1f450ada99
|
|
entity_id: binary_sensor.hallway_motion_sensor
|
|
domain: binary_sensor
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.motion_lights_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.hallway_smart_lights
|
|
state: 'on'
|
|
action:
|
|
- if:
|
|
- condition: state
|
|
entity_id: input_boolean.do_not_disturb
|
|
state: 'off'
|
|
then:
|
|
- service: light.turn_on
|
|
entity_id: light.hallway_light
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.hallway_motion_sensor
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: 1
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.hallway_light
|
|
mode: restart
|
|
- id: front_hall_smart_light_handler
|
|
alias: Front Hall Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- type: motion
|
|
platform: device
|
|
device_id: 7a7926b5a8d399f1cf7fcd1f450ada99
|
|
entity_id: binary_sensor.front_hall_motion_sensor
|
|
domain: binary_sensor
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.motion_lights_master
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: input_boolean.front_hall_smart_lights
|
|
state: 'on'
|
|
action:
|
|
- service: light.turn_on
|
|
entity_id: light.front_hall_light
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.front_hall_motion_sensor
|
|
from: 'on'
|
|
to: 'off'
|
|
for:
|
|
minutes: 1
|
|
- service: light.turn_off
|
|
target:
|
|
entity_id:
|
|
- light.front_hall_light
|
|
mode: restart
|
|
- id: linen_closet_smart_light_handler
|
|
alias: Linen Closet Smart Light Handler
|
|
description: ''
|
|
trigger:
|
|
- type: opened
|
|
platform: device
|
|
device_id: b80845462ce1646784961b89e888c56a
|
|
entity_id: binary_sensor.linen_closet
|
|
domain: binary_sensor
|
|
id: open
|
|
- type: not_opened
|
|
platform: device
|
|
device_id: b80845462ce1646784961b89e888c56a
|
|
entity_id: binary_sensor.linen_closet
|
|
domain: binary_sensor
|
|
id: closed
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: open
|
|
sequence:
|
|
- service: light.turn_on
|
|
data:
|
|
brightness_pct: 100
|
|
target:
|
|
entity_id: light.linen_closet
|
|
- conditions:
|
|
- condition: trigger
|
|
id: closed
|
|
sequence:
|
|
- service: light.turn_off
|
|
data: {}
|
|
target:
|
|
entity_id: light.linen_closet
|
|
default: []
|
|
mode: restart
|
|
- id: '1606452083691'
|
|
alias: Alohomora
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.alohomora
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
- condition: device
|
|
device_id: 88da2f99bc5978f66263d957949cfb6d
|
|
domain: device_tracker
|
|
entity_id: device_tracker.iphone_5
|
|
type: is_home
|
|
action:
|
|
- service: lock.unlock
|
|
data: {}
|
|
entity_id: lock.schlage_allegion_be469zp_connect_smart_deadbolt_locked_frontdoor
|
|
- service: input_boolean.turn_off
|
|
data: {}
|
|
entity_id: input_boolean.alohomora
|
|
mode: single
|
|
- id: daily_snapshot_clean_up
|
|
alias: Daily snapshot clean up
|
|
trigger:
|
|
- platform: time
|
|
at: 03:00:00
|
|
action:
|
|
- service: clean_up_snapshots_service.clean_up
|
|
- id: startup_automations
|
|
alias: Home Assistant Startup
|
|
description: ''
|
|
trigger:
|
|
- platform: homeassistant
|
|
event: start
|
|
condition: []
|
|
action:
|
|
- delay: 30
|
|
- service: notify.chris
|
|
data:
|
|
message: Home Assistant has started
|
|
title: We're back
|
|
- service: script.status_annc
|
|
data:
|
|
who: '{{ states(''sensor.room_presence'') }}'
|
|
call_inform_chime: 1
|
|
call_ha_started: 1
|
|
- service: button.press
|
|
data: {}
|
|
target:
|
|
entity_id: button.fire_tablet_load_start_url
|
|
- service: mqtt.publish
|
|
data:
|
|
topic: cmnd/tasmotas/state
|
|
payload: ''
|
|
- service: homeassistant.update_entity
|
|
entity_id: sensor.chris_location
|
|
- service: homeassistant.update_entity
|
|
entity_id: sensor.steven_location
|
|
- service: frontend.set_theme
|
|
data:
|
|
name: ios-dark-mode-light-blue
|
|
mode: single
|
|
- alias: Update USPS Mail Camera Path on Hass Restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.mail_updated
|
|
- platform: homeassistant
|
|
event: start
|
|
action:
|
|
- service: local_file.update_file_path
|
|
data:
|
|
entity_id: camera.mail_usps
|
|
file_path: '{{ states(''sensor.mail_image_system_path'') }}'
|
|
id: f8a0798d6ebb4821845ed48dbf91cf83
|
|
- alias: Power Outage Alert
|
|
id: '1600452870216'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.cyberpower_status
|
|
from: Online
|
|
to: On Battery Battery Discharging
|
|
condition: []
|
|
action:
|
|
- service: notify.all_devices
|
|
data:
|
|
message: Power is out at home
|
|
data:
|
|
push:
|
|
sound:
|
|
name: default
|
|
critical: 1
|
|
mode: single
|
|
- alias: Power Restored Alert
|
|
id: '1600453304153'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.cyberpower_status
|
|
from: On Battery Battery Discharging
|
|
to: Online
|
|
condition: []
|
|
action:
|
|
- service: notify.all_devices
|
|
data:
|
|
message: Power at home is restored.
|
|
data:
|
|
push:
|
|
sound:
|
|
name: default
|
|
critical: 1
|
|
mode: single
|
|
- alias: Battery Backup Unavailable Restart
|
|
id: '1617220336703'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.cyberpower_status
|
|
to: unavailable
|
|
from: Online
|
|
condition: []
|
|
action:
|
|
- service: hassio.addon_restart
|
|
data:
|
|
addon: a0d7b954_nut
|
|
mode: single
|
|
- alias: NUT Auto Restart
|
|
id: '1617758977383'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.cyberpower_status
|
|
attribute: state
|
|
to: Unavailable
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.nut_restarted
|
|
state: 'off'
|
|
action:
|
|
- service: hassio.addon_restart
|
|
data:
|
|
addon: a0d7b954_nut
|
|
- service: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.nut_restarted
|
|
- wait_template: 00:05:00
|
|
- service: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.nut_restarted
|
|
mode: single
|
|
- alias: Certificate Expiration Alert
|
|
id: '1615916791727'
|
|
description: ''
|
|
use_blueprint:
|
|
path: bkbilly/certificate-expiration.yaml
|
|
input:
|
|
time_input: '15:00:00'
|
|
certificate_input: sensor.cert_expiry_timestamp_home_chrisheder_com
|
|
notify_device: 8a29ce795dc898ced035043888d04070
|
|
- alias: Nightly Backup
|
|
id: nightly_backup
|
|
mode: single
|
|
trigger:
|
|
- platform: time
|
|
at: 02:00:00
|
|
action:
|
|
- service: hassio.backup_full
|
|
data:
|
|
name: Full Backup {{ now().strftime('%Y-%m-%d') }}
|
|
- alias: Announce CallerID
|
|
id: announce_callerid
|
|
trigger:
|
|
platform: state
|
|
entity_id: sensor.phone_modem
|
|
to: callerid
|
|
action:
|
|
service: script.alexa_voice
|
|
data:
|
|
who: presence
|
|
message: "{# Set call.name to the name of the caller ID initially #} {%- set\
|
|
\ call = namespace(name=state_attr('sensor.phone_modem', 'cid_name')) -%}\n\
|
|
{# Iterate through my contacts (example sensor in hidden_example.yaml) #}\
|
|
\ {# If the caller ID's number matches a number in my contacts #} {# override\
|
|
\ call.name with the contact's name #} {%- for name, number in state_attr('sensor.contacts','contacts').items()\
|
|
\ -%}\n {%- if number == state_attr('sensor.phone_modem', 'cid_number') -%}\n\
|
|
\ {%- set call.name = name -%}\n {%- endif -%}\n{%- endfor -%}\n{# Announce\
|
|
\ the call using a random variation of the phrase #} {{ [\n \"Sir, incoming\
|
|
\ call from \" + call.name,\n \"Sir, you have a call from \" + call.name,\n\
|
|
\ \"Sir, you have an incoming call from \" + call.name,\n \"Incoming phone\
|
|
\ call sir, from \" + call.name,\n \"Sir, \" + call.name + \"is calling\"\
|
|
\n ] | random }}\n"
|
|
- id: family_has_arrived
|
|
alias: Family Has arrived
|
|
trigger:
|
|
- platform: zone
|
|
entity_id: person.chris
|
|
zone: zone.home
|
|
event: enter
|
|
id: chris
|
|
- entity_id: person.steven
|
|
from: not_home
|
|
platform: state
|
|
to: home
|
|
id: steven
|
|
- entity_id: group.family
|
|
platform: state
|
|
to: home
|
|
id: family
|
|
from: not_home
|
|
condition: []
|
|
action:
|
|
- service: script.family_is_home
|
|
mode: single
|
|
initial_state: true
|
|
- id: family_has_left
|
|
alias: Family Has Left
|
|
initial_state: true
|
|
trigger:
|
|
- entity_id: group.family
|
|
from: home
|
|
platform: state
|
|
to: not_home
|
|
mode: single
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'off'
|
|
action:
|
|
- service: script.family_is_away
|
|
- id: welcome_home
|
|
alias: Welcome Home
|
|
mode: restart
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- person.chris
|
|
- person.steven
|
|
- person.kaitlyn
|
|
- person.ronald
|
|
- person.mari
|
|
- person.rheena
|
|
- person.danielle
|
|
- person.daniel
|
|
- person.brian
|
|
- person.rathnam
|
|
- person.nico
|
|
from: not_home
|
|
to: home
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.welcome_home
|
|
state: 'on'
|
|
sequence:
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.front_door
|
|
from: 'off'
|
|
to: 'on'
|
|
- service: scene.turn_on
|
|
target:
|
|
entity_id: scene.arrival
|
|
- delay:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 10
|
|
milliseconds: 0
|
|
- service: script.turn_on
|
|
entity_id: script.welcome_briefing
|
|
default:
|
|
- service: group.set
|
|
data:
|
|
object_id: arriving
|
|
add_entities: '{{ trigger.to_state.entity_id }}'
|
|
- wait_for_trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.front_door
|
|
from: 'off'
|
|
to: 'on'
|
|
- delay:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 10
|
|
milliseconds: 0
|
|
- service: script.status_annc
|
|
data:
|
|
who: '{{ states(''sensor.room_presence'') }}'
|
|
call_interuption: 1
|
|
speech_message: "{% set person = expand('group.arriving')|map(attribute='name')|join('\
|
|
\ and ') %} {% set peoplecount = expand('group.arriving') | count %} {%\
|
|
\ if peoplecount == 1 %}\n {% set is_are = ' is ' %}\n {% set has_have\
|
|
\ = ' has ' %}\n{% else %}\n {% set is_are = ' are ' %}\n {% set has_have\
|
|
\ = ' have ' %}\n{% endif %} {%- macro greeting_sentence(person, is_are,\
|
|
\ has_have) -%}\n {{ [\n person ~ has_have + \" arrived.\",\n \"My sensors\
|
|
\ are picking up the presence of additional humans. \" ~ person ~ has_have\
|
|
\ + \" been identified as home.\",\n \"Guess who is in the hub?\" ~ person\
|
|
\ ~ is_are,\n \"I am sensing a disturbance in the force. \" ~ person +\"\
|
|
\ must be back\",\n person ~ is_are + \"now in the house.\",\n person\
|
|
\ ~ is_are + \" now here. Welcome Home.\",\n person ~ is_are + \" now\
|
|
\ here.\",\n \"Just a quick announcement. \" ~ person ~ has_have + \" \
|
|
\ arrived\",\n person ~ has_have + \" finally made it home.\"\n ] | random\
|
|
\ }}\n{%- endmacro -%} {{greeting_sentence(person, is_are, has_have)}}\n"
|
|
- delay: 00:02:00
|
|
- service: group.set
|
|
data:
|
|
object_id: arriving
|
|
entities: []
|
|
- id: guests_have_arrived
|
|
alias: Guests have arrived
|
|
trigger:
|
|
- platform: state
|
|
entity_id:
|
|
- person.kaitlyn
|
|
- person.ronald
|
|
- person.mari
|
|
- person.rheena
|
|
- person.danielle
|
|
- person.daniel
|
|
- person.brian
|
|
- person.rathnam
|
|
- person.nico
|
|
from: not_home
|
|
to: home
|
|
action:
|
|
- service: script.family_is_home
|
|
- service: script.visitors_here
|
|
initial_state: true
|
|
- id: guests_have_left
|
|
alias: Guests have left
|
|
trigger:
|
|
- entity_id: group.friends
|
|
from: home
|
|
to: not_home
|
|
platform: state
|
|
action:
|
|
- service: script.visitors_gone
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: group.family
|
|
state: home
|
|
- service: script.family_is_away
|
|
data: {}
|
|
initial_state: true
|
|
- alias: 3D Print Check Status
|
|
id: '1645589881575'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_button.3d_print_check_status
|
|
condition: []
|
|
action:
|
|
- service: script.status_annc
|
|
data:
|
|
who: '{{ (''sensor.room_presence'') }}'
|
|
call_boop: 1
|
|
speech_message: "{%- set time_left = state_attr('sensor.octoprint_print_progress','printTimeLeftFormatted').split(':')\
|
|
\ %}\n your 3D print is {{ states('sensor.octoprint_print_progress') }} percent\
|
|
\ complete.\n Theres\n{% if int(time_left[0]) != 0 %}\n {{ int(time_left[0])\
|
|
\ }} hour{{ 's' if int(time_left[0]) != 1 }},\n{% endif %}\n {{ int(time_left[1])\
|
|
\ }} minute{{ 's' if int(time_left[1]) != 1 }},\n and {{ int(time_left[2])\
|
|
\ }} second{{ 's' if float(time_left[2]) != 1 }} left\n"
|
|
mode: single
|
|
- alias: 3D Print Completed
|
|
id: '1627013660483'
|
|
description: ''
|
|
trigger:
|
|
- platform: numeric_state
|
|
entity_id: sensor.octoprint_print_progress
|
|
above: '99.99'
|
|
condition: []
|
|
action:
|
|
- if:
|
|
- condition: and
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.audible_notifications
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: group.family
|
|
state: home
|
|
then:
|
|
- service: input_boolean.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: input_boolean.print_completed_overnight
|
|
- if:
|
|
- condition: state
|
|
entity_id: group.family
|
|
state: away
|
|
then:
|
|
- service: input_boolean.turn_on
|
|
data: {}
|
|
target:
|
|
entity_id: input_boolean.print_completed_while_away
|
|
mode: single
|
|
- alias: 3D Printing Notifications
|
|
id: 3d_print_notifications
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.octoprint_printing_2
|
|
from: 'off'
|
|
to: 'on'
|
|
id: printing_started
|
|
- platform: state
|
|
entity_id: binary_sensor.octoprint_printing_2
|
|
from: 'on'
|
|
to: 'off'
|
|
id: printing_ended
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: printing_started
|
|
sequence:
|
|
- service: script.status_annc
|
|
data:
|
|
who: '{{ states(''sensor.room_presence'') }}'
|
|
call_interuption: 1
|
|
speech_message: The three d printer is printing.
|
|
- conditions:
|
|
- condition: trigger
|
|
id: printing_ended
|
|
sequence:
|
|
- service: notify.chris
|
|
data:
|
|
title: 3D Printer
|
|
message: Print completed!
|
|
- service: script.status_annc
|
|
data:
|
|
who: '{{ states(''sensor.room_presence'') }}'
|
|
call_inform_chime: 1
|
|
call_print_complete: 1
|
|
- id: morning_standby
|
|
alias: Morning Standby
|
|
initial_state: true
|
|
trigger:
|
|
- platform: time
|
|
at: input_datetime.morning_standby
|
|
condition:
|
|
condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: group.family
|
|
state: home
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'on'
|
|
action:
|
|
- service: script.standby
|
|
- id: nightly_lockdown
|
|
alias: Nightly Lockdown
|
|
initial_state: true
|
|
trigger:
|
|
- platform: time
|
|
at: input_datetime.nightly_lockdown
|
|
condition:
|
|
- condition: state
|
|
entity_id: group.family
|
|
state: home
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'off'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: disarmed
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_home
|
|
action:
|
|
- service: alarm_control_panel.alarm_arm_night
|
|
entity_id: alarm_control_panel.sentry_network
|
|
- alias: Actionable Door Unlocked Notification
|
|
id: '1642655673695'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: lock.touchscreen_deadbolt_z_wave_plus_frontdoor
|
|
to: unlocked
|
|
for:
|
|
hours: 0
|
|
minutes: 10
|
|
seconds: 0
|
|
condition: []
|
|
action:
|
|
- alias: Set up variables for the actions
|
|
variables:
|
|
action_lock: '{{ ''LOCK_'' ~ context.id }}'
|
|
- alias: Ask to lock the front door
|
|
service: notify.mobile_app_chriss_iphone_12_pro
|
|
data:
|
|
message: The front door has been unlocked for 10 minutes. Want to lock it again?
|
|
data:
|
|
actions:
|
|
- action: '{{ action_lock }}'
|
|
title: Lock
|
|
- alias: Wait for a response
|
|
wait_for_trigger:
|
|
- platform: event
|
|
event_type: mobile_app_notification_action
|
|
event_data:
|
|
action: '{{ action_lock }}'
|
|
- alias: Perform the action
|
|
choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ wait.trigger.event.data.action == action_lock }}'
|
|
sequence:
|
|
- service: lock.lock
|
|
target:
|
|
entity_id: lock.touchscreen_deadbolt_z_wave_plus_frontdoor
|
|
mode: single
|
|
- alias: Window Notifications
|
|
id: '1642916773044'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.kitchen_window
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.bedroom_windows
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.lab_windows
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
from: 'off'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.kitchen_window
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
from: 'on'
|
|
to: 'off'
|
|
- platform: state
|
|
entity_id: binary_sensor.bedroom_windows
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
from: 'on'
|
|
to: 'off'
|
|
- platform: state
|
|
entity_id: binary_sensor.lab_windows
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
from: 'on'
|
|
to: 'off'
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.window_notifications
|
|
state: 'on'
|
|
action:
|
|
- service: notify.tvs
|
|
data:
|
|
title: '{{ trigger.to_state.attributes.friendly_name }}'
|
|
message: "{% set states = {\n 'on':'Open',\n 'off':'Closed',\n } %}\n{{ trigger.to_state.attributes.friendly_name\
|
|
\ }} {{ states[trigger.to_state.state] }}\n"
|
|
mode: single
|
|
- alias: Patio Door Notifications
|
|
id: '1642919890732'
|
|
description: ''
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.sliding_glass_door
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
from: 'on'
|
|
to: 'off'
|
|
- platform: state
|
|
entity_id: binary_sensor.sliding_glass_door
|
|
for:
|
|
hours: 0
|
|
minutes: 0
|
|
seconds: 2
|
|
from: 'off'
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
state: 'on'
|
|
entity_id: input_boolean.patio_door_notifications
|
|
action:
|
|
- service: notify.tvs
|
|
data:
|
|
title: '{{ trigger.to_state.attributes.friendly_name }}'
|
|
message: "{% set states = {\n 'on':'Open',\n 'off':'Closed',\n } %}\n{{ trigger.to_state.attributes.friendly_name\
|
|
\ }} {{ states[trigger.to_state.state] }}\n"
|
|
mode: single
|
|
- alias: Alarm Breach Trigger
|
|
id: alarm_breach_trigger
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.front_door
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.sliding_glass_door
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_door
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.kitchen_window
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.bedroom_windows
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.lab_windows
|
|
to: 'on'
|
|
condition:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_away
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_home
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_night
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_vacation
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''alarm_control_panel.sentry_network'') in [''armed_home'',
|
|
''armed_night''] and trigger.to_state.entity_id == ''binary_sensor.front_door''
|
|
and states(''binary_sensor.exiting_front_door'') == ''on'' }}'
|
|
sequence: []
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.entity_id == ''binary_sensor.front_door''
|
|
and is_state(''input_boolean.alarm_bypass_front_door'', ''on'') }}'
|
|
sequence: []
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.entity_id == ''binary_sensor.sliding_glass_door''
|
|
and is_state(''input_boolean.alarm_bypass_sliding_glass_door'', ''on'')
|
|
}}'
|
|
sequence: []
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.entity_id == ''binary_sensor.garage_door''
|
|
and is_state(''input_boolean.alarm_bypass_garage_door'', ''on'') }}'
|
|
sequence: []
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.entity_id == ''binary_sensor.kitchen_window''
|
|
and is_state(''input_boolean.alarm_bypass_kitchen_window'', ''on'') }}'
|
|
sequence: []
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.entity_id == ''binary_sensor.bedroom_windows''
|
|
and is_state(''input_boolean.alarm_bypass_bedroom_windows'', ''on'') }}'
|
|
sequence: []
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.entity_id == ''binary_sensor.lab_windows''
|
|
and is_state(''input_boolean.alarm_bypass_lab_window'', ''on'') }}'
|
|
sequence: []
|
|
default:
|
|
- service: alarm_control_panel.alarm_trigger
|
|
entity_id: alarm_control_panel.sentry_network
|
|
- alias: Alarm Disarm On Door Unlock
|
|
id: alarm_disarm_on_door_unlock
|
|
trigger:
|
|
- platform: event
|
|
event_type: keymaster_lock_state_changed
|
|
event_data:
|
|
lockname: frontdoor
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ trigger.event.data.state == ''unlocked'' and trigger.event.data.code_slot
|
|
> 0 }}'
|
|
- condition: state
|
|
entity_id: input_boolean.alarm_disarm_on_unlock
|
|
state: 'on'
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_away
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_home
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_night
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_vacation
|
|
action:
|
|
- service: alarm_control_panel.alarm_disarm
|
|
data:
|
|
entity_id: alarm_control_panel.sentry_network
|
|
code: secret alarm_code
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
ios: true
|
|
message: Alarm disarmed by {{ trigger.event.data.code_slot_name }}
|
|
- alias: Alarm Disarmed
|
|
id: alarm_disarmed
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: disarmed
|
|
action:
|
|
- service: input_boolean.turn_off
|
|
entity_id: input_boolean.security_alarm
|
|
- choose:
|
|
- alias: Somebody is detected as being home
|
|
conditions:
|
|
condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: group.family
|
|
state: home
|
|
- condition: state
|
|
entity_id: input_boolean.guest_mode
|
|
state: 'on'
|
|
sequence:
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
vocal: true
|
|
who: presence
|
|
voice_message: '{{ [ "Barn door protocol has been deactivated.", "I am no
|
|
longer monitoring the access points. ", "Sentry Mode has been disabled.
|
|
", "Header House Shields are down." ] | random }}
|
|
|
|
'
|
|
ios: true
|
|
message: The alarm has been disarmed at {{ states('sensor.time_date') }}.
|
|
default:
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
ios: true
|
|
message: Security System has been disarmed, but I could not validate presence.
|
|
{{ states('sensor.time_date') }}.
|
|
- alias: Alarm Arming Issue
|
|
id: alarm_arming_issue
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: arming
|
|
action:
|
|
- variables:
|
|
open_entities: '{{ states(''sensor.alarm_triggers'') }}'
|
|
open_count: '{{ state_attr(''sensor.alarm_triggers'', ''open_count'') }}'
|
|
is_are: '{{ '' are '' if open_count | int > 1 or open_entities[-1] == ''s''
|
|
else '' is '' }}'
|
|
it_them: '{{ '' them '' if open_count | int > 1 or open_entities[-1] == ''s''
|
|
else '' it '' }}'
|
|
- if:
|
|
- condition: state
|
|
entity_id: group.alarm_exit_triggers
|
|
state: 'on'
|
|
then:
|
|
- service: alarm_control_panel.alarm_disarm
|
|
data:
|
|
code: secret alarm_code
|
|
entity_id: alarm_control_panel.sentry_network
|
|
- service: input_boolean.turn_on
|
|
entity_id: input_boolean.lockdown_issue
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
vocal: true
|
|
who: kitchen
|
|
voice_message: "{{ [\n \"Wait \",\n \"Stop \",\n \"Before you go sir, \"\
|
|
,\n \"Just a second sir, \",\n \"Sir, \"\n ] | random -}}\n{{ [\n \"\
|
|
I am unable to engage sentry mode due to the \" ~ open_entities ~ \" being\
|
|
\ open\",\n \"I cannot engage sentry mode because you have failed to close\
|
|
\ the \" ~ open_entities,\n \"I am incapable of engaging sentry mode as\
|
|
\ you have failed to close the \" ~ open_entities,\n \"The \" ~ open_entities\
|
|
\ ~ is_are ~ \"still open. Why don't you go close\" ~ it_them ~ \"first\"\
|
|
,\n \"How do you expect me to engage sentry mode with the \" ~ open_entities\
|
|
\ ~ \" still open? Go close \" ~ it_them,\n \"You do know the \" ~ open_entities\
|
|
\ ~ is_are ~ \"still open, right? Close \" ~ it_them ~ \" first, then we'll\
|
|
\ try this again.\",\n \"I cannot engage sentry mode as the \" ~ open_entities\
|
|
\ ~ is_are ~ \"still open. I would close \" ~ it_them ~ \" myself but you\
|
|
\ still refuse to give me arms.\",\n \"You should try closing the \" ~\
|
|
\ open_entities ~ \" first. It may work better, you know, since I currently\
|
|
\ cannot engage sentry mode\",\n \"Where do you think you're going? The\
|
|
\ \" ~ open_entities ~ is_are ~ \" still open. Close \" ~ it_them ~ \" first\
|
|
\ then we'll try again.\"\n ] | random }}\n"
|
|
ios: true
|
|
message: Alarm couldn't be armed due to the {{ open_entities }}. Please close
|
|
{{ it_them }} and try again. {{ states('sensor.time_date') }}
|
|
- alias: Alarm Arm
|
|
id: alarm_arm
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: arming
|
|
for:
|
|
seconds: 1
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: armed_home
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: armed_away
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: armed_away
|
|
for:
|
|
minutes: 10
|
|
id: armed_10_mins
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: armed_night
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: armed_vacation
|
|
action:
|
|
- if:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.state = ''arming'' and states(''lock.touchscreen_deadbolt_z_wave_plus_frontdoor'')
|
|
== ''unlocked'' }}'
|
|
then:
|
|
- service: lock.lock
|
|
target:
|
|
entity_id: lock.touchscreen_deadbolt_z_wave_plus_frontdoor
|
|
- if:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.state = ''arming'' }}'
|
|
then:
|
|
- service: script.turn_on
|
|
entity_id: script.reset_front_door_motion_count
|
|
- choose:
|
|
- alias: Arming
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.state == ''arming'' }}'
|
|
sequence:
|
|
- service: input_boolean.turn_off
|
|
entity_id: input_boolean.lockdown_issue
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
vocal: true
|
|
who: kitchen
|
|
voice_message: "{{ [\n \"Goodbye sir, see you soon. I will monitor the\
|
|
\ house while you're out.\",\n 'Farwell sir, I will guard the house\
|
|
\ until we meet again.',\n \"Have a great day sir. I'll keep the house\
|
|
\ safe while you're gone.\",\n 'I shall keep the house protected while\
|
|
\ you are gone.',\n 'Not to worry, I will not throw any parties while\
|
|
\ you are out.',\n 'I will keep the cats entertained and safe while\
|
|
\ you are gone',\n \"Very well sir, have a nice day. I'll hold the\
|
|
\ fort.\",\n 'Farewell sir, drive safe'\n ] | random }}\n"
|
|
ios: true
|
|
message: Alarm is arming at {{ states('sensor.time_date') }}.
|
|
- alias: Armed Home or Night
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.state in [''armed_home'',''armed_night'']
|
|
}}'
|
|
sequence:
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
vocal: true
|
|
who: presence
|
|
voice_message: '{{ [ "Barn door protocol has been activated.", "Header House
|
|
has been secured ", "Sentry Mode is active. ", "I am now monitoring the
|
|
doors and will let you know if anyone attempts to access.", "Header House
|
|
Shields are up." ] | random }}
|
|
|
|
'
|
|
ios: true
|
|
message: The alarm has been set to {{ trigger.to_state.state | replace('_',
|
|
' ') }} mode at {{ states('sensor.time_date') }}.{{ ' Have a good night.'
|
|
if trigger.to_state.state == armed_night }}
|
|
- alias: Armed Vacation
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.state == ''armed_vacation'' }}'
|
|
sequence:
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
ios: true
|
|
message: Alarm has been armed in vacation mode at {{ states('sensor.time_date')
|
|
}}. Enjoy your trip
|
|
- alias: Armed Away 10 Mins Check For Presence
|
|
conditions:
|
|
- condition: trigger
|
|
id: armed_10_mins
|
|
sequence:
|
|
- if:
|
|
- condition: state
|
|
entity_id: group.people
|
|
state: home
|
|
then:
|
|
- service: script.turn_on
|
|
entity_id: script.arm_stay
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
vocal: true
|
|
who: presence
|
|
voice_message: "{{ [\n \"Well I see you're not going anywhere. I'll\
|
|
\ just monitor the house in stay mode.\",\n \"Oh, you're still here?\
|
|
\ Let me just cancel that party real quick.\",\n \"Still home, I\
|
|
\ see. Shocker. Well I guess I'll just adjust the sentry mode.\",\n\
|
|
\ \"I see you got very far. I'll just set the sentry mode to stay.\"\
|
|
\n ] | random }}\n"
|
|
ios: true
|
|
message: The alarm has been in away mode for 10 minutes but there's still
|
|
people here. I'm arming in stay mode.
|
|
default:
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
ios: true
|
|
message: The alarm has been set to {{ trigger.to_state.state | replace('_',
|
|
' ') }} mode at {{ states('sensor.time_date') }}.
|
|
- alias: Alarm Pending
|
|
id: alarm_pending
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
id: away
|
|
from: armed_away
|
|
to: pending
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
id: vacation
|
|
from: armed_vacation
|
|
to: pending
|
|
action:
|
|
- service: script.turn_on
|
|
entity_id: script.security_response
|
|
- alias: Alarm Triggered
|
|
id: alarm_triggered
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: triggered
|
|
action:
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
ios: true
|
|
critical: true
|
|
message: THE ALARM HAS BEEN ACTIVATED AT {{ states('sensor.time_date') }}
|
|
- service: input_boolean.turn_on
|
|
entity_id: input_boolean.security_alarm
|
|
- alias: Alarm Light Handler
|
|
id: alarm_light_handler
|
|
trigger:
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: disarmed
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: arming
|
|
for:
|
|
seconds: 2
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: armed_away
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: armed_vacation
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: pending
|
|
- platform: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
to: triggered
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.state == ''arming'' }}'
|
|
sequence:
|
|
- service: scene.turn_on
|
|
entity_id: scene.leaving
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.state in [''armed_away'',''armed_vacation'']
|
|
}}'
|
|
sequence:
|
|
- service: scene.turn_on
|
|
entity_id: scene.all_off
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.state == ''pending'' }}'
|
|
sequence:
|
|
- service: scene.create
|
|
data:
|
|
scene_id: alarm_before
|
|
snapshot_entities:
|
|
- light.front_hall_light
|
|
- light.kitchen_light
|
|
- light.kitchen_leds
|
|
- light.fish_tank_leds
|
|
- light.couch_leds
|
|
- select.couch_leds_playlist_2
|
|
- select.couch_leds_preset_2
|
|
- light.curtain_leds
|
|
- light.living_room_tv_backlights
|
|
- select.living_room_tv_backlights_playlist
|
|
- select.living_room_tv_backlights_preset
|
|
- light.fish_tank_backlights
|
|
- select.fish_tank_backlights_playlist_2
|
|
- select.fish_tank_backlights_preset_2
|
|
- light.dining_room_light
|
|
- light.francis_s_light
|
|
- light.patio_light
|
|
- light.patio_string_lights
|
|
- light.hallway_light
|
|
- light.bedroom_fan_lights
|
|
- light.hue_color_lamp_1
|
|
- light.lab_fan_light
|
|
- light.living_room_fan_light
|
|
- light.western_electric_cabinet_lights
|
|
- group.floods
|
|
- light.patio_ring_light
|
|
- service: scene.turn_on
|
|
entity_id: scene.alarm_pending
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.state == ''triggered'' }}'
|
|
sequence:
|
|
- service: scene.turn_on
|
|
entity_id: scene.alarm_triggered
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ trigger.to_state.state == ''disarmed'' and trigger.from_state.state
|
|
in [''triggered'',''pending'',''arming''] }}'
|
|
sequence:
|
|
- service: scene.turn_on
|
|
entity_id: scene.alarm_before
|
|
- service: scene.turn_on
|
|
entity_id: scene.arrival
|
|
- alias: Alarm Sound
|
|
id: alarm_sound
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_boolean.security_alarm
|
|
id: 'on'
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: input_boolean.security_alarm
|
|
id: 'off'
|
|
to: 'off'
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: 'on'
|
|
sequence:
|
|
- service: script.alexa_voice
|
|
data:
|
|
who: everywhere
|
|
message: The siren has been activated
|
|
- conditions:
|
|
- condition: trigger
|
|
id: 'off'
|
|
sequence:
|
|
- service: script.alexa_voice
|
|
data:
|
|
who: everywhere
|
|
message: The siren has been deactivated
|
|
default: []
|
|
- alias: Alarm Alert On All Activity
|
|
id: alarm_alert_on_all_activity
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.front_door
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.sliding_glass_door
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.garage_door
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.kitchen_window
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.bedroom_windows
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.lab_windows
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_bedroom_motion
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_lab_motion
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_kitchen_motion
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_dining_room_motion
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.espresense_living_room_motion
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.hallway_motion_sensor
|
|
to: 'on'
|
|
- platform: state
|
|
entity_id: binary_sensor.front_hall_motion_sensor
|
|
to: 'on'
|
|
condition:
|
|
- condition: state
|
|
entity_id: binary_sensor.alarm_alert_on_all_activity
|
|
state: 'on'
|
|
action:
|
|
- service: script.alarm_alert_engine
|
|
data:
|
|
ios: true
|
|
message: '{%- if ''motion'' in trigger.to_state.entity_id -%}{{ trigger.to_state.name
|
|
}} detected motion{%- else -%}{{ trigger.to_state.name }} was opened{%- endif
|
|
-%} at {{ states(''sensor.time_date'') }}'
|
|
- alias: Alexa Barn Door Protocol
|
|
id: alexa_barn_door_protocol
|
|
trigger:
|
|
- platform: state
|
|
entity_id: input_button.activate_barn_door_protocol
|
|
id: activate
|
|
- platform: state
|
|
entity_id: input_button.deactivate_barn_door_protocol
|
|
id: deactivate
|
|
action:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: activate
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_home
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: armed_night
|
|
sequence:
|
|
- service: script.speech_engine
|
|
data:
|
|
who: presence
|
|
message: include ../templates/speech/already_done.yaml
|
|
default:
|
|
- service: script.speech_engine
|
|
data:
|
|
who: presence
|
|
message: include ../templates/speech/interjections.yaml
|
|
- delay:
|
|
seconds: 2
|
|
- service: script.turn_on
|
|
entity_id: script.arm_stay
|
|
- conditions:
|
|
- condition: trigger
|
|
id: deactivate
|
|
- condition: state
|
|
entity_id: input_boolean.alarm_disarm_by_alexa
|
|
state: 'on'
|
|
sequence:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: alarm_control_panel.sentry_network
|
|
state: disarmed
|
|
sequence:
|
|
- service: script.speech_engine
|
|
data:
|
|
who: '{{ states(''sensor.room_audio'') }}'
|
|
message: include ../templates/speech/already_done.yaml
|
|
default:
|
|
- service: script.turn_on
|
|
entity_id: script.disarm_security
|
|
default: []
|
|
- id: iss_alert
|
|
alias: ISS Alert
|
|
trigger:
|
|
- platform: state
|
|
entity_id: binary_sensor.iss
|
|
from: 'off'
|
|
to: 'on'
|
|
action:
|
|
- service: script.status_annc
|
|
data:
|
|
who: '{{ states(''sensor.room_presence'') }}'
|
|
call_interuption: 1
|
|
call_iss: 1
|
|
- alias: Weather Alert UI Notification - 1
|
|
initial_state: true
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.weatheralerts_1_alert_1_last_changed
|
|
- platform: homeassistant
|
|
event: start
|
|
condition:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.weatheralerts_1_alerts_are_active'') ==
|
|
''Yes'' }}'
|
|
- condition: template
|
|
value_template: '{{ (as_timestamp(now()) - as_timestamp(state_attr(''sensor.weatheralerts_1_alert_1'',
|
|
''alert_sent''))) < 3600 }}'
|
|
- condition: template
|
|
value_template: '{{ state_attr(''sensor.weatheralerts_1_alert_1'', ''alert_id'')
|
|
not in states(''input_text.weatheralerts_1_triggered_ui_alert_ids'') }}'
|
|
action:
|
|
- service: script.weatheralerts_1_popup_on_wx_alert
|
|
data:
|
|
title: "{% if (states('sensor.weatheralerts_1_alert_1') == 'on') and ((as_timestamp(now())\
|
|
\ - as_timestamp(state_attr('sensor.weatheralerts_1_alert_1', 'alert_effective'))|float)\
|
|
\ <= 3600) %}\n {{ state_attr('sensor.weatheralerts_1_alert_1', 'display_title')\
|
|
\ }}\n{% else %}\n Weather Alerts\n{% endif %}\n"
|
|
message: "{% if (states('sensor.weatheralerts_1_alert_1') == 'on') and ((as_timestamp(now())\
|
|
\ - as_timestamp(state_attr('sensor.weatheralerts_1_alert_1', 'alert_effective'))|float)\
|
|
\ <= 3600) %}\n {{ state_attr('sensor.weatheralerts_1_alert_1', 'display_message')\
|
|
\ }}\n{% endif %} {% if (states('sensor.weatheralerts_1_alert_1') == 'on')\
|
|
\ and ((as_timestamp(now()) - as_timestamp(state_attr('sensor.weatheralerts_1_alert_1',\
|
|
\ 'alert_effective'))|float) > 3600) %}\n <hr>Alert: <br>{{ state_attr('sensor.weatheralerts_1_alert_1',\
|
|
\ 'display_title') }}\n{% endif %} {% if (states('sensor.weatheralerts_1_alert_2')\
|
|
\ == 'on') and ((as_timestamp(now()) - as_timestamp(state_attr('sensor.weatheralerts_1_alert_2',\
|
|
\ 'alert_effective'))|float) <= 3600) %}\n <hr>{{ state_attr('sensor.weatheralerts_1_alert_2',\
|
|
\ 'display_title') }}<br>\n {{ state_attr('sensor.weatheralerts_1_alert_2',\
|
|
\ 'display_message') }}\n{% endif %} {% if (states('sensor.weatheralerts_1_alert_2')\
|
|
\ == 'on') and ((as_timestamp(now()) - as_timestamp(state_attr('sensor.weatheralerts_1_alert_2',\
|
|
\ 'alert_effective'))|float) > 3600) %}\n <hr>Alert: <br>{{ state_attr('sensor.weatheralerts_1_alert_2',\
|
|
\ 'display_title') }}\n{% endif %} {% if (states('sensor.weatheralerts_1_alert_3')\
|
|
\ == 'on') and ((as_timestamp(now()) - as_timestamp(state_attr('sensor.weatheralerts_1_alert_3',\
|
|
\ 'alert_effective'))|float) <= 3600) %}\n <hr>{{ state_attr('sensor.weatheralerts_1_alert_3',\
|
|
\ 'display_title') }}<br>\n {{ state_attr('sensor.weatheralerts_1_alert_3',\
|
|
\ 'display_message') }}\n{% endif %} {% if (states('sensor.weatheralerts_1_alert_3')\
|
|
\ == 'on') and ((as_timestamp(now()) - as_timestamp(state_attr('sensor.weatheralerts_1_alert_3',\
|
|
\ 'alert_effective'))|float) > 3600) %}\n <hr>Alert: <br>{{ state_attr('sensor.weatheralerts_1_alert_3',\
|
|
\ 'display_title') }}\n{% endif %} {% if (states('sensor.weatheralerts_1_alert_4')\
|
|
\ == 'on') and ((as_timestamp(now()) - as_timestamp(state_attr('sensor.weatheralerts_1_alert_4',\
|
|
\ 'alert_effective'))|float) <= 3600) %}\n <hr>{{ state_attr('sensor.weatheralerts_1_alert_4',\
|
|
\ 'display_title') }}<br>\n {{ state_attr('sensor.weatheralerts_1_alert_4',\
|
|
\ 'display_message') }}\n{% endif %} {% if (states('sensor.weatheralerts_1_alert_4')\
|
|
\ == 'on') and ((as_timestamp(now()) - as_timestamp(state_attr('sensor.weatheralerts_1_alert_4',\
|
|
\ 'alert_effective'))|float) > 3600) %}\n <hr>Alert: <br>{{ state_attr('sensor.weatheralerts_1_alert_4',\
|
|
\ 'display_title') }}\n{% endif %} {% if (states('sensor.weatheralerts_1_alert_5')\
|
|
\ == 'on') and ((as_timestamp(now()) - as_timestamp(state_attr('sensor.weatheralerts_1_alert_5',\
|
|
\ 'alert_effective'))|float) <= 3600) %}\n <hr>{{ state_attr('sensor.weatheralerts_1_alert_5',\
|
|
\ 'display_title') }}<br>\n {{ state_attr('sensor.weatheralerts_1_alert_5',\
|
|
\ 'display_message') }}\n{% endif %} {% if (states('sensor.weatheralerts_1_alert_5')\
|
|
\ == 'on') and ((as_timestamp(now()) - as_timestamp(state_attr('sensor.weatheralerts_1_alert_5',\
|
|
\ 'alert_effective'))|float) > 3600) %}\n <hr>Alert: <br>{{ state_attr('sensor.weatheralerts_1_alert_5',\
|
|
\ 'display_title') }}\n{% endif %}\n"
|
|
- service: input_text.set_value
|
|
data:
|
|
entity_id: input_text.weatheralerts_1_triggered_ui_alert_ids
|
|
value: '{{ state_attr(''sensor.weatheralerts_1_alert_1'', ''alert_id'') }} {{
|
|
state_attr(''sensor.weatheralerts_1_alert_2'', ''alert_id'') }} {{ state_attr(''sensor.weatheralerts_1_alert_3'',
|
|
''alert_id'') }} {{ state_attr(''sensor.weatheralerts_1_alert_4'', ''alert_id'')
|
|
}} {{ state_attr(''sensor.weatheralerts_1_alert_5'', ''alert_id'') }}'
|
|
- alias: Weather Alert UI Notification Auto-dismiss - 1
|
|
trigger:
|
|
- platform: state
|
|
entity_id: sensor.weatheralerts_1_alerts_are_active
|
|
to: 'No'
|
|
for:
|
|
minutes: 30
|
|
- platform: homeassistant
|
|
event: start
|
|
condition:
|
|
- condition: template
|
|
value_template: '{{ states(''sensor.weatheralerts_1_alerts_are_active'') == ''No''
|
|
}}'
|
|
action:
|
|
- service: persistent_notification.dismiss
|
|
data:
|
|
notification_id: weatheralerts_1_alert
|