- alias: Ad-Hoc Charging
description: ''
trigger:
- platform: time
at: 02:00:00
id: Start charge
- platform: time
at: 05:00:00
id: Stop charge
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Start charge
sequence:
- type: turn_on
device_id: 86f6f7b8b3ba67d124acc8138c2a4a3c
entity_id: switch.ad_hoc_charging_local
domain: switch
- type: turn_on
device_id: 66e96b541c8c8cdaf67194ef989264ae
entity_id: switch.ad_hoc_tou_charging_2_socket_1
domain: switch
- conditions:
- condition: trigger
id: Stop charge
sequence:
- type: turn_off
device_id: 86f6f7b8b3ba67d124acc8138c2a4a3c
entity_id: switch.ad_hoc_charging_local
domain: switch
- type: turn_off
device_id: 66e96b541c8c8cdaf67194ef989264ae
entity_id: switch.ad_hoc_tou_charging_2_socket_1
domain: switch
mode: single
- alias: Alert when OneDrive is close to storage limit
description: Send notification to phone when drive needs cleanup.
triggers:
- trigger: state
entity_id:
- sensor.onedrive_drive_state
from: normal
to: nearing
- trigger: state
entity_id:
- sensor.onedrive_drive_state
from: nearing
to: critical
actions:
- action: script.text_notify_dave
data:
title: OneDrive is almost full!
message: 'OneDrive has used up {{ states(''sensor.my_drive_used_storage'') }}
of {{ states(''sensor.my_drive_total_available'') }}GB. Only {{ states(''sensor.my_drive_remaining_storage'')
}}GB remaining.
'
mode: single
- alias: Alexa Set Volume for Announcements
description: ''
trigger:
- platform: state
entity_id:
- input_number.alexa_volume_level_announcements
id: Alexa Set Volume Announcements
alias: When Alexa Volume Level for Annoucements changes
condition: []
action:
- service: media_player.volume_set
target:
entity_id:
- media_player.dave_s_echo_pop
- media_player.guest_bedroom_echo_dot
- media_player.living_room_dot
- media_player.kitchen_echo_show
- media_player.main_bedroom_dot
- media_player.dave_s_2nd_echo_pop_2
- media_player.seans_room_dot
- media_player.dave_s_2nd_echo_pop
data:
volume_level: '{{ states(''input_number.alexa_volume_level_announcements'')
| float(0) }}'
mode: single
- alias: All Govee Lighting v2.0
description: Uses scene snapshots for sunset and sunrise lights
triggers:
- entity_id:
- sun.sun
from: below_horizon
to: above_horizon
id: sunrise
trigger: state
enabled: true
- entity_id:
- binary_sensor.lunchtime
from: 'off'
to: 'on'
id: Lunchtime
trigger: state
- entity_id:
- binary_sensor.afternoon
from: 'off'
to: 'on'
id: Afternoon
trigger: state
- entity_id:
- binary_sensor.dinner_time
from: 'off'
to: 'on'
id: Dinnertime
trigger: state
- entity_id:
- binary_sensor.evening
from: 'off'
to: 'on'
id: Evening
trigger: state
- entity_id:
- sun.sun
from: above_horizon
to: below_horizon
id: sunset
trigger: state
enabled: true
- entity_id: sensor.living_room_fp2_light_sensor_light_level
below: input_number.low_light_threshold
id: Low Light
for:
seconds: 20
trigger: numeric_state
- entity_id: sensor.living_room_fp2_light_sensor_light_level
above: input_number.upper_light_threshold_level
id: Good Light
for:
seconds: 20
trigger: numeric_state
- entity_id:
- switch.living_room_tv
from: 'off'
to: 'on'
id: TV on
trigger: state
- entity_id:
- switch.living_room_tv
from: 'on'
to: 'off'
id: TV off
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- sunrise
- condition: state
entity_id: input_boolean.we_are_in_bed
state: 'off'
sequence:
- action: scene.create
data:
scene_id: before_sunrise
snapshot_entities:
- light.bed_lamps_3
- light.stair_lights_2
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.floor_lamp_pro_1
- light.xmas_string_lights_3_2
- delay:
hours: 0
minutes: 0
seconds: 20
- parallel:
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 5
effect: Sunrise
action: light.turn_on
- target:
entity_id:
- light.govee_glide_left_2
- light.glide_lights_right_2
data:
brightness_pct: 5
effect: Sunrise
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 50
effect: Sunrise
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Sunrise
action: light.turn_on
alias: Set lights to sunrise setting.
- delay:
minutes: 30
- action: scene.turn_on
target:
entity_id: scene.before_sunrise
data: {}
- conditions:
- condition: trigger
id:
- Lunchtime
sequence:
- parallel:
- target:
entity_id:
- light.glide_lights_right_2
- light.govee_glide_left_2
data:
brightness_pct: 1
effect: Forest
action: light.turn_on
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 20
effect: Spring
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 50
effect: Spring
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Forest
action: light.turn_on
- data:
effect: Forest
action: light.turn_on
target:
entity_id: light.corner_lamp_2
alias: Set lights to lunchtime effects.
- delay:
hours: 0
minutes: 0
seconds: 20
- action: scene.create
data:
snapshot_entities:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
scene_id: lunchtime_govee
- delay:
hours: 0
minutes: 0
seconds: 20
- condition: state
entity_id: binary_sensor.living_room_occupied
state: 'off'
- action: light.turn_off
target:
entity_id:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- Afternoon
sequence:
- parallel:
- target:
entity_id:
- light.glide_lights_right_2
- light.govee_glide_left_2
data:
brightness_pct: 1
effect: Rustling Leaves
action: light.turn_on
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 10
effect: Rustling Leaves
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 50
effect: Rustling Leaves
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Forest
action: light.turn_on
- data:
effect: Forest
action: light.turn_on
target:
entity_id: light.corner_lamp_2
alias: Set lights to Afternoon effects.
- delay:
hours: 0
minutes: 0
seconds: 20
- action: scene.create
data:
scene_id: afternoon_govee
snapshot_entities:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
- delay:
hours: 0
minutes: 0
seconds: 20
- condition: state
entity_id: binary_sensor.living_room_occupied
state: 'off'
- action: light.turn_off
target:
entity_id:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- Dinnertime
sequence:
- parallel:
- target:
entity_id:
- light.glide_lights_right_2
- light.govee_glide_left_2
data:
brightness_pct: 1
effect: Candlelight
action: light.turn_on
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 1
effect: Fall
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 20
effect: Fall
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Twilight
action: light.turn_on
- data:
effect: Forest
action: light.turn_on
target:
entity_id: light.corner_lamp_2
alias: Set lights to Dinnertime effects.
- delay:
hours: 0
minutes: 0
seconds: 20
- action: scene.create
data:
snapshot_entities:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
scene_id: dinnertime_govee
- delay:
hours: 0
minutes: 0
seconds: 20
- condition: state
entity_id: binary_sensor.living_room_occupied
state: 'off'
- action: light.turn_off
target:
entity_id:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- Evening
sequence:
- parallel:
- target:
entity_id:
- light.glide_lights_right_2
- light.govee_glide_left_2
data:
brightness_pct: 1
effect: Fire
action: light.turn_on
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 5
effect: Fall
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 50
effect: Fire
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Fire
action: light.turn_on
- data:
effect: Forest
action: light.turn_on
target:
entity_id: light.corner_lamp_2
alias: Set lights to Evening effects.
- delay:
hours: 0
minutes: 0
seconds: 20
- action: scene.create
data:
snapshot_entities:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
scene_id: evening_govee
- delay:
hours: 0
minutes: 0
seconds: 20
- condition: state
entity_id: binary_sensor.living_room_occupied
state: 'off'
- action: light.turn_off
target:
entity_id:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- sunset
- condition: state
entity_id: input_boolean.we_are_in_bed
state: 'off'
sequence:
- parallel:
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 5
effect: Warm
action: light.turn_on
- target:
entity_id:
- light.govee_glide_left_2
- light.glide_lights_right_2
data:
brightness_pct: 5
effect: Sunset Glow
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 50
effect: Warm
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Sunset
action: light.turn_on
alias: Set lights to Sunset effects.
- delay:
minutes: 30
- alias: If afternoon reapply scene else apply evening
if:
- condition: state
entity_id: binary_sensor.afternoon
state: 'on'
then:
- action: scene.turn_on
target:
entity_id:
- scene.afternoon_govee
data: {}
else:
- parallel:
- target:
entity_id:
- light.glide_lights_right_2
- light.govee_glide_left_2
data:
brightness_pct: 1
effect: Fire
action: light.turn_on
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 5
effect: Fall
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 20
effect: Fire
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Fire
action: light.turn_on
alias: Set lights to Evening effects.
- conditions:
- condition: trigger
id: Low Light
- condition: state
entity_id: switch.living_room_tv
state: 'on'
sequence:
- data: {}
target:
entity_id: light.dreamview_g1_pro_2
action: light.turn_on
- conditions:
- condition: trigger
id: Good Light
- condition: state
entity_id: switch.living_room_tv
state: 'on'
sequence:
- data: {}
target:
entity_id: light.dreamview_g1_pro_2
action: light.turn_off
- conditions:
- condition: trigger
id:
- TV on
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.day
state: 'off'
- condition: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
below: input_number.low_light_threshold
sequence:
- target:
entity_id: light.dreamview_g1_pro_2
data: {}
action: light.turn_on
- conditions:
- condition: trigger
id:
- TV off
- condition: state
entity_id: light.dreamview_g1_pro_2
state: 'on'
sequence:
- target:
entity_id: light.dreamview_g1_pro_2
data: {}
action: light.turn_off
mode: parallel
- alias: All Govee Lighting v2.0
description: Uses scene snapshots for sunset and sunrise lights
triggers:
- entity_id:
- sun.sun
from: below_horizon
to: above_horizon
id: sunrise
trigger: state
enabled: true
- entity_id:
- binary_sensor.lunchtime
from: 'off'
to: 'on'
id: Lunchtime
trigger: state
- entity_id:
- binary_sensor.afternoon
from: 'off'
to: 'on'
id: Afternoon
trigger: state
- entity_id:
- binary_sensor.dinner_time
from: 'off'
to: 'on'
id: Dinnertime
trigger: state
- entity_id:
- binary_sensor.evening
from: 'off'
to: 'on'
id: Evening
trigger: state
- entity_id:
- sun.sun
from: above_horizon
to: below_horizon
id: sunset
trigger: state
enabled: true
- entity_id: sensor.living_room_fp2_light_sensor_light_level
below: input_number.low_light_threshold
id: Low Light
for:
seconds: 20
trigger: numeric_state
- entity_id: sensor.living_room_fp2_light_sensor_light_level
above: input_number.upper_light_threshold_level
id: Good Light
for:
seconds: 20
trigger: numeric_state
- entity_id:
- switch.living_room_tv
from: 'off'
to: 'on'
id: TV on
trigger: state
- entity_id:
- switch.living_room_tv
from: 'on'
to: 'off'
id: TV off
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- sunrise
- condition: state
entity_id: input_boolean.we_are_in_bed
state: 'off'
sequence:
- action: scene.create
data:
scene_id: before_sunrise
snapshot_entities:
- light.bed_lamps_3
- light.stair_lights_2
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.floor_lamp_pro_1
- light.xmas_string_lights_3_2
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- parallel:
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 5
effect: Sunrise
action: light.turn_on
- target:
entity_id:
- light.govee_glide_left_2
- light.glide_lights_right_2
data:
brightness_pct: 5
effect: Sunrise
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 50
effect: Sunrise
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Sunrise
action: light.turn_on
alias: Set lights to sunrise setting.
- action: script.update_govee_scene_tracker
data:
new_scene: Sunrise
- delay:
minutes: 30
- action: scene.turn_on
target:
entity_id: scene.before_sunrise
data: {}
- conditions:
- condition: trigger
id:
- Lunchtime
sequence:
- parallel:
- target:
entity_id:
- light.glide_lights_right_2
- light.govee_glide_left_2
data:
brightness_pct: 1
effect: Forest
action: light.turn_on
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 20
effect: Spring
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 50
effect: Spring
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Forest
action: light.turn_on
- data:
effect: Forest
action: light.turn_on
target:
entity_id: light.corner_lamp_2
alias: Set lights to lunchtime effects.
- action: script.update_govee_scene_tracker
data:
new_scene: Lunchtime
- delay:
hours: 0
minutes: 0
seconds: 20
- condition: state
entity_id: binary_sensor.living_room_occupied
state: 'off'
- action: light.turn_off
target:
entity_id:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- Afternoon
sequence:
- parallel:
- target:
entity_id:
- light.glide_lights_right_2
- light.govee_glide_left_2
data:
brightness_pct: 1
effect: Rustling Leaves
action: light.turn_on
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 10
effect: Rustling Leaves
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 50
effect: Rustling Leaves
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Forest
action: light.turn_on
- data:
effect: Forest
action: light.turn_on
target:
entity_id: light.corner_lamp_2
alias: Set lights to Afternoon effects.
- action: script.update_govee_scene_tracker
data:
new_scene: Afternoon
- delay:
hours: 0
minutes: 0
seconds: 20
- condition: state
entity_id: binary_sensor.living_room_occupied
state: 'off'
- action: light.turn_off
target:
entity_id:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- Dinnertime
sequence:
- parallel:
- target:
entity_id:
- light.glide_lights_right_2
- light.govee_glide_left_2
data:
brightness_pct: 1
effect: Candlelight
action: light.turn_on
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 1
effect: Fall
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 20
effect: Fall
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Twilight
action: light.turn_on
- data:
effect: Forest
action: light.turn_on
target:
entity_id: light.corner_lamp_2
alias: Set lights to Dinnertime effects.
- action: script.update_govee_scene_tracker
data:
new_scene: Dinnertime
- delay:
hours: 0
minutes: 0
seconds: 20
- condition: state
entity_id: binary_sensor.living_room_occupied
state: 'off'
- action: light.turn_off
target:
entity_id:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- Evening
sequence:
- parallel:
- target:
entity_id:
- light.glide_lights_right_2
- light.govee_glide_left_2
data:
brightness_pct: 1
effect: Fire
action: light.turn_on
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 5
effect: Fall
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 50
effect: Fire
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Fire
action: light.turn_on
- data:
effect: Forest
action: light.turn_on
target:
entity_id: light.corner_lamp_2
alias: Set lights to Evening effects.
- action: script.update_govee_scene_tracker
data:
new_scene: Evening
- delay:
hours: 0
minutes: 0
seconds: 20
- condition: state
entity_id: binary_sensor.living_room_occupied
state: 'off'
- action: light.turn_off
target:
entity_id:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- sunset
- condition: state
entity_id: input_boolean.we_are_in_bed
state: 'off'
sequence:
- parallel:
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 5
effect: Warm
action: light.turn_on
- target:
entity_id:
- light.govee_glide_left_2
- light.glide_lights_right_2
data:
brightness_pct: 5
effect: Sunset Glow
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 50
effect: Warm
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Sunset
action: light.turn_on
alias: Set lights to Sunset effects.
- action: script.update_govee_scene_tracker
data:
new_scene: Sunset
- delay:
minutes: 30
- alias: If afternoon reapply scene else apply evening
if:
- condition: state
entity_id: binary_sensor.afternoon
state: 'on'
then:
- action: scene.turn_on
target:
entity_id:
- scene.afternoon_govee
data: {}
- action: script.update_govee_scene_tracker
data:
new_scene: Afternoon
else:
- parallel:
- target:
entity_id:
- light.glide_lights_right_2
- light.govee_glide_left_2
data:
brightness_pct: 1
effect: Fire
action: light.turn_on
- target:
entity_id:
- light.stair_lights_2
- light.bed_lamps_3
data:
brightness_pct: 5
effect: Fall
action: light.turn_on
- target:
entity_id: light.xmas_string_lights_3_2
data:
brightness_pct: 20
effect: Fire
action: light.turn_on
- target:
entity_id:
- light.floor_lamp_pro_1
data:
brightness_pct: 5
effect: Fire
action: light.turn_on
alias: Set lights to Evening effects.
- action: script.update_govee_scene_tracker
data:
new_scene: Evening
- conditions:
- condition: trigger
id: Low Light
- condition: state
entity_id: switch.living_room_tv
state: 'on'
sequence:
- data: {}
target:
entity_id: light.dreamview_g1_pro_2
action: light.turn_on
- conditions:
- condition: trigger
id: Good Light
- condition: state
entity_id: switch.living_room_tv
state: 'on'
sequence:
- data: {}
target:
entity_id: light.dreamview_g1_pro_2
action: light.turn_off
- conditions:
- condition: trigger
id:
- TV on
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.day
state: 'off'
- condition: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
below: input_number.low_light_threshold
sequence:
- target:
entity_id: light.dreamview_g1_pro_2
data: {}
action: light.turn_on
- conditions:
- condition: trigger
id:
- TV off
- condition: state
entity_id: light.dreamview_g1_pro_2
state: 'on'
sequence:
- target:
entity_id: light.dreamview_g1_pro_2
data: {}
action: light.turn_off
mode: parallel
- alias: HEATING - All Automations
description: Detects when a window is open or closed and sets heating on or off
in that room. Detects when no-one is home and turns heating off.
trigger:
- platform: state
entity_id:
- person.david_forrester
from: home
to: not_home
for:
hours: 0
minutes: 2
seconds: 0
id: Dave Away
- platform: state
entity_id:
- person.david_forrester
from: not_home
to: home
for:
hours: 0
minutes: 2
seconds: 0
id: Dave Home
- platform: state
entity_id:
- person.gem_forrester
from: home
to: not_home
for:
hours: 0
minutes: 2
seconds: 0
id: Gem Away
- platform: state
entity_id:
- person.gem_forrester
from: not_home
to: home
for:
hours: 0
minutes: 2
seconds: 0
id: Gem Home
- platform: state
entity_id:
- binary_sensor.front_door_sense_contact
- binary_sensor.back_door_sensor_contact
- binary_sensor.side_door_sensor_contact
- binary_sensor.kitchen_window_left_contact
- binary_sensor.kitchen_window_right_contact
- binary_sensor.living_room_window_left_contact
- binary_sensor.living_room_window_right_contact
- binary_sensor.hallway_window_contact
to: 'on'
id: Downstairs Door or Window Open
for:
hours: 0
minutes: 0
seconds: 30
- platform: state
entity_id:
- binary_sensor.front_door_sense_contact
- binary_sensor.back_door_sensor_contact
- binary_sensor.side_door_sensor_contact
- binary_sensor.kitchen_window_left_contact
- binary_sensor.kitchen_window_right_contact
- binary_sensor.living_room_window_left_contact
- binary_sensor.living_room_window_right_contact
- binary_sensor.hallway_window_contact
to: 'off'
id: Downstairs Door or Window Closed
- type: opened
platform: device
device_id: e6ba853c7dec9cf8415d6881aa429444
entity_id: binary_sensor.dining_room_window_right_contact
domain: binary_sensor
id: Dining Room Window Right Open
- type: not_opened
platform: device
device_id: e6ba853c7dec9cf8415d6881aa429444
entity_id: binary_sensor.dining_room_window_right_contact
domain: binary_sensor
id: Dining Room Window Right Closed
- type: opened
platform: device
device_id: f9aaa501ddaeabde9538648caab6c975
entity_id: binary_sensor.cloakroom_window_contact
domain: binary_sensor
id: Cloakroom Window Open
- type: not_opened
platform: device
device_id: f9aaa501ddaeabde9538648caab6c975
entity_id: binary_sensor.cloakroom_window_contact
domain: binary_sensor
id: Cloakroom Window Closed
- type: opened
platform: device
device_id: 5af72a1353a555c5830dcba725c7cf23
entity_id: binary_sensor.en_suite_window_sensor_contact
domain: binary_sensor
id: En-Suite Window Open
- type: not_opened
platform: device
device_id: 5af72a1353a555c5830dcba725c7cf23
entity_id: binary_sensor.en_suite_window_sensor_contact
domain: binary_sensor
id: En-Suite Window Closed
- type: opened
platform: device
device_id: 13a27670b56ff35704df9339e2a668a1
entity_id: binary_sensor.office_window_sensor_contact
domain: binary_sensor
id: Office Window Open
- type: not_opened
platform: device
device_id: 13a27670b56ff35704df9339e2a668a1
entity_id: binary_sensor.office_window_sensor_contact
domain: binary_sensor
id: Office Window Closed
- platform: state
entity_id:
- binary_sensor.main_bedroom_window_left_contact
- binary_sensor.main_bedroom_window_right_contact
to: 'on'
id: Bedroom Window Open
- platform: state
entity_id:
- binary_sensor.main_bedroom_window_left_contact
- binary_sensor.main_bedroom_window_right_contact
to: 'off'
id: Bedroom Window Closed
- platform: state
entity_id:
- binary_sensor.guest_bedroom_window_left_contact
- binary_sensor.guest_bedroom_window_right_contact
id: Guest Bedroom Window Open
to: 'on'
- platform: state
entity_id:
- binary_sensor.guest_bedroom_window_left_contact
- binary_sensor.guest_bedroom_window_right_contact
to: 'off'
id: Guest Bedroom Window Closed
- platform: state
entity_id:
- binary_sensor.sean_s_bedroom_window_left_contact
- binary_sensor.sean_s_bedroom_window_right_contact
- binary_sensor.jamie_s_bedroom_window_left_contact
- binary_sensor.bathroom_window_contact
- binary_sensor.jamie_s_bedroom_window_right_contact
to: 'on'
id: Upstairs Windows Open
- platform: state
entity_id:
- binary_sensor.sean_s_bedroom_window_left_contact
- binary_sensor.sean_s_bedroom_window_right_contact
- binary_sensor.bathroom_window_contact
- binary_sensor.jamie_s_bedroom_window_left_contact
- binary_sensor.jamie_s_bedroom_window_right_contact
to: 'off'
id: Upstairs Windows Closed
- platform: state
entity_id:
- binary_sensor.kids_bathroom_window_left_contact
- binary_sensor.kids_bathroom_window_right_contact
to: 'on'
id: Kids Bathroom Window Open
- platform: state
entity_id:
- binary_sensor.kids_bathroom_window_left_contact
- binary_sensor.kids_bathroom_window_right_contact
to: 'off'
id: Kids Bathroom Window Closed
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Dave Away
- condition: state
entity_id: person.gem_forrester
state: not_home
- condition: or
conditions:
- condition: state
entity_id: input_select.desired_heating_mode
state: 'On'
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
sequence:
- service: script.heating_turn_off_all_radiators
data: {}
- conditions:
- condition: trigger
id: Gem Away
- condition: state
entity_id: person.david_forrester
state: not_home
- condition: or
conditions:
- condition: state
entity_id: input_select.desired_heating_mode
state: 'On'
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
sequence:
- service: script.heating_turn_off_all_radiators
data: {}
- conditions:
- condition: trigger
id: Dave Home
- condition: state
entity_id: person.gem_forrester
state: not_home
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
sequence:
- service: script.heating_resume_schedule_all_radiators
data: {}
- conditions:
- condition: trigger
id: Gem Home
- condition: state
entity_id: person.david_forrester
state: not_home
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
sequence:
- service: script.heating_resume_schedule_all_radiators
data: {}
- conditions:
- condition: trigger
id: Downstairs Door or Window Open
- condition: or
conditions:
- condition: device
device_id: 84daad158322931a2b14ee69a6a9c8f5
domain: climate
entity_id: climate.downstairs
type: is_hvac_mode
hvac_mode: auto
- condition: device
device_id: 84daad158322931a2b14ee69a6a9c8f5
domain: climate
entity_id: climate.downstairs
type: is_hvac_mode
hvac_mode: heat
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
alias: Turn off heating downstairs
target:
entity_id: climate.downstairs
- conditions:
- condition: trigger
id: Downstairs Door or Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id: climate.downstairs
- conditions:
- condition: trigger
id: Cloakroom Window Open
- condition: or
conditions:
- condition: device
device_id: 2fe808a84c082db3968a4d856fe6e8ef
domain: climate
entity_id: climate.cloakroom
type: is_hvac_mode
hvac_mode: auto
- condition: device
device_id: 2fe808a84c082db3968a4d856fe6e8ef
domain: climate
entity_id: climate.cloakroom
type: is_hvac_mode
hvac_mode: heat
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.cloakroom
- conditions:
- condition: trigger
id: Cloakroom Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id: climate.cloakroom
- conditions:
- condition: trigger
id: En-Suite Window Open
- condition: or
conditions:
- condition: device
device_id: 2912cee70e19436c9d6795287d1cf8c9
domain: climate
entity_id: climate.en_suite_bathroom
type: is_hvac_mode
hvac_mode: auto
- condition: device
device_id: 2912cee70e19436c9d6795287d1cf8c9
domain: climate
entity_id: climate.en_suite_bathroom
type: is_hvac_mode
hvac_mode: heat
alias: Heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.en_suite_bathroom
- conditions:
- condition: trigger
id: En-Suite Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id: climate.en_suite_bathroom
- conditions:
- condition: trigger
id: Office Window Open
- condition: or
conditions:
- condition: device
device_id: 71a6edc5565513cdbe48f2b5c45189fa
domain: climate
entity_id: climate.office
type: is_hvac_mode
hvac_mode: auto
- condition: device
device_id: 71a6edc5565513cdbe48f2b5c45189fa
domain: climate
entity_id: climate.office
type: is_hvac_mode
hvac_mode: heat
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.office
- conditions:
- condition: trigger
id: Office Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id: climate.office
- conditions:
- condition: trigger
id: Bedroom Window Open
- condition: or
conditions:
- condition: device
device_id: 5b51bb0d00f12ec04c45d29296b6b9ee
domain: climate
entity_id: climate.master_bedroom
type: is_hvac_mode
hvac_mode: heat
- condition: device
device_id: 5b51bb0d00f12ec04c45d29296b6b9ee
domain: climate
entity_id: climate.master_bedroom
type: is_hvac_mode
hvac_mode: auto
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.master_bedroom
- conditions:
- condition: trigger
id: Bedroom Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id:
- climate.master_bedroom
- conditions:
- condition: trigger
id: Guest Bedroom Window Open
- condition: or
conditions:
- condition: device
device_id: bc71698349b1224d4f591b0d87542cb5
domain: climate
entity_id: climate.guest_bedroom
type: is_hvac_mode
hvac_mode: heat
- condition: device
device_id: bc71698349b1224d4f591b0d87542cb5
domain: climate
entity_id: climate.guest_bedroom
type: is_hvac_mode
hvac_mode: auto
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id:
- climate.guest_bedroom
- conditions:
- condition: trigger
id: Guest Bedroom Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id:
- climate.guest_bedroom
- conditions:
- condition: trigger
id: Upstairs Windows Open
- condition: or
conditions:
- condition: device
device_id: 4815bc131fac9883b8fc60472f8ac3e2
domain: climate
entity_id: climate.upstairs
type: is_hvac_mode
hvac_mode: heat
- condition: device
device_id: 4815bc131fac9883b8fc60472f8ac3e2
domain: climate
entity_id: climate.upstairs
type: is_hvac_mode
hvac_mode: auto
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id:
- climate.upstairs
- conditions:
- condition: trigger
id: Upstairs Windows Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id:
- climate.upstairs
- conditions:
- condition: trigger
id: Kids Bathroom Window Open
- condition: or
conditions:
- condition: device
device_id: 4815bc131fac9883b8fc60472f8ac3e2
domain: climate
entity_id: climate.kids_bathroom
type: is_hvac_mode
hvac_mode: heat
- condition: device
device_id: 4815bc131fac9883b8fc60472f8ac3e2
domain: climate
entity_id: climate.kids_bathroom
type: is_hvac_mode
hvac_mode: auto
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.kids_bathroom
- conditions:
- condition: trigger
id: Kids Bathroom Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id:
- climate.kids_bathroom
mode: restart
- alias: All Lights Automation
description: Turns on/off lights with presence, light level, door or time
trigger:
- platform: state
entity_id:
- binary_sensor.camera_hub_g3_ddd9_motion_sensor
- binary_sensor.dining_room_presence_sensor_occupancy
- binary_sensor.hallway_camera_cell_motion_detection
- binary_sensor.lower_landing_motion_occupancy
- binary_sensor.seans_room_camera_cell_motion_detection
- binary_sensor.jamie_s_room_cam_cell_motion_detection
- binary_sensor.guest_bedroom_camera_cell_motion_detection
- binary_sensor.guest_bedroom_motion_occupancy
- binary_sensor.main_bedroom_fp2_presence_sensor_1
- binary_sensor.main_bedroom_fp2_presence_sensor_2
- binary_sensor.main_bedroom_fp2_presence_sensor_3
- binary_sensor.main_bedroom_fp2_presence_sensor_4
- binary_sensor.office_presence_sensor_occupancy
- binary_sensor.cloakroom_presence_occupancy
- binary_sensor.jack_and_jill_presence_occupancy
- binary_sensor.upper_landing_presence_occupancy
from: 'off'
to: 'on'
id: Motion
- platform: state
entity_id:
- binary_sensor.camera_hub_g3_ddd9_motion_sensor
- binary_sensor.dining_room_presence_sensor_occupancy
- binary_sensor.hallway_camera_cell_motion_detection
- binary_sensor.lower_landing_motion_occupancy
- binary_sensor.seans_room_camera_cell_motion_detection
- binary_sensor.jamie_s_room_cam_cell_motion_detection
- binary_sensor.guest_bedroom_camera_cell_motion_detection
- binary_sensor.guest_bedroom_motion_occupancy
- binary_sensor.main_bedroom_fp2_presence_sensor_1
- binary_sensor.main_bedroom_fp2_presence_sensor_2
- binary_sensor.main_bedroom_fp2_presence_sensor_3
- binary_sensor.main_bedroom_fp2_presence_sensor_4
- binary_sensor.office_presence_sensor_occupancy
- binary_sensor.cloakroom_presence_occupancy
- binary_sensor.jack_and_jill_presence_occupancy
- binary_sensor.upper_landing_presence_occupancy
for:
hours: 0
minutes: 2
seconds: 0
from: 'on'
to: 'off'
id: No Motion
- platform: numeric_state
entity_id:
- sensor.living_room_fp2_light_sensor_light_level
- sensor.main_bedroom_fp2_light_sensor_light_level
- sensor.average_light_level_downstairs
- sensor.average_light_level_upstairs
- sensor.average_indoor_light_level
- sensor.dining_room_presence_sensor_illuminance
- sensor.office_presence_sensor_illuminance_lux
- sensor.upper_landing_presence_illuminance_lux
- sensor.jack_and_jill_presence_illuminance_lux
below: 20
id: Low Light
- platform: numeric_state
entity_id:
- sensor.living_room_fp2_light_sensor_light_level
- sensor.main_bedroom_fp2_light_sensor_light_level
- sensor.average_light_level_downstairs
- sensor.average_light_level_upstairs
- sensor.average_indoor_light_level
- sensor.dining_room_presence_sensor_illuminance
- sensor.office_presence_sensor_illuminance_lux
- sensor.upper_landing_presence_illuminance_lux
- sensor.jack_and_jill_presence_illuminance_lux
above: 80
id: Good Light
- platform: state
entity_id:
- binary_sensor.garage_door_left_contact
- binary_sensor.garage_door_right_contact
- binary_sensor.loft_hatch_sensor_contact
- binary_sensor.back_door_sensor_contact
from: 'off'
to: 'on'
id: Door Open
- platform: state
entity_id:
- binary_sensor.garage_door_left_contact
- binary_sensor.garage_door_right_contact
- binary_sensor.loft_hatch_sensor_contact
- binary_sensor.back_door_sensor_contact
from: 'on'
to: 'off'
id: Door Closed
- platform: device
type: turned_on
device_id: 621f8db4e2d03a6d1cb101ec3be46e7a
entity_id: switch.cloakroom_light
domain: switch
id: Cloakroom light on
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.cloakroom_light
id: Cloakroom Light off
alias: Cloakroom Light off with Timer
- platform: state
entity_id:
- binary_sensor.lights_out
from: 'off'
to: 'on'
id: Lights Out
- platform: sun
event: sunset
offset: -00:30:00
id: Dusk
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- choose:
- conditions:
- condition: trigger
id:
- Door Open
- condition: template
value_template: '{{ "Loft" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Loft Hatch
- condition: state
entity_id: light.loft_light
state: 'off'
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.loft_light
- conditions:
- condition: trigger
id:
- Door Closed
- condition: template
value_template: '{{ "Loft" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Loft Hatch
- condition: state
entity_id: light.loft_light
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.loft_light
- conditions:
- condition: trigger
id:
- Cloakroom light on
sequence:
- service: timer.start
data: {}
target:
entity_id: timer.cloakroom_light
- conditions:
- condition: trigger
id:
- Cloakroom Light off
- condition: state
entity_id: light.cloakroom_light_2
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.cloakroom_light_2
- conditions:
- condition: trigger
id:
- Door Open
- condition: template
value_template: '{{"Garage" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Garage Doors
- condition: state
entity_id: light.garage_lights
state: 'off'
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.garage_lights
- conditions:
- condition: trigger
id:
- Door Closed
- condition: template
value_template: '{{"Garage Door Right" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Garage Door Right
- condition: state
entity_id: binary_sensor.garage_door_left_contact
state: 'off'
- condition: state
entity_id: light.garage_lights
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.garage_lights
- conditions:
- condition: trigger
id:
- Door Closed
- condition: template
value_template: '{{"Garage Door Left" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Garage Door Left
- condition: state
entity_id: binary_sensor.garage_door_right_contact
state: 'off'
- condition: state
entity_id: light.garage_lights
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.garage_lights
- conditions:
- condition: trigger
id:
- Door Open
- condition: template
value_template: '{{"Back" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Back Door
- condition: sun
after: sunset
before: sunrise
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 75
target:
entity_id: light.back_door_light
- conditions:
- condition: trigger
id:
- Door Closed
- condition: template
value_template: '{{"Back" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Back Door
- condition: state
entity_id: light.back_door_light
state: 'on'
sequence:
- service: light.turn_off
data:
transition: 300
target:
entity_id: light.back_door_light
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Guest" in trigger.to_state.attributes.friendly_name }}'
alias: 'Filter Guest Bedroom '
- condition: state
entity_id: binary_sensor.lights_out
state: 'off'
- condition: numeric_state
entity_id: sensor.average_light_level_upstairs
below: 20
- condition: state
entity_id: input_boolean.guest_bedroom_bedside_lamps_active
state: 'on'
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 5
target:
entity_id: light.guest_bedroom_bedside_lamp_left
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 5
target:
entity_id: light.guest_bedroom_bedside_lamp_right
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Guest" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Guest Bedroom
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_left
state: 'on'
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_right
state: 'on'
- condition: state
entity_id: input_boolean.room_occupied_guest_bedroom
state: 'off'
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.guest_bedroom_bedside_lamp_left
- light.guest_bedroom_bedside_lamp_right
- conditions:
- condition: trigger
id:
- Motion
- condition: or
conditions:
- condition: template
value_template: '{{"Lower" in trigger.to_state.attributes.friendly_name
}}'
- condition: template
value_template: '{{"Upper" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Upper or Lower Landing
- condition: numeric_state
entity_id: sensor.average_light_level_upstairs
below: 20
- condition: state
entity_id: binary_sensor.lights_out
state: 'off'
- condition: state
entity_id: light.landing_lights
state: 'off'
- condition: time
after: 07:00:00
before: '22:00:00'
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 15
target:
entity_id: light.landing_lights
- conditions:
- condition: trigger
id:
- No Motion
- condition: or
conditions:
- condition: template
value_template: '{{"Lower" in trigger.to_state.attributes.friendly_name
}}'
- condition: template
value_template: '{{"Upper" in trigger.to_state.attributes.friendly_name
}}'
alias: 'Filter Upper or Lower Landing '
- condition: state
entity_id: light.landing_lights
state: 'on'
- condition: state
entity_id: input_boolean.lower_landing_occupancy
state: 'off'
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.landing_lights
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Daves" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Dave's Side of Bed
- condition: numeric_state
entity_id: sensor.main_bedroom_fp2_light_sensor_light_level
below: 20
- condition: state
entity_id: binary_sensor.lights_out
state: 'off'
- condition: state
entity_id: input_boolean.main_bedroom_bedside_lamps_active
state: 'on'
sequence:
- service: switch.turn_on
data: {}
target:
entity_id: switch.daddys_bedside_lamp_socket_1
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Gem" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Gem's Side of Bed
- condition: numeric_state
entity_id: sensor.main_bedroom_fp2_light_sensor_light_level
below: 20
- condition: state
entity_id: binary_sensor.lights_out
state: 'off'
- condition: state
entity_id: input_boolean.main_bedroom_bedside_lamps_active
state: 'on'
sequence:
- service: switch.turn_on
data: {}
target:
entity_id: switch.mummys_bedside_lamp_socket_1
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Daves" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Dave's Side of Bed
- condition: state
entity_id: switch.daddys_bedside_lamp_socket_1
state: 'on'
- condition: state
entity_id: input_boolean.dad_s_side_of_bed_occupied
state: 'off'
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.daddys_bedside_lamp_socket_1
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Gem" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Gem's Side of Bed
- condition: state
entity_id: switch.mummys_bedside_lamp_socket_1
state: 'on'
- condition: state
entity_id: input_boolean.mum_s_side_of_bed_occupied
state: 'off'
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.mummys_bedside_lamp_socket_1
- conditions:
- condition: trigger
id:
- Dusk
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
sequence:
- if:
- condition: state
entity_id: switch.corner_lamp_local
state: 'off'
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.corner_lamp_local
- service: light.turn_on
data: {}
target:
entity_id: light.stair_lights
- service: switch.turn_on
data: {}
target:
entity_id: switch.under_shelf_lights_local
- service: light.turn_on
data: {}
target:
entity_id: light.bed_lamps
- if:
- condition: state
entity_id: switch.standard_lamp_socket_1
state: 'off'
then:
- service: switch.turn_on
data: {}
target:
entity_id: switch.standard_lamp_socket_1
- if:
- condition: state
entity_id: switch.living_room_tv
state: 'on'
then:
- service: light.turn_on
data: {}
target:
entity_id: light.dreamview_g1_pro
- conditions:
- condition: trigger
id:
- Lights Out
sequence:
- if:
- condition: state
entity_id: light.corner_lamp
state: 'on'
- condition: state
entity_id: input_boolean.living_room_occupied
state: 'off'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.corner_lamp
- if:
- condition: state
entity_id: light.standard_lamp
state: 'on'
- condition: state
entity_id: input_boolean.room_occupied_hallway
state: 'off'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.standard_lamp
- if:
- condition: state
entity_id: switch.under_shelf_lights_local
state: 'on'
- condition: state
entity_id: input_boolean.room_occupied_kitchen
state: 'off'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.under_shelf_lights_local
- if:
- condition: state
entity_id: light.dreamview_g1_pro
state: 'on'
- condition: state
entity_id: switch.living_room_tv
state: 'off'
- condition: state
entity_id: input_boolean.living_room_occupied
state: 'off'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.dreamview_g1_pro
- if:
- condition: state
entity_id: light.back_door_light
state: 'on'
- condition: state
entity_id: binary_sensor.back_door_sensor_contact
state: 'off'
- condition: state
entity_id: input_boolean.room_occupied_kitchen
state: 'off'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.back_door_light
- if:
- condition: state
entity_id: light.landing_lights
state: 'on'
- condition: state
entity_id: input_boolean.lower_landing_occupancy
state: 'off'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.landing_lights
- if:
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_left
state: 'on'
- condition: state
entity_id: input_boolean.room_occupied_guest_bedroom
state: 'on'
then:
- service: light.turn_off
data: {}
target:
entity_id:
- light.guest_bedroom_bedside_lamp_left
- light.guest_bedroom_bedside_lamp_right
- if:
- condition: state
entity_id: switch.daddys_bedside_lamp_socket_1
state: 'on'
- condition: state
entity_id: binary_sensor.main_bedroom_fp2_presence_sensor_2
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.daddys_bedside_lamp_socket_1
- if:
- condition: state
entity_id: switch.mummys_bedside_lamp_socket_1
state: 'on'
- condition: state
entity_id: binary_sensor.main_bedroom_fp2_presence_sensor_3
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.mummys_bedside_lamp_socket_1
- conditions:
- condition: trigger
id:
- Good Light
- condition: template
value_template: '{{"Living" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Living Room
- condition: state
entity_id: light.corner_lamp
state: 'on'
- condition: state
entity_id: light.standard_lamp
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.corner_lamp
- light.standard_lamp
- conditions:
- condition: trigger
id:
- Good Light
- condition: template
value_template: '{{"Main" in trigger.to_state.attributes.friendly_name }}'
alias: 'Filter Main Bedroom '
sequence:
- if:
- condition: state
entity_id: switch.daddys_bedside_lamp_socket_1
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.daddys_bedside_lamp_socket_1
alias: If Daddy's Bedside Lamp is on, turn it off
- if:
- condition: state
entity_id: switch.mummys_bedside_lamp_socket_1
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.mummys_bedside_lamp_socket_1
alias: If mummy's Bedside Lamp is on, turn it off
- conditions:
- condition: trigger
id:
- Good Light
- condition: template
value_template: '{{"Upstairs" in trigger.to_state.attributes.friendly_name
}}'
alias: 'Filter upstairs '
sequence:
- if:
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_left
state: 'on'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.guest_bedroom_bedside_lamp_left
alias: If Bedside Lamp Left is on, turn it off
- if:
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_right
state: 'on'
then:
- service: light.turn_off
data: {}
target:
entity_id:
- light.guest_bedroom_bedside_lamp_right
alias: If Bedside Lamp Right is on, turn it off
- conditions:
- condition: trigger
id:
- Good Light
- condition: template
value_template: '{{"Upstairs" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Upstairs
- condition: state
entity_id: light.landing_lights
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.landing_lights
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Cloakroom" in trigger.to_state.attributes.friendly_name
}}'
alias: 'Filter Cloakroom '
- condition: state
entity_id: light.cloakroom_light_2
state: 'off'
- condition: numeric_state
entity_id: sensor.average_light_level_downstairs
below: 20
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.cloakroom_light_2
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Cloakroom" in trigger.to_state.attributes.friendly_name
}}'
alias: 'Filter Cloakroom '
- condition: state
entity_id: light.cloakroom_light_2
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.cloakroom_light_2
- conditions:
- condition: trigger
id:
- Low Light
- condition: template
value_template: '{{"Living" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Living Room
- condition: state
entity_id: light.corner_lamp
state: 'off'
sequence:
- service: light.turn_on
data: {}
target:
entity_id:
- light.corner_lamp
- light.standard_lamp
mode: restart
- alias: All Presence and Occupancy
description: Set room presence and room occupancy based on motion and presence.
trigger:
- platform: state
entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_1
- binary_sensor.kitchen_presence_sensor_presence_sensor_2
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_3
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_4
- binary_sensor.dining_room_presence_sensor_occupancy
- binary_sensor.living_room_fp2_presence_sensor_1
- binary_sensor.hallway_camera_cell_motion_detection
- binary_sensor.lower_landing_motion_occupancy
- binary_sensor.seans_room_camera_cell_motion_detection
- binary_sensor.jamie_s_room_cam_cell_motion_detection
- binary_sensor.guest_bedroom_camera_cell_motion_detection
- binary_sensor.guest_bedroom_motion_occupancy
- binary_sensor.main_bedroom_fp2_presence_sensor_1
- binary_sensor.main_bedroom_fp2_presence_sensor_4
- binary_sensor.office_presence_sensor_occupancy
- binary_sensor.cloakroom_presence_occupancy
- binary_sensor.main_bathroom_presence_occupancy
- binary_sensor.jack_and_jill_presence_occupancy
- binary_sensor.upper_landing_presence_occupancy
- binary_sensor.garage_camera_cell_motion_detection_2
from: 'off'
to: 'on'
id: Motion
- platform: state
entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_1
- binary_sensor.kitchen_presence_sensor_presence_sensor_2
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_3
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_4
- binary_sensor.dining_room_presence_sensor_occupancy
- binary_sensor.living_room_fp2_presence_sensor_1
- binary_sensor.hallway_camera_cell_motion_detection
- binary_sensor.lower_landing_motion_occupancy
- binary_sensor.seans_room_camera_cell_motion_detection
- binary_sensor.jamie_s_room_cam_cell_motion_detection
- binary_sensor.guest_bedroom_camera_cell_motion_detection
- binary_sensor.guest_bedroom_motion_occupancy
- binary_sensor.main_bedroom_fp2_presence_sensor_1
- binary_sensor.main_bedroom_fp2_presence_sensor_4
- binary_sensor.office_presence_sensor_occupancy
- binary_sensor.cloakroom_presence_occupancy
- binary_sensor.main_bathroom_presence_occupancy
- binary_sensor.jack_and_jill_presence_occupancy
- binary_sensor.upper_landing_presence_occupancy
- binary_sensor.garage_camera_cell_motion_detection_2
from: 'on'
to: 'off'
id: No Motion
- platform: state
entity_id:
- media_player.kitchen_echo_show
- media_player.dave_s_echo_pop
- media_player.dave_s_2nd_echo_pop
- media_player.living_room_dot
- media_player.seans_room_dot
- media_player.dave_s_2nd_echo_pop_2
- media_player.guest_bedroom_echo_dot
- media_player.main_bedroom_dot
attribute: last_called
to: 'true'
id: Last Called Alexa
- platform: state
entity_id:
- switch.living_room_tv
- switch.ingrid_socket_1
- switch.casper_switch_0
from: 'off'
to: 'on'
id: TV Turned On
- platform: state
entity_id:
- binary_sensor.back_door_sensor_contact
- binary_sensor.front_door_sense_contact
- binary_sensor.side_door_sensor_contact
- binary_sensor.garage_door_left_contact
- binary_sensor.garage_door_right_contact
id: External Door Open
- platform: state
entity_id:
- binary_sensor.living_room_fp2_presence_sensor_2
- binary_sensor.living_room_fp2_presence_sensor_3
- binary_sensor.living_room_fp2_presence_sensor_4
- binary_sensor.main_bedroom_fp2_presence_sensor_2
- binary_sensor.main_bedroom_fp2_presence_sensor_3
- binary_sensor.living_room_fp2_presence_sensor_5
from: 'off'
to: 'on'
id: Chair or Bed Occupied
- platform: state
entity_id:
- binary_sensor.living_room_fp2_presence_sensor_2
- binary_sensor.living_room_fp2_presence_sensor_3
- binary_sensor.living_room_fp2_presence_sensor_4
- binary_sensor.main_bedroom_fp2_presence_sensor_2
- binary_sensor.main_bedroom_fp2_presence_sensor_3
- binary_sensor.living_room_fp2_presence_sensor_5
from: 'on'
to: 'off'
id: Chair or Bed Vacated
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Motion
- TV Turned On
- Last Called Alexa
- condition: template
value_template: '{{"Living" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Living Room
sequence:
- service: input_text.set_value
data:
value: living_room
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.living_room_occupied
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Living" in trigger.to_state.attributes.friendly_name }}'
alias: 'Filter Living Room '
- condition: state
entity_id: switch.living_room_tv
state: 'off'
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.living_room_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Occupied
- condition: template
value_template: '{{"Sofa" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Sofa
sequence:
- service: input_text.set_value
data:
value: living_room_sofa
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.living_room_sofa_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Vacated
- condition: template
value_template: '{{"Sofa" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Sofa
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.living_room_sofa_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Occupied
- condition: template
value_template: '{{"Recliner" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Recliner
sequence:
- service: input_text.set_value
data:
value: living_room_recliner
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.recliner_sofa_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Vacated
- condition: template
value_template: '{{"Recliner" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Recliner
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.recliner_sofa_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Occupied
- condition: template
value_template: '{{"Corner" in trigger.to_state.attributes.friendly_name }}'
alias: 'Filter Corner Chair '
sequence:
- service: input_text.set_value
data:
value: living_room_corner_chair
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.living_room_corner_chair_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Vacated
- condition: template
value_template: '{{"Corner" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Corner Chair
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.living_room_corner_chair_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Occupied
- condition: template
value_template: '{{"Desk" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Desk
sequence:
- service: input_text.set_value
data:
value: living_room_desk
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.living_room_desk_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Vacated
- condition: template
value_template: '{{"Desk" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Desk
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.living_room_desk_occupied
- conditions:
- condition: trigger
id:
- Motion
- Last Called Alexa
- TV Turned On
- condition: or
conditions:
- condition: template
value_template: '{{"Ingrid" in trigger.to_state.attributes.friendly_name}}'
alias: Filter Ingrid
- condition: template
value_template: '{{"Kitchen" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Kitchen
sequence:
- service: input_text.set_value
data:
value: kitchen
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_kitchen
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Kitchen" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Kitchen
- condition: state
entity_id: switch.ingrid_socket_1
state: 'off'
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_kitchen
- conditions:
- condition: trigger
id:
- Motion
- Last Called Alexa
- condition: template
value_template: '{{"Dining" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Dining Room
sequence:
- service: input_text.set_value
data:
value: dining_room
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_dining_room
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Dining" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Dining Room
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_dining_room
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Hallway" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Hallway
sequence:
- service: input_text.set_value
data:
value: hallway
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_hallway
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Hallway" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Hallway
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_hallway
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Lower" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Lower Landing
sequence:
- service: input_text.set_value
data:
value: lower_landing
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.lower_landing_occupancy
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Lower" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Lower Landing
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.lower_landing_occupancy
- conditions:
- condition: trigger
id:
- Motion
- Last Called Alexa
- condition: template
value_template: '{{"Main" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Main Bedroom
sequence:
- service: input_text.set_value
data:
value: main_bedroom
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_main_bedroom
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Main" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Main Bedroom
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_main_bedroom
- conditions:
- condition: trigger
id:
- Chair or Bed Occupied
- condition: template
value_template: '{{"Daves" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Dad's Side of Bed
sequence:
- service: input_text.set_value
data:
value: dads_side_of_bed
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.dad_s_side_of_bed_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Vacated
- condition: template
value_template: '{{"Daves" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Dad's Side of Bed
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.dad_s_side_of_bed_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Occupied
- condition: template
value_template: '{{"Gem" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Gem's Side of Bed
sequence:
- service: input_text.set_value
data:
value: mums_side_of_bed
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.mum_s_side_of_bed_occupied
- conditions:
- condition: trigger
id:
- Chair or Bed Vacated
- condition: template
value_template: '{{"Gem" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Gem's Side of Bed
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.mum_s_side_of_bed_occupied
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Suite" in trigger.to_state.attributes.friendly_name }}'
alias: Filter En-Suite Bathroom
sequence:
- service: input_text.set_value
data:
value: en_suite
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_en_suite_bathroom
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Suite" in trigger.to_state.attributes.friendly_name }}'
alias: Filter En-Suite Bathroom
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_en_suite_bathroom
- conditions:
- condition: trigger
id:
- Motion
- Last Called Alexa
- condition: template
value_template: '{{"Jamie" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Jamie's Room
sequence:
- service: input_text.set_value
data:
value: jamies_room
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_jamie_s_room
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Jamie" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Jamie's Room
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_jamie_s_room
- conditions:
- condition: trigger
id:
- Motion
- Last Called Alexa
- condition: template
value_template: '{{"Sean" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Sean's Room
sequence:
- service: input_text.set_value
data:
value: seans_room
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_sean_s_room
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Sean" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Sean's Room
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_sean_s_room
- conditions:
- condition: trigger
id:
- Motion
- Last Called Alexa
- condition: template
value_template: '{{"Guest" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Guest Bedroom
sequence:
- service: input_text.set_value
data:
value: guest_bedroom
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_guest_bedroom
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Guest" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Guest Bedroom
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_guest_bedroom
- conditions:
- condition: trigger
id:
- Motion
- Last Called Alexa
- condition: template
value_template: '{{"Office" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Office
sequence:
- service: input_text.set_value
data:
value: office
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_office
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Office" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Office
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_office
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Garage" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Garage
sequence:
- service: input_text.set_value
data:
value: garage
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_garage
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Garage" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Garage
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_garage
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Cloakroom" in trigger.to_state.attributes.friendly_name
}}'
alias: 'Filter Cloakroom '
sequence:
- service: input_text.set_value
data:
value: cloakroom
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_cloakroom
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Cloakroom" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Cloakroom
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_cloakroom
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Bathroom" in trigger.to_state.attributes.friendly_name}}'
alias: Filter Bathroom
sequence:
- service: input_text.set_value
data:
value: bathroom
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id:
- input_boolean.room_occupied_main_bathroom
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Bathroom" in trigger.to_state.attributes.friendly_name}}'
alias: Filter Main Bathroom
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_main_bathroom
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Upper" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Upper Landing
sequence:
- service: input_text.set_value
data:
value: upper_landing
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.upper_landing_occupied
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Upper" in trigger.to_state.attributes.friendly_name }}'
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.upper_landing_occupied
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Jack" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Kids Bathroom
sequence:
- service: input_text.set_value
data:
value: kids_bathroom
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.room_occupied_jack_jill
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Jack" in trigger.to_state.attributes.friendly_name }}'
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.room_occupied_jack_jill
- conditions:
- condition: trigger
id:
- Motion
- alias: Filter Kitchen Table
condition: template
value_template: '{{"Dinner" in trigger.to_state.attributes.friendly_name }}'
sequence:
- service: input_text.set_value
data:
value: kitchen_table
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.kitchen_table_occupied
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Dinner" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Kitchen Table
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.kitchen_table_occupied
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Back" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Back Door Zone
sequence:
- service: input_text.set_value
data:
value: back_door_zone
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.back_door_zone_occupied
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Back" in trigger.to_state.attributes.friendly_name }}'
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.back_door_zone_occupied
- conditions:
- condition: trigger
id:
- Motion
- condition: template
value_template: '{{"Utility" in trigger.to_state.attributes.friendly_name
}}'
alias: Filter Utility Room
sequence:
- service: input_text.set_value
data:
value: utility_room
target:
entity_id: input_text.room_presence
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.utility_room_occupied
- conditions:
- condition: trigger
id:
- No Motion
- condition: template
value_template: '{{"Utility" in trigger.to_state.attributes.friendly_name
}}'
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.utility_room_occupied
mode: restart
- alias: All Tablet Automations
description: ''
triggers:
- entity_id: sensor.sm_t736b_battery_state
to: full
id: Daves tablet charged
trigger: state
- entity_id: sensor.sm_t736b_battery_state
to: charging
id: Daves tablet charging
trigger: state
- entity_id: sensor.jamie_s_samsung_tablet_network_type
id: Jamie Network Type
trigger: state
- entity_id: sensor.jamie_s_samsung_tablet_battery_level
below: 10
id: Jamie Low Battery
trigger: numeric_state
- entity_id: sensor.jamie_s_samsung_tablet_battery_level
above: 99
id: Jamie Fully Charged
trigger: numeric_state
- entity_id: sensor.sean_s_samsung_galaxy_network_type
id: Sean Network Type
trigger: state
- entity_id: sensor.sean_s_samsung_galaxy_battery_level
below: 10
id: Sean Low Battery
trigger: numeric_state
- entity_id: sensor.sean_s_samsung_galaxy_battery_level
above: 99
id: Sean Fully Charged
trigger: numeric_state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Daves tablet charged
sequence:
- action: script.text_notify_dave
data:
title: TABLET CHARGED
message: Your tablet is charged.
- conditions:
- condition: trigger
id: Jamie Network Type
- condition: state
entity_id: person.jamie
state: home
sequence:
- action: script.text_notify_dave
data:
title: JAMIE TABLET
message: Jamie's tablet has changed network.
- conditions:
- condition: trigger
id: Jamie Low Battery
sequence:
- action: script.text_notify_dave
data:
title: JAMIE TABLET
message: Jamie's tablet needs charged.
- conditions:
- condition: trigger
id: Jamie Fully Charged
sequence:
- action: script.text_notify_dave
data:
title: JAMIE TABLET
message: Jamie's tablet is charged.
- conditions:
- condition: trigger
id: Sean Network Type
- condition: state
entity_id: person.sean
state: home
sequence:
- action: script.text_notify_dave
data:
title: SEAN TABLET
message: Sean's tablet has changed network.
- conditions:
- condition: trigger
id: Sean Low Battery
sequence:
- action: script.text_notify_dave
data:
title: SEAN TABLET
message: Sean's tablet needs charged.
- conditions:
- condition: trigger
id: Sean Fully Charged
sequence:
- action: script.text_notify_dave
data:
title: SEAN TABLET
message: Sean's tablet is charged.
mode: single
initial_state: true
- alias: All Tablet Automations V2.0
triggers:
- entity_id: sensor.sm_t736b_battery_state
to: full
id: dave_charged
trigger: state
- entity_id: sensor.sm_t736b_battery_state
to: charging
id: dave_charging
trigger: state
- entity_id: sensor.jamie_s_samsung_tablet_network_type
id: jamie_network
trigger: state
- entity_id: sensor.jamie_s_samsung_tablet_battery_level
below: 10
id: jamie_low_battery
trigger: numeric_state
- entity_id: sensor.jamie_s_samsung_tablet_battery_level
above: 99
id: jamie_charged
trigger: numeric_state
- entity_id: sensor.sean_s_samsung_galaxy_network_type
id: sean_network
trigger: state
- entity_id: sensor.sean_s_samsung_galaxy_battery_level
below: 10
id: sean_low_battery
trigger: numeric_state
- entity_id: sensor.sean_s_samsung_galaxy_battery_level
above: 99
id: sean_charged
trigger: numeric_state
- entity_id: sensor.jamie_s_samsung_tablet_battery_state
to: charging
id: jamie_now_charging
trigger: state
- entity_id: sensor.sean_s_samsung_galaxy_battery_state
to: charging
id: sean_now_charging
trigger: state
conditions:
- condition: or
conditions:
- condition: not
conditions:
- condition: template
value_template: '{{ trigger.id in [''jamie_network'', ''sean_network''] }}'
- condition: and
conditions:
- condition: template
value_template: '{{ trigger.id == ''jamie_network'' }}'
- condition: state
entity_id: person.jamie
state: home
- condition: and
conditions:
- condition: template
value_template: '{{ trigger.id == ''sean_network'' }}'
- condition: state
entity_id: person.sean
state: home
actions:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.id in [''jamie_now_charging'', ''sean_now_charging'']
}}'
sequence:
- data:
notification_id: "{% if trigger.id == 'jamie_now_charging' %}\n jamie_tablet_still_not_charging\n\
{% elif trigger.id == 'sean_now_charging' %}\n sean_tablet_still_not_charging\n\
{% endif %}\n"
action: persistent_notification.dismiss
- data:
title: '{% if trigger.id == ''dave_charged'' %}TABLET CHARGED {% elif trigger.id.startswith(''jamie'')
%}JAMIE TABLET {% elif trigger.id.startswith(''sean'') %}SEAN TABLET {% else
%}TABLET STATUS{% endif %}
'
message: "{% if trigger.id == 'dave_charged' %}\n Your tablet is charged.\n\
{% elif trigger.id == 'jamie_network' %}\n Jamie's tablet has changed network.\n\
{% elif trigger.id == 'jamie_low_battery' %}\n Jamie's tablet needs charged.\n\
{% elif trigger.id == 'jamie_charged' %}\n Jamie's tablet is charged.\n{%\
\ elif trigger.id == 'sean_network' %}\n Sean's tablet has changed network.\n\
{% elif trigger.id == 'sean_low_battery' %}\n Sean's tablet needs charged.\n\
{% elif trigger.id == 'sean_charged' %}\n Sean's tablet is charged.\n{% elif\
\ trigger.id == 'jamie_now_charging' %}\n Jamie's tablet has started charging.\n\
{% elif trigger.id == 'sean_now_charging' %}\n Sean's tablet has started\
\ charging.\n{% else %}Tablet status changed.{% endif %}\n"
action: script.text_notify_dave
- if:
- condition: template
value_template: '{{ trigger.id == ''jamie_low_battery'' }}'
then:
- delay: 00:10:00
- condition: state
entity_id: binary_sensor.jamie_s_samsung_tablet_is_charging
state: 'off'
- data:
title: Jamie's Tablet Still Not Charging
message: Jamie's tablet is still below 10% and hasn't been plugged in after
10 minutes.
notification_id: jamie_tablet_still_not_charging
action: persistent_notification.create
alias: Notify if Jamie's tablet is still not charging after 10 minutes
- if:
- condition: template
value_template: '{{ trigger.id == ''sean_low_battery'' }}'
then:
- delay: 00:10:00
- condition: state
entity_id: binary_sensor.sean_s_samsung_galaxy_is_charging
state: 'off'
- data:
title: Sean's Tablet Still Not Charging
message: Sean's tablet is still below 10% and hasn't been plugged in after
10 minutes.
notification_id: sean_tablet_still_not_charging
action: persistent_notification.create
alias: Notify if Sean's tablet is still not charging after 10 minutes
mode: single
initial_state: true
- input_datetime:
workday_wakeup_time:
name: Workday Wakeup Time
has_date: false
has_time: true
wakeup:
name: Wakeup Time
has_date: false
has_time: true
morning_report:
name: Morning Report
has_date: false
has_time: true
morning_report_earliest_time:
name: Morning Report Earliest Time
has_date: false
has_time: true
morning_report_latest_time:
name: Morning Report Latest Time
has_date: false
has_time: true
nightly_report:
name: Nightly Report
has_date: false
has_time: true
daily_report:
name: Daily Report
has_date: false
has_time: true
seans_morning_briefing:
name: Seans Morning Briefing
has_date: false
has_time: true
get_ready_for_schools_out:
name: Get Ready For Schools Out
has_date: false
has_time: true
input_boolean:
seans_morning_briefing_played:
name: Seans Morning Briefing Played
sean_dressed_first:
name: Sean Dressed First
announcement_playing:
name: Announcement Playing
icon: mdi:bullhorn
- alias: Audible Notifications
description: ''
trigger:
- platform: time
at: input_datetime.audible_notification_on
id: 'on'
- platform: time
at: input_datetime.audible_notification_off
id: 'off'
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: 'on'
- condition: state
entity_id: binary_sensor.family_home
state: 'on'
sequence:
- data: {}
target:
entity_id: input_boolean.audible_notifications
action: input_boolean.turn_on
- conditions:
- condition: trigger
id: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
sequence:
- data: {}
target:
entity_id: input_boolean.audible_notifications
action: input_boolean.turn_off
default: []
mode: single
- id: a3739bb0-632d-4526-bf82-ee4e27b80882
alias: Set Room With Alexa Presence
mode: restart
trigger:
- platform: state
entity_id: sensor.room_audio
action:
- action: input_text.set_value
data:
entity_id: input_text.room_with_alexa_presence
value: '{{ states(''sensor.room_audio'') }}'
- action: mqtt.publish
data:
topic: house/presence/current_room
payload: '{{ states(''sensor.room_audio'') }}'
retain: true
- action: mqtt.publish
data:
topic: house/presence/backup_room
payload: '{{ states(''input_text.room_presence'') }}'
retain: true
- id: 28c0e7a6-4024-48c9-a422-8b8ffc3a86d1
alias: Set Last Alexa Called Time
initial_state: true
trigger:
- platform: state
entity_id:
- media_player.kitchen_echo_show
- media_player.living_room_pop
- media_player.dining_room_pop
- media_player.main_bedroom_dot
- media_player.guest_bedroom_echo_dot
- media_player.office_pop
- media_player.jamie_s_room_dot
- media_player.sean_s_room_dot
condition:
- condition: template
value_template: '{{ trigger.to_state.attributes.last_called_timestamp | float
> trigger.from_state.attributes.last_called_timestamp | float }}'
action:
- action: input_datetime.set_datetime
target:
entity_id: input_datetime.last_time_alexa_called
data:
datetime: '{{ now().strftime(''%Y-%m-%d %H:%M:%S'') }}'
- alias: Aura Lamp
description: ''
triggers:
- event: sunset
id: Sunset
trigger: sun
enabled: true
- event: sunrise
id: Sunrise
trigger: sun
enabled: true
- trigger: state
entity_id:
- binary_sensor.morning
id: Morning
to: 'on'
from: 'off'
- trigger: state
entity_id:
- binary_sensor.lunchtime
id: Lunchtime
from: 'off'
to: 'on'
- trigger: state
entity_id:
- binary_sensor.afternoon
id: Afternoon
from: 'off'
to: 'on'
- trigger: state
entity_id:
- binary_sensor.dinner_time
id: Dinnertime
from: 'off'
to: 'on'
- trigger: state
entity_id:
- binary_sensor.evening
id: Evening
from: 'off'
to: 'on'
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Sunrise
sequence:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Sunrise
- delay:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
- if:
- condition: state
entity_id: input_boolean.washing_machine_finished
state: 'on'
then:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
rgb_color:
- 255
- 0
- 0
brightness_pct: 1
else:
- if:
- condition: state
entity_id: input_boolean.garage_dehumidifier_full
state: 'on'
then:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
rgb_color:
- 133
- 255
- 255
brightness_pct: 1
else:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Morning
- conditions:
- condition: trigger
id:
- Sunset
sequence:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Sunset
- delay:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
- if:
- condition: state
entity_id: binary_sensor.afternoon
state: 'on'
then:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Forest
else:
- if:
- condition: state
entity_id: binary_sensor.dinner_time
state: 'on'
then:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Eating Dots
else:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Firefly
- conditions:
- condition: trigger
id:
- Morning
sequence:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Morning
- conditions:
- condition: trigger
id:
- Lunchtime
sequence:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Falling Petals
- conditions:
- condition: trigger
id:
- Afternoon
sequence:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Forest
- conditions:
- condition: trigger
id:
- Dinnertime
sequence:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Eating Dots
- conditions:
- condition: trigger
id:
- Evening
sequence:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Firefly
mode: parallel
initial_state: true
- alias: Aurora Alert
description: ''
triggers:
- entity_id:
- sensor.aurora_aurora_visibility_visibility
above: 10
id: aurora on
trigger: numeric_state
- entity_id:
- sensor.aurora_aurora_visibility_visibility
below: 5
id: aurora off
trigger: numeric_state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: aurora on
sequence:
- action: script.text_notify_parents
metadata: {}
data:
title: AURORA ALERT - HIGHLY PROBABLE
message: There may be a visible aurora tonight
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- if:
- condition: state
entity_id: binary_sensor.dave_home
state: 'on'
then:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: Sorry to interrupt, but there is a good chance of seeing the
Northern Lights tonight.
else:
- action: script.jarvis_speech_engine_v3_0
data:
where: gem
message: Sorry to interrupt, but there is a good chance of seeing the
Northern Lights tonight.
alias: Announce if Dave or Gem is home.
- conditions:
- condition: trigger
id: aurora off
sequence:
- action: script.text_notify_parents
metadata: {}
data:
title: AURORA ALERT - ALERT OVER
message: That will be that for the Northern Lights then.
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- if:
- condition: state
entity_id: binary_sensor.dave_home
state: 'on'
then:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: Sorry to interrupt, but there is a good chance you missed the
Northern Lights tonight.
else:
- action: script.jarvis_speech_engine_v3_0
data:
where: gem
message: Sorry to interrupt, but there is a good chance you missed the
Northern Lights tonight.
alias: Announce if Dave or Gem is home.
mode: single
- alias: 'ESPHome: Update all ESPHome devices'
description: ''
triggers:
- trigger: template
value_template: '{{ integration_entities(''esphome'') | select(''match'',''^update.'')
| select(''is_state'',''on'') | list | count > 0 }}'
alias: When an ESPHome update is available
conditions: []
actions:
- action: script.esphome_update_all_esphome_devices
metadata: {}
data: {}
mode: single
- alias: Automations Control Automation
description: Turn on automations and activation toggles when needed
trigger:
- platform: time
at: '15:30:00'
id: Enable
- platform: time
at: '19:30:00'
id: Disable
- platform: state
entity_id:
- input_boolean.kids_bedtime_announcement_played
- input_boolean.school_morning_announcement_played
- input_boolean.school_pick_up_announcement_played
- input_boolean.morning_briefing_played
from: 'off'
to: 'on'
id: Toggle On
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Enable
sequence:
- service: automation.turn_on
data: {}
target:
entity_id: automation.get_desired_battery_discharge
- service: automation.turn_on
data: {}
target:
entity_id: automation.discharge_battery_to_desired
- conditions:
- condition: trigger
id:
- Disable
sequence:
- service: automation.turn_off
data:
stop_actions: true
target:
entity_id: automation.get_desired_battery_discharge
- service: automation.turn_off
data:
stop_actions: true
target:
entity_id: automation.discharge_battery_to_desired
- conditions:
- condition: trigger
id:
- Toggle On
- condition: template
value_template: '{{"Bedtime" in trigger.to_state.attributes.friendly_name}}'
alias: Filter Bedtime Announcement
sequence:
- if:
- condition: or
conditions:
- condition: state
entity_id: switch.daddys_bedside_lamp_socket_1
state: 'on'
- condition: state
entity_id: switch.mummys_bedside_lamp_socket_1
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.mummys_bedside_lamp_socket_1
- switch.daddys_bedside_lamp_socket_1
alias: Turn off the lamps if they are on.
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.main_bedroom_bedside_lamps_active
mode: single
- alias: Automations That Run When HA Starts or When Groups Reload
description: ''
mode: single
triggers:
- event: start
id: HA Start
trigger: homeassistant
- entity_id:
- group.kitchen_occupancy
to: unknown
id: Group Reset
trigger: state
conditions: []
actions:
- action: script.update_critical_battery_group_2
data: {}
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- action: script.update_rechargeable_battery_group
data: {}
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- action: script.update_srv_critical_battery_group
data: {}
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- action: script.update_occupancy_groups
data: {}
- alias: Guest Bedroom Lights with presence
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.guest_bedroom_motion_occupancy
from: 'off'
to: 'on'
id: Light on
- platform: state
entity_id:
- binary_sensor.guest_bedroom_motion_occupancy
from: 'on'
to: 'off'
id: Light off
for:
hours: 0
minutes: 1
seconds: 0
- platform: numeric_state
entity_id: sensor.upstairs_light_level
below: 20
id: Low Light
- platform: numeric_state
entity_id: sensor.upstairs_light_level
id: Good Light
above: 80
condition:
- condition: state
entity_id: input_boolean.guest_bedroom_bedside_lamps_active
state: 'on'
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
- condition: state
entity_id: binary_sensor.lights_out
state: 'off'
action:
- choose:
- conditions:
- condition: trigger
id: Light on
- condition: state
entity_id: binary_sensor.lights_out
state: 'off'
- condition: numeric_state
entity_id: sensor.average_light_level_upstairs
below: 20
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 5
target:
entity_id: light.guest_bedroom_bedside_lamp_left
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 5
target:
entity_id:
- light.guest_bedroom_bedside_lamp_right
- conditions:
- condition: trigger
id: Light off
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_left
state: 'on'
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_right
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.guest_bedroom_bedside_lamp_left
- light.guest_bedroom_bedside_lamp_right
- conditions:
- condition: trigger
id:
- Low Light
- condition: and
conditions:
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_left
state: 'off'
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_right
state: 'off'
- condition: state
entity_id: input_boolean.room_occupied_guest_bedroom
state: 'on'
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 50
target:
entity_id:
- light.guest_bedroom_bedside_lamp_left
- light.guest_bedroom_bedside_lamp_right
- conditions:
- condition: trigger
id:
- Good Light
- condition: state
entity_id: input_boolean.room_occupied_guest_bedroom
state: 'on'
- condition: and
conditions:
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_left
state: 'on'
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_right
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.guest_bedroom_bedside_lamp_left
- light.guest_bedroom_bedside_lamp_right
mode: restart
- id: kitchen_lights_with_presence
alias: Kitchen Lights with Presence
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_1
from: 'off'
to: 'on'
id: Lights On
- platform: state
entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_1
from: 'on'
to: 'off'
id: Lights Off
for:
hours: 0
minutes: 0
seconds: 30
- platform: state
entity_id:
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_3
from: 'off'
to: 'on'
id: BDZ On
- platform: state
entity_id:
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_3
from: 'on'
to: 'off'
for:
hours: 0
minutes: 0
seconds: 30
id: BDZ Off
- platform: state
entity_id:
- binary_sensor.back_door_sensor_contact
from: 'off'
to: 'on'
id: Back Door Entry
- platform: state
entity_id:
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_4
from: 'off'
to: 'on'
id: Utility On
- platform: state
entity_id:
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_4
from: 'on'
to: 'off'
id: Utility Off
for:
hours: 0
minutes: 0
seconds: 30
- platform: numeric_state
entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
below: input_number.low_light_threshold
id: Low Light
- platform: numeric_state
entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
above: input_number.upper_light_threshold_level
id: Good Light
- platform: state
entity_id:
- binary_sensor.lunchtime
from: 'off'
to: 'on'
id: Lunchtime starts
- platform: state
entity_id:
- binary_sensor.lunchtime
id: lunchtime ends
from: 'on'
to: 'off'
- platform: state
entity_id:
- binary_sensor.dinner_time
from: 'off'
to: 'on'
id: Dinner Time Starts
- platform: state
entity_id:
- binary_sensor.dinner_time
from: 'on'
to: 'off'
id: Dinner Time Ends
- platform: state
entity_id:
- binary_sensor.lights_out
to: 'off'
id: Allow Lights on
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- choose:
- conditions:
- condition: trigger
id:
- Lights On
- condition: state
entity_id: binary_sensor.overnight
state: 'on'
sequence:
- service: light.turn_on
data:
rgb_color:
- 255
- 254
- 223
brightness: 10
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Lights On
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.morning
state: 'on'
- condition: state
entity_id: binary_sensor.afternoon
state: 'on'
- condition: state
entity_id: binary_sensor.evening
state: 'on'
- condition: numeric_state
entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
below: input_number.low_light_threshold
sequence:
- service: light.turn_on
data:
color_temp: 367
brightness: 28
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Lights On
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.lunchtime
state: 'on'
- condition: state
entity_id: binary_sensor.dinner_time
state: 'on'
- condition: numeric_state
entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
below: input_number.low_light_threshold
sequence:
- service: light.turn_on
data:
color_temp: 200
brightness: 255
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Lights Off
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Back Door Entry
- condition: sun
before: sunrise
after: sunset
- condition: state
entity_id: light.back_door_zone_light
state: 'off'
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness: 127
target:
entity_id: light.back_door_zone_light
- conditions:
- condition: trigger
id:
- BDZ On
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
below: input_number.low_light_threshold
- condition: and
conditions:
- condition: or
conditions:
- condition: state
entity_id: sensor.season
state: autumn
- condition: state
entity_id: sensor.season
state: winter
- condition: time
after: '17:35:00'
before: '21:00:00'
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness: 128
target:
entity_id: light.back_door_zone_light
- conditions:
- condition: trigger
id:
- BDZ Off
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.back_door_zone_light
- conditions:
- condition: trigger
id:
- Utility On
- condition: state
entity_id: binary_sensor.lights_out
state: 'off'
- condition: sun
after: sunset
before: sunrise
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness: 199
target:
entity_id: light.utility_room_light
- conditions:
- condition: trigger
id:
- Utility Off
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.utility_room_light
- conditions:
- condition: trigger
id:
- Low Light
- condition: state
entity_id: binary_sensor.kitchen_presence_sensor_presence_sensor_1
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.morning
state: 'on'
- condition: state
entity_id: binary_sensor.afternoon
state: 'on'
- condition: state
entity_id: binary_sensor.evening
state: 'on'
- condition: state
entity_id: light.kitchen_lights_2
state: 'off'
sequence:
- service: light.turn_on
data:
color_temp: 367
brightness: 28
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Low Light
- condition: state
entity_id: binary_sensor.kitchen_presence_sensor_presence_sensor_1
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.lunchtime
state: 'on'
- condition: state
entity_id: binary_sensor.dinner_time
state: 'on'
- condition: state
entity_id: light.kitchen_lights_2
state: 'off'
sequence:
- service: light.turn_on
data:
color_temp: 200
brightness: 255
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Good Light
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Lunchtime starts
- Dinner Time Starts
- condition: state
entity_id: light.kitchen_lights_2
state: 'on'
sequence:
- service: light.turn_on
data:
color_temp: 200
brightness: 255
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- lunchtime ends
- Dinner Time Ends
- condition: state
entity_id: light.kitchen_lights_2
state: 'on'
sequence:
- service: light.turn_on
data:
color_temp: 367
brightness: 28
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Allow Lights on
- condition: state
entity_id: input_boolean.room_occupied_kitchen
state: 'on'
- condition: numeric_state
entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
below: input_number.low_light_threshold
sequence:
- service: light.turn_on
data:
color_temp: 367
brightness: 28
target:
entity_id: light.kitchen_lights_2
- alias: Main Bedroom Lights with Presence
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.main_bedroom_fp2_presence_sensor_2
- binary_sensor.main_bedroom_fp2_presence_sensor_3
id: Lights On
from: 'off'
to: 'on'
- platform: state
entity_id:
- binary_sensor.main_bedroom_fp2_presence_sensor_2
- binary_sensor.main_bedroom_fp2_presence_sensor_3
id: Lights Off
from: 'on'
to: 'off'
for:
hours: 0
minutes: 1
seconds: 0
- platform: numeric_state
entity_id: sensor.main_bedroom_fp2_light_sensor_light_level
below: input_number.low_light_threshold
id: Low Light
- platform: numeric_state
entity_id: sensor.main_bedroom_fp2_light_sensor_light_level
id: Good Light
above: input_number.upper_light_threshold_level
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
- condition: state
entity_id: binary_sensor.lights_out
state: 'off'
action:
- choose:
- conditions:
- condition: trigger
id:
- Lights On
- condition: template
value_template: '{{"Daves" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Dave's side of bed
- condition: numeric_state
entity_id: sensor.main_bedroom_fp2_light_sensor_light_level
below: input_number.low_light_threshold
- condition: state
entity_id: input_boolean.main_bedroom_bedside_lamps_active
state: 'on'
sequence:
- service: light.turn_on
data:
brightness_pct: 5
color_temp: 500
target:
entity_id: light.sonoff_1001f6d950
- conditions:
- condition: trigger
id:
- Lights On
- condition: template
value_template: '{{"Gem" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Gem's side of bed
- condition: numeric_state
entity_id: sensor.main_bedroom_fp2_light_sensor_light_level
below: input_number.low_light_threshold
- condition: state
entity_id: input_boolean.main_bedroom_bedside_lamps_active
state: 'on'
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 5
target:
entity_id: light.sonoff_1001f6d982
- conditions:
- condition: trigger
id:
- Lights Off
- condition: template
value_template: '{{"Daves" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Dave's side of bed
- condition: state
state: 'on'
entity_id: light.sonoff_1001f6d950
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.sonoff_1001f6d950
- conditions:
- condition: trigger
id:
- Lights Off
- condition: template
value_template: '{{"Gem" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Gem's side of bed
- condition: state
state: 'on'
entity_id: light.sonoff_1001f6d982
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.sonoff_1001f6d982
- conditions:
- condition: trigger
id:
- Low Light
- condition: state
entity_id: input_boolean.room_occupied_main_bedroom
state: 'on'
- condition: state
entity_id: input_boolean.main_bedroom_bedside_lamps_active
state: 'on'
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 5
target:
entity_id:
- light.sonoff_1001f6d950
- light.sonoff_1001f6d982
- conditions:
- condition: trigger
id:
- Good Light
- condition: or
conditions:
- condition: state
entity_id: light.sonoff_1001f6d950
state: 'on'
- condition: state
entity_id: light.sonoff_1001f6d982
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.sonoff_1001f6d982
- light.sonoff_1001f6d950
mode: restart
- alias: Peak/Cheap rate select for Go Utility meter
description: ''
trigger:
- platform: time
at: 00:30:00
variables:
tariff: Off Peak
- platform: time
at: 04:30:00
variables:
tariff: Peak
action:
- service: select.select_option
target:
entity_id: select.octopus_go
data:
option: '{{ tariff }}'
mode: single
- alias: Back Door Light Needed
description: ''
triggers:
- entity_id:
- switch.back_door_light_switch
from: 'off'
to: 'on'
trigger: state
- entity_id:
- switch.back_door_light_switch
from: 'on'
to: 'off'
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: light.back_door_light
state: 'off'
sequence:
- data: {}
target:
entity_id: light.back_door_light
action: light.turn_on
default:
- data: {}
target:
entity_id: light.back_door_light
action: light.turn_off
mode: single
- alias: Back Door Related Automations
description: Lights and announcements etc
triggers:
- entity_id:
- binary_sensor.back_door_sensor_contact
to: 'on'
id: Chime
from: 'off'
trigger: state
- entity_id:
- binary_sensor.back_door_sensor_contact
from: 'off'
to: 'on'
for:
hours: 0
minutes: 2
seconds: 0
id: Door still open
trigger: state
- entity_id:
- binary_sensor.back_door_sensor_contact
from: 'on'
to: 'off'
id: Chime Off
trigger: state
- trigger: sun
event: sunrise
id: Sunrise
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Chime
sequence:
- alias: Turn on back door light if needed
if:
- condition: sun
before: sunrise
after: sunset
then:
- action: light.turn_on
target:
entity_id: light.back_door_light
data:
brightness: 255
- alias: Turn on back door zone light if needed
if: []
then:
- data: {}
target:
entity_id: light.back_door_zone_light
action: light.turn_on
- if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
then:
- action: media_player.play_media
data:
entity_id: media_player.jarvis_kitchen_media_player
media_content_id: http://192.168.0.95:8123/local/Sounds/tos-turboliftdoor.mp3
media_content_type: music
alias: Play door swish if allowed
- conditions:
- condition: trigger
id:
- Chime Off
sequence:
- if:
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- action: media_player.play_media
data:
entity_id: media_player.jarvis_kitchen_media_player
media_content_id: http://192.168.0.95:8123/local/Sounds/tos-turboliftdoor.mp3
media_content_type: music
alias: Play door swish if allowed
- alias: Dim back door light to off if needed
if:
- condition: and
conditions:
- condition: state
entity_id: light.back_door_light
state: 'on'
then:
- data: {}
action: script.back_door_light_dim_when_door_closed
- conditions:
- condition: trigger
id: Door Still Open
- condition: and
conditions:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
sequence:
- if:
- condition: template
value_template: '{{is_state(''binary_sensor.dave_home'',''on'')}}'
then:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: "The {{ trigger.to_state.attributes.friendly_name }} {{ [\n \
\ ' is standing open.',\n ' is open.',\n ' does not close on its own.',\n\
\ ' was left standing open.'\n] | random }} {{ [\n 'Can a human\
\ be so kind and close it?',\n 'The air quality in this house has\
\ actually improved.',\n 'Closing the door would improve the internal\
\ climate of the house.',\n 'Hey. The door was just opened and this\
\ is crazy. But now you know. So close it maybe.',\n 'If at first\
\ you do not succeed in closing the door, please try again. Like, Right\
\ now seems like a good time to try again.',\n 'And the automatic\
\ door closer appears to be broken. So, you know what to do. Time to\
\ get physical.',\n 'I would close it for you. But I lack legs. And\
\ Arms.'\n] | random }}\n"
else:
- action: script.jarvis_speech_engine_v3_0
data:
where: gem
message: "The {{ trigger.to_state.attributes.friendly_name }} {{ [\n \
\ ' is standing open.',\n ' is open.',\n ' does not close on its own.',\n\
\ ' was left standing open.'\n] | random }} {{ [\n 'Can a human\
\ be so kind and close it?',\n 'The air quality in this house has\
\ actually improved.',\n 'Closing the door would improve the internal\
\ climate of the house.',\n 'Hey. The door was just opened and this\
\ is crazy. But now you know. So close it maybe.',\n 'If at first\
\ you do not succeed in closing the door, please try again. Like, Right\
\ now seems like a good time to try again.',\n 'And the automatic\
\ door closer appears to be broken. So, you know what to do. Time to\
\ get physical.',\n 'I would close it for you. But I lack legs. And\
\ Arms.'\n] | random }}\n"
- conditions:
- condition: trigger
id:
- Sunrise
sequence:
- if:
- condition: state
entity_id: light.back_door_light
state: 'on'
then:
- action: light.turn_off
target:
entity_id: light.back_door_light
data: {}
alias: If the light is still on at sunrise, turn it off
mode: restart
- alias: Back Door Zone Light Needed
description: ''
mode: single
triggers:
- entity_id:
- switch.kitchen_light_switch_left
from: 'off'
to: 'on'
trigger: state
- entity_id:
- switch.kitchen_light_switch_left
from: 'on'
to: 'off'
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: light.back_door_zone_light
state: 'off'
sequence:
- action: light.turn_on
target:
entity_id: light.back_door_zone_light
data: {}
default:
- action: light.turn_off
target:
entity_id: light.back_door_zone_light
data: {}
- alias: Bathrooms Presence
description: ''
mode: parallel
triggers:
- entity_id:
- binary_sensor.cloakroom_presence_occupancy
from: 'off'
to: 'on'
id: Cloak Presence
trigger: state
- entity_id:
- binary_sensor.cloakroom_presence_occupancy
from: 'on'
to: 'off'
id: Cloak Absence
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id:
- binary_sensor.jack_and_jill_presence_occupancy
from: 'off'
to: 'on'
id: Boys Bathroom Presence
trigger: state
- entity_id:
- binary_sensor.jack_and_jill_presence_occupancy
from: 'on'
to: 'off'
id: Boys Bathroom Absence
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id:
- binary_sensor.main_bathroom_presence_occupancy
from: 'off'
to: 'on'
id: Main Bathroom Presence
trigger: state
- entity_id:
- binary_sensor.main_bathroom_presence_occupancy
from: 'on'
to: 'off'
id: Main Bathroom Absence
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Cloak Presence
sequence:
- action: input_text.set_value
metadata: {}
data:
value: cloakroom
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_cloakroom
- conditions:
- condition: trigger
id:
- Cloak Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_cloakroom
- conditions:
- condition: trigger
id:
- Main Bathroom Presence
sequence:
- action: input_text.set_value
metadata: {}
data:
value: main_bathroom
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_main_bathroom
- conditions:
- condition: trigger
id:
- Main Bathroom Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_main_bathroom
- conditions:
- condition: trigger
id:
- Boys Bathroom Presence
sequence:
- action: input_text.set_value
metadata: {}
data:
value: boys_bathroom
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_jack_jill
- conditions:
- condition: trigger
id:
- Boys Bathroom Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_jack_jill
- alias: Battery Increased Notification
description: Battery Increased Notification
mode: queued
triggers:
- event_type: battery_notes_battery_increased
trigger: event
conditions: []
actions:
- action: persistent_notification.create
data:
title: '{{ trigger.event.data.device_name }} Battery Increased
'
message: 'The device has increased its battery level. Consequently, I have
marked it as replaced. If this is not the case, you know what to do.
'
- alias: Battery Low Notification
description: Battery Low Notification with auto dismiss
mode: queued
triggers:
- event_type: battery_notes_battery_threshold
event_data:
battery_low: true
id: low
alias: Battery went low
trigger: event
- event_type: battery_notes_battery_threshold
event_data:
battery_low: false
id: high
alias: Battery went high
trigger: event
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- low
sequence:
- action: persistent_notification.create
data:
title: '{{ trigger.event.data.device_name }} Battery Low
'
notification_id: '{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id
}}'
message: 'The device has a battery level of {{ trigger.event.data.battery_level
}}% {{ ''\n'' -}} You need {{ trigger.event.data.battery_quantity }}×
{{ trigger.event.data.battery_type }}
'
- conditions:
- condition: trigger
id:
- high
sequence:
- action: persistent_notification.dismiss
data:
notification_id: '{{ trigger.event.data.device_id }}-{{ trigger.event.data.source_entity_id
}}'
- alias: Battery Replaced
description: Battery Replaced
mode: queued
triggers:
- event_type: battery_notes_battery_increased
trigger: event
conditions: []
actions:
- action: battery_notes.set_battery_replaced
data:
device_id: '{{ trigger.event.data.device_id }}'
source_entity_id: '{{ trigger.event.data.source_entity_id }}'
- alias: Battery Settings Confirm
description: checks to see if battery settings are correct and sets an input boolean
toggle
mode: parallel
max: 10
triggers:
- entity_id:
- select.solaredge_i1_storage_default_mode
from: Maximize Self Consumption
id: Storage Default Mode Wrong
trigger: state
- entity_id:
- select.solaredge_i1_storage_default_mode
id: Storage Default Mode Correct
to: Maximize Self Consumption
trigger: state
- entity_id:
- select.solaredge_i1_storage_command_mode
from: Maximize Self Consumption
id: Storage Cmd Mode Wrong
trigger: state
- entity_id:
- select.solaredge_i1_storage_command_mode
id: Storage Cmd Mode Correct
to: Maximize Self Consumption
trigger: state
- entity_id:
- select.solaredge_i1_storage_control_mode
from: Remote Control
id: Storage Control Mode Wrong
trigger: state
- entity_id:
- select.solaredge_i1_storage_control_mode
id: Storage Control Mode Correct
to: Remote Control
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Storage Default Mode Wrong
- condition: state
entity_id: input_boolean.desired_storage_default_mode_correct
state: 'on'
sequence:
- action: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.desired_storage_default_mode_correct
- conditions:
- condition: trigger
id: Storage Default Mode Correct
- condition: state
entity_id: input_boolean.desired_storage_default_mode_correct
state: 'off'
sequence:
- action: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.desired_storage_default_mode_correct
- conditions:
- condition: trigger
id: Storage Cmd Mode Wrong
- condition: state
entity_id: input_boolean.desired_storage_cmd_mode_correct
state: 'on'
sequence:
- action: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.desired_storage_cmd_mode_correct
- conditions:
- condition: trigger
id: Storage Cmd Mode Correct
- condition: state
entity_id: input_boolean.desired_storage_cmd_mode_correct
state: 'off'
sequence:
- action: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.desired_storage_cmd_mode_correct
- conditions:
- condition: trigger
id: Storage Control Mode Wrong
- condition: state
entity_id: input_boolean.desired_storage_control_mode_correct
state: 'on'
sequence:
- action: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.desired_storage_control_mode_correct
- conditions:
- condition: trigger
id: Storage Control Mode Correct
- condition: state
entity_id: input_boolean.desired_storage_control_mode_correct
state: 'off'
sequence:
- action: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.desired_storage_control_mode_correct
- alias: Bedtime and Get up Actions
description: A list of things that happen in the house when we go to bed and then
get up.
triggers:
- trigger: state
entity_id:
- binary_sensor.master_bed_occupancy_bed_occupied_both
from: 'on'
to: 'off'
for:
hours: 0
minutes: 1
seconds: 0
id: someone is up
- trigger: state
entity_id:
- binary_sensor.master_bed_occupancy_bed_occupied_both
from: 'off'
to: 'on'
for:
hours: 0
minutes: 1
seconds: 0
id: we are in bed
enabled: true
- trigger: state
entity_id:
- binary_sensor.master_bed_occupancy_bed_occupied_either
from: 'on'
to: 'off'
for:
hours: 0
minutes: 2
seconds: 0
id: we are up
- trigger: state
entity_id:
- binary_sensor.master_bed_occupancy_bed_occupied_either
from: 'off'
to: 'on'
for:
hours: 0
minutes: 1
seconds: 0
id: someone is in bed
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- we are in bed
- condition: time
after: '21:30:00'
- condition: state
entity_id: input_boolean.we_are_in_bed
state: 'off'
sequence:
- action: script.goodnight_2
data: {}
- conditions:
- condition: trigger
id:
- we are up
- condition: state
entity_id: input_boolean.we_are_in_bed
state: 'on'
- condition: time
after: 06:55:00
before: '21:00:00'
sequence:
- action: script.good_morning_2
data: {}
- conditions:
- condition: trigger
id:
- someone is in bed
- condition: time
after: '21:00:00'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.dave_home
state: 'off'
- condition: state
entity_id: binary_sensor.gem_home
state: 'off'
- condition: state
entity_id: input_boolean.we_are_in_bed
state: 'off'
sequence:
- action: script.goodnight_2
data: {}
mode: single
- alias: Bedtime for Jamie
description: ''
triggers:
- trigger: conversation
command:
- it's bedtime
- goodnight
- It is bedtime
id: Voice
- trigger: state
entity_id:
- input_boolean.we_are_in_bed
from: 'off'
to: 'on'
id: Stop play
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Voice
- condition: state
entity_id: assist_satellite.jarvis_jamie_assist_satellite
state: processing
sequence:
- alias: Silence normal response.
set_conversation_response: ''
- alias: Respond with a goodnight message.
action: assist_satellite.announce
target:
entity_id: assist_satellite.jarvis_jamie_assist_satellite
metadata: {}
data:
message: "{{ [\n \"The Minecraft mobs are asleep — so power up your dreams\
\ Jamie for tomorrow's building adventures!\",\n \"Blaze has crossed\
\ the finish line and left Crusher in the dust — now it's your turn Jamie,\
\ to race into dreamland!\",\n \"Topsy and Tim have finished their\
\ busy day — rest up for your next big adventure Jamie!\",\n \"Blippi’s\
\ backpack is packed away — I hope yours is too Jamie because it's time\
\ to dream up tomorrow’s discoveries!\",\n \"The Ninjago team have\
\ defended the city — now it's your mission to rest like a true ninja\
\ Jamie!\",\n \"Paw Patrol mission complete — even Chase knows heroes,\
\ like you Jamie, need their sleep!\",\n \"Bluey’s imagination is recharging\
\ overnight — what stories will you dream up to share with her tomorrow\
\ Jamie?\",\n \"Peppa Pig’s day of adventures is done — time to jump\
\ into bed Jamie, not muddy puddles!\",\n \"Minecraft Steve just built\
\ the best base ever — it's epic. So now, Jamie, it's time for you to\
\ build the best dreams!\",\n \"Ryder has called all pups to the lookout\
\ for a nap. Dream big, Jamie, and be ready for tomorrow’s rescue!\"\n\
\ ] | random }}"
preannounce: false
- action: media_player.volume_set
target:
entity_id:
- media_player.jamie_s_room_dot
data:
volume_level: '{{ states(''input_number.alexa_volume_level_low'') | float(0)
}}'
- parallel:
- action: media_player.play_media
data:
media_content_id: Play Bedtime music from Amazon Music
media_content_type: custom
target:
entity_id:
- media_player.jamie_s_room_dot
- action: input_boolean.turn_off
target:
entity_id:
- input_boolean.jamies_light_toggle
data: {}
- conditions:
- condition: trigger
id:
- Stop play
sequence:
- action: media_player.media_stop
metadata: {}
data: {}
target:
entity_id:
- media_player.jamie_s_room_dot
mode: single
- alias: Bedtime for Sean
description: ''
triggers:
- trigger: conversation
command:
- it's bedtime
- goodnight
- It is bedtime
id: Voice
- trigger: state
entity_id:
- input_boolean.we_are_in_bed
from: 'off'
to: 'on'
id: Stop play
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Voice
- condition: state
entity_id: assist_satellite.jarvis_sean_assist_satellite
state: processing
sequence:
- alias: Silence normal response.
set_conversation_response: ''
- alias: Respond with a Marvel goodnight.
action: assist_satellite.announce
target:
entity_id: assist_satellite.jarvis_sean_assist_satellite
metadata: {}
data:
message: "{{ [\"Sleep tight, Spidey! Your spider-sense needs to rest for\
\ the day and your web shooters need a recharge so you're ready to swing\
\ into action tomorrow!\",\n \"Close your eyes Avenger. We assemble\
\ tomorrow when the world might need you to save the day!\",\n \"Okay\
\ Iron Man. Helmet off and power down all systems. Friday will look after\
\ you as you sleep!\",\n \"Rest up, young hero! Captain America can\
\ do this all day, but you need sleep to stay strong for your next mission.\"\
,\n \"Time to relax big guy. Sleep well my wee Hulk, and try not to\
\ smash your duvet in your sleep!\",\n \"The stars are your Infinity\
\ Stones, so your dreams are powered by the most elemental forces. Sleep\
\ tight.\",\n \"Time to get some sleep Thor. So put the hammer down,\
\ close your eyes and the gods of Aasgard will watch over you\",\n \
\ \"The mirror dimension is calling you Doctor Strange. So open the eye\
\ of agamoto and prepare for some magical dreams\",\n \"Director Fury\
\ of SHIELD has assigned you a mission: Get a full night’s rest so you\
\ can be a hero tomorrow!\"\n ] | random }}"
preannounce: false
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- action: media_player.volume_set
target:
entity_id: media_player.jarvis_sean_media_player
data:
volume_level: 0.25
- parallel:
- action: music_assistant.play_media
target:
entity_id:
- media_player.jarvis_sean_media_player_2
data:
media_id: library://audiobook/5
alias: Read an audiobook on JARVIS media player
- action: input_boolean.turn_off
target:
entity_id: input_boolean.seans_light_toggle
data: {}
- conditions:
- condition: trigger
id:
- Stop play
sequence:
- action: media_player.media_stop
metadata: {}
data: {}
target:
entity_id: media_player.jarvis_sean_media_player_2
mode: single
- alias: Birthday Announcements
description: ''
triggers:
- event: start
offset: '7:45:0'
entity_id: calendar.birthdays
trigger: calendar
conditions:
- condition: template
value_template: '{{ is_state(''input_boolean.audible_notifications'',''on'') }}'
actions:
- alias: Pump up the volume
action: media_player.volume_set
target:
entity_id: media_player.living_room_pop
data:
volume_level: 0.4
- action: script.birthday_announcement
data:
where: living_room
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- data:
entity_id: media_player.living_room_pop
media_content_id: Awesome Birthday Song in everywhere group
media_content_type: AMAZON_MUSIC
action: media_player.play_media
alias: Play Happy Birthday everywhere.
- action: media_player.volume_set
target:
entity_id: media_player.living_room_pop
data:
volume_level: 0.4
alias: Let down the volume
mode: single
initial_state: true
- alias: Boys Bedroom Presence and Lights
description: ''
triggers:
- entity_id:
- binary_sensor.jamie_room_presence_occupancy
from: 'off'
to: 'on'
id: Jamie Presence
trigger: state
- entity_id:
- binary_sensor.jamies_room_occupied
from: 'on'
to: 'off'
id: Jamie Absence
trigger: state
- entity_id:
- binary_sensor.sean_room_presence_occupancy
from: 'off'
to: 'on'
id: Sean Presence
trigger: state
- entity_id:
- binary_sensor.seans_room_occupied
from: 'on'
to: 'off'
id: Sean Absence
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Jamie Presence
sequence:
- parallel:
- action: input_text.set_value
metadata: {}
data:
value: jamies_room
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_jamie_s_room
- if:
- condition: numeric_state
entity_id: sensor.jamies_room_light_level
below: input_number.low_light_threshold
- condition: time
after: 08:00:00
before: '19:45:00'
weekday:
- sun
- sat
- fri
- thu
- wed
- tue
- mon
then:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.jamies_light_toggle
data: {}
alias: If low light between 8am and 7:45pm turn on the light.
alias: Set text and toggles.
- conditions:
- condition: trigger
id:
- Sean Presence
sequence:
- alias: Set text and toggles.
parallel:
- action: input_text.set_value
metadata: {}
data:
value: seans_room
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_sean_s_room
- alias: If low light between 8am and 7:45pm turn on the light.
if:
- condition: numeric_state
entity_id: sensor.seans_room_light_level
below: input_number.low_light_threshold
- condition: time
after: 08:00:00
before: '19:45:00'
weekday:
- sun
- sat
- fri
- thu
- wed
- tue
- mon
then:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.seans_light_toggle
data: {}
- conditions:
- condition: trigger
id:
- Jamie Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id:
- input_boolean.room_occupied_jamie_s_room
- input_boolean.jamies_light_toggle
- conditions:
- condition: trigger
id:
- Sean Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id:
- input_boolean.room_occupied_sean_s_room
- input_boolean.seans_light_toggle
mode: single
- alias: Boys Bedtime Announcements v2.0
description: ''
triggers:
- at: input_datetime.school_night_jamie
id: School Bedtime Jamie
trigger: time
enabled: true
- at: input_datetime.school_night_sean
id: School Bedtime Sean
trigger: time
enabled: true
- at: input_datetime.non_school_night
id: Non School Bedtime
trigger: time
enabled: true
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- School Bedtime Sean
- condition: state
entity_id: sensor.school_tomorrow
state: 'True'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.seans_bedtime_announcement_played
state: 'off'
sequence:
- action: script.sean_bedtime_announcement
data: {}
- conditions:
- condition: trigger
id:
- School Bedtime Jamie
- condition: state
entity_id: sensor.school_tomorrow
state: 'True'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.jamies_bedtime_announcement_played
state: 'off'
sequence:
- action: script.jamie_bedtime_announcement
data: {}
- conditions:
- condition: trigger
id: Non School Bedtime
- condition: state
entity_id: sensor.school_tomorrow
state: 'False'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: and
conditions:
- condition: state
entity_id: input_boolean.seans_bedtime_announcement_played
state: 'off'
- condition: state
entity_id: input_boolean.jamies_bedtime_announcement_played
state: 'off'
sequence:
- action: script.boys_bedtime_announcement
data: {}
mode: single
initial_state: true
- alias: Boys' room blinds
description: ''
triggers:
- at: 07:30:00
id: weekday open
trigger: time
- at: 08:00:00
id: weekend open
trigger: time
- trigger: sun
event: sunset
offset: 0
id: Winter close
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- weekday open
- condition: state
entity_id: sensor.day_of_week
state:
- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.schoolday
state: 'on'
- condition: state
entity_id: binary_sensor.fridayschool
state: 'on'
alias: If it is a school day
sequence:
- action: cover.open_cover
target:
entity_id:
- cover.jamies_room_blind
- cover.seans_room_blind
data: {}
- conditions:
- condition: trigger
id:
- weekday open
- condition: or
conditions:
- condition: state
entity_id: sensor.day_of_week
state:
- Saturday
- Sunday
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.schoolday
state: 'off'
- condition: state
entity_id: binary_sensor.fridayschool
state: 'off'
alias: If weekend or school holiday
sequence:
- action: cover.open_cover
target:
entity_id:
- cover.jamies_room_blind
- cover.seans_room_blind
data: {}
- conditions:
- condition: trigger
id:
- Winter close
sequence:
- action: cover.close_cover
target:
entity_id:
- cover.jamies_room_blind
- cover.seans_room_blind
data: {}
mode: single
- alias: Boys' room blinds V2.0
description: Opens and closes Jamie's and Sean's blinds depending on school schedule.
triggers:
- at: input_datetime.jamie_s_room_blind_opening_time
id: jamie_open
trigger: time
- at: input_datetime.sean_s_room_blind_opening_time
id: sean_open
trigger: time
- at: 07:32:00
id: fallback_school_open
trigger: time
- at: 07:47:00
id: fallback_weekend_open
trigger: time
- event: sunset
id: winter_close
trigger: sun
- at: '19:30:00'
id: summer_close
trigger: time
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: jamie_open
sequence:
- target:
entity_id: cover.jamies_room_blind
action: cover.open_cover
data: {}
- target:
entity_id: input_boolean.jamie_s_bedside_lamp
action: input_boolean.turn_off
data: {}
- conditions:
- condition: trigger
id: sean_open
sequence:
- target:
entity_id: cover.seans_room_blind
action: cover.open_cover
data: {}
- target:
entity_id: input_boolean.sean_s_bedside_lamp
action: input_boolean.turn_off
data: {}
- conditions:
- condition: trigger
id: fallback_school_open
- condition: template
value_template: "{{ is_state('binary_sensor.schoolday', 'on')\n or is_state('binary_sensor.fridayschool',\
\ 'on') }}\n"
alias: If it's a schoolday.
- condition: state
entity_id: cover.jamies_room_blind
state: closed
sequence:
- target:
entity_id:
- cover.jamies_room_blind
- cover.seans_room_blind
action: cover.open_cover
data: {}
- target:
entity_id:
- input_boolean.jamie_s_bedside_lamp
- input_boolean.sean_s_bedside_lamp
action: input_boolean.turn_off
data: {}
- data:
title: Fallback Trigger Used
message: 'Both blinds opened at 07:30 using fallback school day logic. Because
`sensor.school_tomorrow` is {{ states(''sensor.school_tomorrow'') }}.
'
action: persistent_notification.create
- conditions:
- condition: trigger
id: fallback_weekend_open
- condition: template
value_template: "{{ is_state('binary_sensor.schoolday', 'off')\n and is_state('binary_sensor.fridayschool',\
\ 'off') }}\n"
- condition: state
entity_id: cover.jamies_room_blind
state: closed
sequence:
- target:
entity_id:
- cover.jamies_room_blind
- cover.seans_room_blind
action: cover.open_cover
data: {}
- target:
entity_id:
- input_boolean.jamie_s_bedside_lamp
- input_boolean.sean_s_bedside_lamp
action: input_boolean.turn_off
data: {}
- data:
title: Fallback Trigger Used
message: 'Both boys'' blinds opened at 07:45 using fallback weekend/holiday
logic. Because `sensor.school_tomorrow` is {{ states(''sensor.school_tomorrow'')
}}.
'
action: persistent_notification.create
- conditions:
- condition: trigger
id: winter_close
sequence:
- target:
entity_id:
- cover.jamies_room_blind
- cover.seans_room_blind
action: cover.close_cover
data: {}
- target:
entity_id:
- input_boolean.jamie_s_bedside_lamp
- input_boolean.sean_s_bedside_lamp
action: input_boolean.turn_on
data: {}
- conditions:
- condition: trigger
id: summer_close
sequence:
- target:
entity_id:
- cover.jamies_room_blind
- cover.seans_room_blind
action: cover.close_cover
data: {}
- target:
entity_id:
- input_boolean.jamie_s_bedside_lamp
- input_boolean.sean_s_bedside_lamp
action: input_boolean.turn_on
data: {}
mode: parallel
max: 3
- alias: Bread Maker
description: ''
triggers:
- trigger: numeric_state
entity_id:
- sensor.kitchen_socket_power_power
for:
hours: 0
minutes: 0
seconds: 15
above: 50
id: Start
- trigger: event
event_type: timer.finished
event_data:
entity_id: timer.bread_timer
id: Time
alias: When bread timer finishes.
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Start
- condition: state
entity_id: input_boolean.bread_done
state: 'off'
- condition: template
value_template: '{{ trigger.from_state.state not in [''unknown'', ''unavailable'']
}}'
sequence:
- parallel:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.bread_done
data: {}
- action: timer.start
metadata: {}
data: {}
target:
entity_id: timer.bread_timer
- conditions:
- condition: trigger
id:
- Time
- condition: state
entity_id: input_boolean.bread_done
state: 'on'
- condition: numeric_state
entity_id: sensor.kitchen_socket_power_power
below: 10
sequence:
- parallel:
- action: input_boolean.turn_off
target:
entity_id: input_boolean.bread_done
data: {}
- action: script.text_notify_parents
data:
title: BREAD DONE!
message: It has been 3 hours since you put the bread maker on. Its probaby
done making another loaf, but I suggest checking.
mode: single
- alias: Calendar Event Announcements
description: ''
triggers:
- event: start
offset: -0:32:0
entity_id: calendar.forrester_events
trigger: calendar
conditions:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
actions:
- alias: Announce to Dave if home, else Gem.
if:
- condition: state
entity_id: binary_sensor.dave_home
state: 'on'
then:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: "{%- macro getReport() -%}\n {% set response = state_attr('sensor.calendar_events',\
\ 'calendar_response') %}\n {% set cal = response['calendar.forrester_events']\
\ if response and 'calendar.forrester_events' in response else {} %}\n \
\ {% set events = cal['events'] if 'events' in cal else [] %}\n {% set\
\ now = now() %}\n {% set upcoming = events\n | selectattr('start',\
\ 'defined')\n | selectattr('start', '>', now.isoformat())\n | sort(attribute='start')\n\
\ | list %}\n \n {% if upcoming %}\n {% set next = upcoming[0] %}\n\
\ {% set event_title = next.summary %}\n {% set event_description\
\ = (next.description or '') | lower %}\n {% set car_tags = ['#car',\
\ '#drive', '#needscar', '#trip'] %}\n {% set needs_car = car_tags |\
\ select('in', event_description) | list | count > 0 %}\n \n You have\
\ {{ event_title }} at {{ as_datetime(next.start).strftime('%H:%M') }} —\
\ in about half an hour.\n \n {%- if needs_car and is_state('input_boolean.car_plugged_in',\
\ 'on') -%}\n The car is still plugged in — don't forget to unplug\
\ it!\n {%- elif is_state('input_boolean.car_plugged_in', 'on') -%}\n\
\ If the car is needed, remember that it is still plugged in.\n \
\ {%- endif -%}\n {% else %}\n No upcoming events found.\n {% endif\
\ %}\n{%- endmacro -%}\n\n{%- macro cleanup(data) -%}\n {%- for item in\
\ data.split(\"\\n\") if item | trim != \"\" -%}\n {{ item | trim }}\
\ {% endfor -%}\n{%- endmacro -%}\n\n{%- macro mother_of_all_macros() -%}\n\
\ {{ getReport() }}\n{%- endmacro -%}\n\n{{- cleanup(mother_of_all_macros())\
\ -}}"
else:
- action: script.jarvis_speech_engine_v3_0
data:
where: gem
message: "{%- macro getReport() -%}\n {% set response = state_attr('sensor.calendar_events',\
\ 'calendar_response') %}\n {% set cal = response['calendar.forrester_events']\
\ if response and 'calendar.forrester_events' in response else {} %}\n \
\ {% set events = cal['events'] if 'events' in cal else [] %}\n {% set\
\ now = now() %}\n {% set upcoming = events\n | selectattr('start',\
\ 'defined')\n | selectattr('start', '>', now.isoformat())\n | sort(attribute='start')\n\
\ | list %}\n \n {% if upcoming %}\n {% set next = upcoming[0] %}\n\
\ {% set event_title = next.summary %}\n {% set event_description\
\ = (next.description or '') | lower %}\n {% set car_tags = ['#car',\
\ '#drive', '#needscar', '#trip'] %}\n {% set needs_car = car_tags |\
\ select('in', event_description) | list | count > 0 %}\n \n You have\
\ {{ event_title }} at {{ as_datetime(next.start).strftime('%H:%M') }} —\
\ in about half an hour.\n \n {%- if needs_car and is_state('input_boolean.car_plugged_in',\
\ 'on') -%}\n The car is still plugged in — don't forget to unplug\
\ it!\n {%- elif is_state('input_boolean.car_plugged_in', 'on') -%}\n\
\ If the car is needed, remember that it is still plugged in.\n \
\ {%- endif -%}\n {% else %}\n No upcoming events found.\n {% endif\
\ %}\n{%- endmacro -%}\n\n{%- macro cleanup(data) -%}\n {%- for item in\
\ data.split(\"\\n\") if item | trim != \"\" -%}\n {{ item | trim }}\
\ {% endfor -%}\n{%- endmacro -%}\n\n{%- macro mother_of_all_macros() -%}\n\
\ {{ getReport() }}\n{%- endmacro -%}\n\n{{- cleanup(mother_of_all_macros())\
\ -}}"
mode: single
initial_state: true
- alias: 'Charge Battery from Clipped Solar '
description: Effectively charges battery from clipped DC power when solar production
estimate is high. In reality, the charge rate is dynamically adjusted to allow
max DC production while the battery charges.
triggers:
- alias: When battery finishes grid charge or car finishes charging.
entity_id:
- input_boolean.home_battery_grid_charging
- input_boolean.rolec_battery_master
to: 'off'
from: 'on'
id: Grid Charge Finished
trigger: state
- trigger: numeric_state
entity_id: sun.sun
attribute: elevation
above: 10
id: Smart Sunrise Trigger
- entity_id:
- sensor.solaredge_b1_state_of_energy
above: 99.5
id: Charge Complete
trigger: numeric_state
- trigger: time_pattern
minutes: /5
id: Update
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Grid Charge Finished
- condition: numeric_state
entity_id: sensor.solcast_pv_forecast_forecast_today
above: 30
sequence:
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.charge_rate_limited
- action: number.set_value
target:
entity_id:
- number.solaredge_i1_storage_charge_limit
data:
value: '{{states(''input_number.storage_charge_limit'')|float(0)}}'
- conditions:
- condition: trigger
id: Smart Sunrise Trigger
- condition: state
entity_id: input_boolean.charge_rate_limited
state: 'off'
- condition: state
entity_id: input_boolean.home_battery_grid_charging
state: 'off'
- condition: numeric_state
entity_id: sensor.solcast_pv_forecast_forecast_today
above: 30
sequence:
- target:
entity_id: input_boolean.charge_rate_limited
action: input_boolean.turn_on
data: {}
- target:
entity_id: number.solaredge_i1_storage_charge_limit
data:
value: '{{ states(''input_number.storage_charge_limit'') | float(0) }}'
action: number.set_value
- conditions:
- condition: trigger
id:
- Charge Complete
- condition: state
entity_id: input_boolean.charge_rate_limited
state: 'on'
sequence:
- action: input_boolean.turn_off
target:
entity_id:
- input_boolean.charge_rate_limited
data: {}
- action: number.set_value
metadata: {}
data:
value: '7000'
target:
entity_id: number.solaredge_i1_storage_charge_limit
- conditions:
- condition: trigger
id:
- Update
- condition: state
entity_id: input_boolean.charge_rate_limited
state: 'on'
sequence:
- action: number.set_value
target:
entity_id: number.solaredge_i1_storage_charge_limit
data:
value: '{{ states(''sensor.battery_charge_limit_dynamic'') | float(0) }}'
alias: Set charge rate limit dynamically to a max 2160W
mode: parallel
max: 3
- alias: Check the house is secure via Voice
description: Runs a Security Check based on voice command and announces the result
when ready.
triggers:
- command:
- Run a security check
- Check the house security
- Perform a security check
- Check for motion
- Check the doors
- Check the security cameras
- Check the garage security
trigger: conversation
actions:
- variables:
query_map:
Run a security check.: General Security Check | Query Everything
Check the house security.: General Security Check | Query Everything
Perform a security check.: General Security Check | Query Everything
Check for motion.: Security Check | Query Motion and Door Contact Sensors
Check the doors.: Security Check | Query Motion and Door Contact Sensors
Check the security cameras.: Security Check | Query Camera Snapshots
Check the garage security.: Security Check | Query Garage Camera Snapshot
and Door Sensors
selected_query: '{{ query_map[trigger.sentence] | default(''General Security
Check | Query Everything'') }}
'
- action: persistent_notification.create
data:
title: Security Query Debug
message: 'Security Query: {{ selected_query }}'
- data:
security_query: '{{ selected_query }}'
action: script.security_check
response_variable: response
- variables:
camera_response: '{{ response.camera_check }}
'
response: '{{ response.query_all_contact_sensors }}
{{ response.query_all_motion_sensors }}
'
- wait_template: '{{ camera_response != '''' or response != '''' }}'
timeout: 00:00:30
continue_on_timeout: true
enabled: true
- action: google_generative_ai_conversation.generate_content
metadata: {}
data:
prompt: You are a a security guard who has done a sweep of the house. You have
checked the state of doors and windows and are now reporting your findings
back to the house owner. Be brief and tell me tell me the state of the alarm,
only mention doors or windows that are open and if you detected motion anywhere. Keep
it conversational with no emojis as your response will be broadcast on a speaker. Here
is the variable with the data to check {{ response }}.
response_variable: security_response
enabled: true
- variables:
full_response: '{{ camera_response.text}} {{ security_response.text }}
'
- action: persistent_notification.create
data:
title: Script Response Debug
message: 'Full Response: {{ full_response }}'
- set_conversation_response: '{{ full_response.text }}'
enabled: true
mode: single
- alias: Cloakroom Lights on with Presence
description: Lights on and off with presence and timer
triggers:
- entity_id:
- binary_sensor.cloakroom_presence_occupancy
from: 'off'
to: 'on'
id: Presence
alias: When someone goes into the cloakroom.
trigger: state
- entity_id:
- binary_sensor.cloakroom_presence_occupancy
from: 'on'
to: 'off'
for:
hours: 0
minutes: 0
seconds: 0
id: Absence
alias: When someone leaves the cloakroom.
trigger: state
- event_type: timer.finished
event_data:
entity_id: timer.cloakroom_light
id: Timer Done
alias: When cloakroom timer runs down.
enabled: true
trigger: event
- alias: When light level is low.
entity_id:
- sensor.cloakroom_presence_illuminance
below: 30
id: Low Light
trigger: numeric_state
- trigger: state
entity_id:
- binary_sensor.cloakroom_door
from: 'off'
to: 'on'
id: Door Open
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Presence
- Door Open
- condition: state
entity_id: binary_sensor.quiet_time_boys
state: 'off'
sequence:
- alias: Turn on extractor.
action: light.turn_on
target:
entity_id:
- light.cloakroom_switch_light_2
data: {}
- data: {}
target:
entity_id: timer.cloakroom_light
action: timer.start
- condition: or
conditions:
- condition: sun
before: sunrise
after: sunset
- condition: numeric_state
entity_id: sensor.cloakroom_presence_illuminance
below: 30
- alias: Turn on light.
action: light.turn_on
target:
entity_id:
- light.cloakroom_switch_light
data: {}
alias: When someone enters cloakroom outside of quite time.
- conditions:
- condition: trigger
id:
- Presence
- Door Open
- condition: state
entity_id: binary_sensor.quiet_time_boys
state: 'on'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.cloakroom_presence_illuminance
below: 30
- condition: sun
before: sunrise
after: sunset
sequence:
- action: light.turn_on
target:
entity_id:
- light.cloakroom_switch_light
data: {}
alias: Turn on light only.
- data: {}
target:
entity_id: timer.cloakroom_light
action: timer.start
alias: When someone enters cloakroom during quite time.
- conditions:
- condition: trigger
id:
- Absence
- condition: state
entity_id: timer.cloakroom_light
state: idle
sequence:
- data: {}
target:
entity_id:
- light.cloakroom_switch_light
action: light.turn_off
alias: Turn off the light.
- condition: state
entity_id: light.cloakroom_switch_light_2
state: 'on'
alias: Check if the extractor is on.
- data: {}
target:
entity_id:
- light.cloakroom_switch_light_2
action: light.turn_off
alias: Turn off the extractor.
alias: When someone leaves the cloakroom.
- conditions:
- condition: trigger
id:
- Timer Done
- condition: state
entity_id: binary_sensor.cloakroom_presence_occupancy
state: 'off'
sequence:
- if:
- condition: state
entity_id: binary_sensor.quiet_time_boys
state: 'off'
then:
- action: light.turn_off
target:
entity_id: light.cloakroom_switch_light_2
data: {}
- if:
- condition: state
entity_id: light.cloakroom_switch_light
state: 'on'
then:
- action: light.turn_off
target:
entity_id: light.cloakroom_switch_light
data: {}
else:
- action: light.turn_off
target:
entity_id: light.cloakroom_switch_light
data: {}
alias: When cloakroom timer runs down.
- conditions:
- condition: trigger
id:
- Low Light
- condition: state
entity_id: binary_sensor.cloakroom_occupied
state: 'on'
sequence:
- action: light.turn_on
target:
entity_id: light.cloakroom_switch_light
data: {}
alias: Turn on the light.
mode: restart
- alias: Clocks Changing
description: ''
trigger:
- platform: time
at: '10:00:00'
- platform: time
at: '19:00:00'
condition:
- condition: template
value_template: '{{ states(''sensor.daylight_savings_days_until'') | int(0) in
[7,1] }}'
action:
- service: script.text_notify_dave
metadata: {}
data:
message: '{%- set days = states(''sensor.daylight_savings_days_until'') | int(0)
%} {%- set plural = ''s'' if days | int(0) > 1 else '''' %} Clocks change
in {{ days }} day{{plural}}, you will {{ states(''sensor.daylight_savings_phrase'')
}}!
'
- condition: template
value_template: '{{states(''sensor.daylight_savings_days_until'') | int(0) ==
0 }}'
- service: input_boolean.toggle
metadata: {}
data: {}
target:
entity_id:
- input_boolean.bst
- input_boolean.gmt
mode: single
- alias: Clock Chime
description: ''
mode: restart
triggers:
- minutes: 0
id: '0'
trigger: time_pattern
- minutes: 15
id: '15'
trigger: time_pattern
- minutes: 30
id: '30'
trigger: time_pattern
- minutes: 45
id: '45'
trigger: time_pattern
conditions:
- 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
state: 'on'
entity_id: binary_sensor.family_home
- condition: state
entity_id: input_boolean.guest_mode
state: 'on'
actions:
- 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.dave_s_2nd_echo_pop", "playing")
}}'
continue_on_timeout: false
timeout: 00:02:00
- action: script.alexa_voice
data:
where: living room
message: "{% if states(\"input_select.clock_chime_sound\") == \"Cuckoo Clock\"\
\ %}\n {% if trigger.id == \"30\" %}\n \n\
\ {% else %}\n \n {% endif %}\n{% elif states(\"input_select.clock_chime_sound\"\
) == \"Grandfather Clock\" %}\n {% if trigger.id == \"15\" %}\n \n\
\ {% elif trigger.id == \"30\" %}\n \n\
\ {% elif trigger.id == \"45\" %}\n \n\
\ {% else %}\n \n {% endif %}\n{% endif %}\n"
msg_summary: clock chime
- alias: Clock Chime v2.0
description: ''
triggers:
- minutes: 0
id: '0'
trigger: time_pattern
- minutes: 15
id: '15'
trigger: time_pattern
- minutes: 30
id: '30'
trigger: time_pattern
- minutes: 45
id: '45'
trigger: time_pattern
conditions:
- 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
state: 'on'
entity_id: binary_sensor.family_home
- condition: state
entity_id: input_boolean.guest_mode
state: 'on'
actions:
- 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: []
- action: script.clock_voice
data:
where: living room
message: "{% if states(\"input_select.clock_chime_sound\") == \"Cuckoo Clock\"\
\ %}\n {% if trigger.id == \"30\" %}\n http://192.168.0.95:8123/local/Sounds/CuckooClock/cuckoo-clock-01.wav\n\
\ {% else %}\n http://192.168.0.95:8123/local/Sounds/CuckooClock/cuckoo-clock-{{now().strftime(\"\
%I\")}}.wav\n {% endif %}\n{% elif states(\"input_select.clock_chime_sound\"\
) == \"Grandfather Clock\" %}\n {% if trigger.id == \"15\" %}\n http://192.168.0.95:8123/local/Sounds/GFClock/Toll-1Quarter.mp3\n\
\ {% elif trigger.id == \"30\" %}\n http://192.168.0.95:8123/local/Sounds/GFClock/Toll-2Quarter.mp3\n\
\ {% elif trigger.id == \"45\" %}\n http://192.168.0.95:8123/local/Sounds/GFClock/Toll-3Quarter.mp3\n\
\ {% else %}\n http://192.168.0.95:8123/local/Sounds/GFClock/{{now().strftime(\"\
%I\")}}-hour.mp3\n {% endif %}\n{% endif %}\n"
msg_summary: clock chime
mode: restart
- alias: Count Front Door Motion While Out
description: ''
mode: single
triggers:
- entity_id: binary_sensor.front_door_motion_detected
to: 'on'
trigger: state
conditions:
- condition: state
entity_id: binary_sensor.family_home
state: 'off'
actions:
- target:
entity_id: counter.front_door_motion_detected
action: counter.increment
data: {}
- id: logger_level_set
alias: Logger Level Set
initial_state: true
mode: single
trigger:
- platform: state
entity_id: input_select.logger_level
action:
- action: logger.set_level
data:
homeassistant.components: '{{ states(''input_select.logger_level'') }}'
- alias: Dining Room Presence and Lights
description: ''
triggers:
- entity_id:
- binary_sensor.dining_room_presence_sensor_occupancy
from: 'off'
to: 'on'
id: Presence
trigger: state
- entity_id:
- binary_sensor.dining_room_occupied
from: 'on'
to: 'off'
id: Absence
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Presence
sequence:
- action: input_text.set_value
data:
value: dining_room
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_dining_room
- alias: If low light or nighttime turn on the light.
if:
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.dining_room_light_level
below: 30
- condition: sun
before: sunrise
after: sunset
then:
- action: input_boolean.turn_on
target:
entity_id:
- input_boolean.dining_room_light_toggle
data: {}
- conditions:
- condition: trigger
id: Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id:
- input_boolean.room_occupied_dining_room
- input_boolean.dining_room_light_toggle
mode: restart
- alias: Dishwasher Notification When Finished
description: Set the value of input boolean "dishwasher on/off" based on power consumption.
Announce when the dishwasher has finished and check the dishes have been removed.
triggers:
- alias: Dishwasher drawing more than 10W power
entity_id:
- sensor.dishwasher_power_consumed
above: 10
id: Dishwasher On
trigger: numeric_state
for:
hours: 0
minutes: 1
seconds: 0
- alias: Dishwasher drawing less than 10W power for 2 mins..
entity_id:
- sensor.dishwasher_power_consumed
below: 10
id: Dishwasher off
for:
hours: 0
minutes: 3
seconds: 0
trigger: numeric_state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Dishwasher On
- condition: state
state: 'off'
entity_id: input_boolean.dishwasher_on
sequence:
- action: input_boolean.turn_on
data: {}
target:
entity_id:
- input_boolean.dishwasher_on
- action: input_datetime.set_datetime
target:
entity_id: input_datetime.dishwasher_started
data:
datetime: '{{ now().isoformat() }}'
- conditions:
- condition: trigger
id:
- Dishwasher off
- condition: state
state: 'on'
entity_id: input_boolean.dishwasher_on
- condition: template
value_template: "{{ (now().astimezone() - (states('input_datetime.dishwasher_started')\n\
\ | as_datetime()).astimezone()).total_seconds() > 4800 }}\n"
sequence:
- delay:
seconds: 30
- action: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.dishwasher_on
- alias: Announce finished
if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: binary_sensor.dave_home
state: 'on'
then:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: "{{ ['I think the dishwasher might be finished. Better check\
\ to see.' \n ] | random }}\n"
else:
- alias: Announce to Gem
if:
- condition: state
entity_id: binary_sensor.gem_home
state: 'on'
- condition: state
entity_id: binary_sensor.gem_workstation_status
state: 'off'
then:
- action: script.jarvis_speech_engine_v3_0
data:
where: gem
message: "{{ ['I think the dishwasher might be finished. Better check\
\ to see.' \n ] | random }}\n"
else:
- if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- action: script.jarvis_speech_engine_v3_0
data:
where: all
type: announcement
message: "{{ [\n 'The washing machine has completed its cycle.\
\ Better get the washing hung up to dry', \n 'I have detected\
\ a reduction in the power consumption of the washing machine. \
\ My fuzzy logic circuit has determined that means its finished',\
\ \n 'My sensors have detected a reduction in the rotational\
\ velocity of the washing machine. My artificially intuitive logic\
\ system has determined that now might be the optimal time to hang\
\ it up to dry', \n 'The washing machine has finished its cycle.\
\ It has cycled quite a long way and is quite tired after its exertions.\
\ I would hang the washing out to dry, but I dont have any arms.\
\ Or legs. So I guess its up to you' \n ] | random }}\n"
alias: Announce to house if allowed.
- alias: Send a text to Dave
if:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.text_notifications
state: 'on'
- condition: state
entity_id: input_boolean.text_notifications_dave
state: 'on'
then:
- action: script.text_notify_dave
data:
message: That's the dishwasher finished.
title: DISHWASHER
- alias: Send a text to Gem
if:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.text_notifications
state: 'on'
- condition: state
entity_id: input_boolean.text_notifications_gem
state: 'on'
then:
- action: script.text_notify_gem
data:
message: That's the dishwasher finished.
title: DISHWASHER
mode: single
- alias: En Suite Lights with presence
description: Lights on and off with presence and timer
triggers:
- entity_id:
- binary_sensor.en_suite_presence_occupancy
from: 'off'
to: 'on'
id: Presence Detected
trigger: state
- trigger: state
entity_id:
- switch.en_suite_switch_left
from: 'off'
to: 'on'
id: Light On
- entity_id:
- binary_sensor.en_suite_presence_occupancy
from: 'on'
to: 'off'
for:
hours: 0
minutes: 1
seconds: 0
id: Absence Detected
trigger: state
- entity_id:
- binary_sensor.en_suite_door_contact
from: 'on'
to: 'off'
id: Door Closed
trigger: state
- entity_id:
- binary_sensor.en_suite_door_contact
from: 'off'
to: 'on'
id: Door Open
for:
hours: 0
minutes: 0
seconds: 0
trigger: state
- event_type: timer.finished
event_data:
entity_id: timer.en_suite_light
id: Timer Done
alias: When En-Suite timer runs down
trigger: event
- at: '18:30:00'
id: Auto Off
trigger: time
- at: '19:30:00'
id: Auto On
trigger: time
- event_type: timer.finished
event_data:
entity_id: timer.en_suite_light_long
id: Long Timer Done
alias: When long En-Suite timer runs down
trigger: event
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Presence Detected
- alias: Light is off and is allowed to come on.
condition: and
conditions:
- condition: state
entity_id: input_boolean.allow_en_suite_lights_on
state: 'on'
- condition: state
entity_id: switch.en_suite_switch_left
state: 'off'
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.en_suite_presence_illuminance
below: input_number.low_light_threshold
- condition: sun
before: sunrise
after: sunset
alias: Light level is low or between sunset & sunrise
sequence:
- alias: Turn on light.
action: switch.turn_on
data: {}
target:
entity_id: switch.en_suite_switch_left
alias: Turn on lights when entering
- conditions:
- condition: trigger
id:
- Timer Done
- Absence Detected
- condition: state
entity_id: binary_sensor.en_suite_door_contact
state: 'on'
- condition: state
entity_id: timer.en_suite_light
state: idle
- condition: state
entity_id: switch.en_suite_switch_left
state: 'on'
- condition: state
entity_id: input_boolean.allow_en_suite_auto_lights
state: 'on'
sequence:
- action: switch.turn_off
target:
entity_id:
- switch.en_suite_switch_left
data: {}
alias: Turn off lights after 5 minutes if door left open, otherwise leave the
light on
- conditions:
- condition: trigger
id:
- Door Open
- condition: state
entity_id: input_boolean.allow_en_suite_lights_on
state: 'on'
sequence:
- alias: Turn on light when opening door to enter and off when leaving
if:
- condition: state
entity_id: switch.en_suite_switch_left
state: 'on'
then:
- action: switch.turn_off
target:
entity_id:
- switch.en_suite_switch_left
data: {}
else:
- if:
- condition: state
entity_id: binary_sensor.en_suite_presence_occupancy
state: 'off'
- alias: Light level is low or between sunset & sunrise
condition: or
conditions:
- condition: numeric_state
entity_id: sensor.en_suite_presence_illuminance
below: input_number.low_light_threshold
- condition: sun
before: sunrise
after: sunset
then:
- alias: Turn on light.
action: switch.turn_on
data: {}
target:
entity_id: switch.en_suite_switch_left
alias: If no motion, and allowed, turn on the light.
alias: Turn on or off lights when door is opened
- conditions:
- condition: trigger
id:
- Auto Off
- condition: state
entity_id: sensor.day_of_week
state: Sunday
sequence:
- action: input_boolean.turn_off
target:
entity_id: input_boolean.allow_en_suite_auto_lights
data: {}
- conditions:
- condition: trigger
id:
- Auto On
- condition: state
entity_id: sensor.day_of_week
state: Sunday
sequence:
- action: input_boolean.turn_on
target:
entity_id:
- input_boolean.allow_en_suite_auto_lights
data: {}
- conditions:
- condition: trigger
id:
- Long Timer Done
- condition: state
entity_id: binary_sensor.en_suite_door_contact
state: 'off'
- condition: state
entity_id: switch.en_suite_switch_left
state: 'on'
- condition: state
entity_id: input_boolean.room_occupied_en_suite
state: 'off'
sequence:
- action: switch.turn_off
target:
entity_id: switch.en_suite_switch_left
data: {}
alias: Turn of light after 30 mins regardless.
- conditions:
- condition: trigger
id:
- Light On
sequence:
- action: timer.start
target:
entity_id:
- timer.en_suite_light
- timer.en_suite_light_long
data: {}
alias: When the light turns on, start the timers.
mode: restart
- alias: 'ESPHome: Update all ESPHome devices'
description: ''
triggers:
- trigger: template
value_template: '{{ integration_entities(''esphome'') | select(''match'',''^update.'')
| select(''is_state'',''on'') | list | count > 0 }}'
alias: When an ESPHome update is available
conditions: []
actions:
- action: script.esphome_update_all_esphome_devices
metadata: {}
data: {}
mode: single
- alias: Family Has Arrived
description: ''
mode: single
triggers:
- entity_id:
- binary_sensor.family_home
from: 'off'
to: 'on'
id: Auto
trigger: state
- entity_id:
- input_boolean.family_is_home
from: 'off'
to: 'on'
id: Manual
trigger: state
conditions:
- condition: state
entity_id: input_boolean.family_is_home
state: 'off'
actions:
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.family_is_home
- alias: 'Family has left '
description: ''
mode: single
triggers:
- entity_id:
- binary_sensor.family_home
from: 'on'
to: 'off'
id: Auto
trigger: state
- entity_id:
- input_boolean.family_is_home
from: 'on'
to: 'off'
id: Manual
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Auto
sequence:
- action: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.family_is_home
- action: input_boolean.turn_on
target:
entity_id: input_boolean.welcome_home
data: {}
- alias: FitBit Automations
description: ''
triggers:
- entity_id:
- sensor.sense_battery_level_3
below: 20
id: Low battery
trigger: numeric_state
- entity_id:
- sensor.sense_battery_level_3
above: 99.9
id: Charged
trigger: numeric_state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Low battery
sequence:
- action: script.text_notify_dave
data:
title: FITBIT ALERT
message: Your FitBit battery is low. Please charge.
- conditions:
- condition: trigger
id:
- Charged
sequence:
- action: script.text_notify_dave
data:
title: FITBIT ALERT
message: Your FitBit battery is charged.
mode: single
- alias: Fridge & Freezer Door Watch
description: Warn me when the fridge or freezer door has been left open
trigger:
- type: opened
platform: device
device_id: 9f175af0bcfb7c593fe265275f7fccc1
entity_id: binary_sensor.fridge_door_sensor_contact
domain: binary_sensor
id: Fridge Door Open
for:
hours: 0
minutes: 2
seconds: 0
alias: Fridge door open for 2 minutes
- type: opened
platform: device
device_id: 8297aa8791f38c9e27c1fd00bc82cdc4
entity_id: binary_sensor.freezer_door_sensor_contact
domain: binary_sensor
id: Freezer Door Open
for:
hours: 0
minutes: 2
seconds: 0
alias: Freezer door open for 2 minutes
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Fridge Door Open
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
sequence:
- service: notify.alexa_media_kitchen_echo_show
data:
message: "{{ [ 'Pardon me, sir. The fridge appears to be open. Did someone\
\ forget to close it?',\n 'Excuse me, sir.\
\ Has anyone noticed that it is getting colder? Perhaps it is something\
\ to do with the fridge door being open', \n 'Pardon me, madam. Would whoever was last in the fridge\
\ please check the door. It appears to be open', \n 'Pardon me, madam. The automatic fridge door\
\ closing system seems to have failed. Manual operation has been enabled,\
\ which means you need to close it yourself' \n ]|random }}"
data:
type: tts
method: speak
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- if:
- type: is_open
condition: device
device_id: 8297aa8791f38c9e27c1fd00bc82cdc4
entity_id: binary_sensor.fridge_door_sensor_contact
domain: binary_sensor
then:
- service: notify.alexa_media_kitchen_echo_show
data:
message: {{ ['Pardon
my continued interruptions, but the fridge door is still open. Someone
needs to close it before the food starts to go off?', 'Pardon me interrupting again. Has anyone noticed that it
is still getting colder? Perhaps it is something to do with the fridge
door still being open', 'Sorry to harp
on about this, but whoever was last in the fridge needs to check the
door. It appears to be still open', 'Alert,
Alert, Alert. Having informed you once that the automatic fridge door
closing system seems to have failed, manual operation also seems to
have failed. Unless you want a very smelly fridge, you need to close
it yourself', ]|random }}
data:
type: tts
method: speak
alias: fridge door has not been closed yet
else:
- service: notify.alexa_media_kitchen_echo_show
data:
message: "{{ ['Thank you for closing the fridge door. You saved all the food',\
\ \n 'Well, that was close, but the\
\ fridge door is secure once more. I can already feel it getting warmer',\n\
\ 'Attention! Thank goodness the automatic\
\ fridge door closing systems self repair mechanism stepped in to save\
\ the food in the fridge',\n 'Pardon me. You will be pleased to know that we can all relax again,\
\ safe in the knowledge that the fridge is a place of cold once more'\
\ \n ]|random }}"
data:
type: tts
method: speak
- conditions:
- condition: trigger
id: Freezer Door Open
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
sequence:
- service: notify.alexa_media_kitchen_echo_show
data:
message: "{{ [ 'Pardon me sir. The freezer door appears to be open. Did\
\ someone forget to close it?', \n 'Excuse me madam. Has anyone noticed that it is getting colder? Perhaps\
\ it is something to do with the freezer door being open', \
\ \n 'Pardon me sir. Would whomever\
\ was last in the freezer needs please check the door. It appears to be\
\ open', \n 'Excuse me sir.\
\ The automatic freezer door clozing system seems to have failed. Manual\
\ operation has been enabled, which means you need to close it yourself',\
\ \n 'Burururururururururur.\
\ Is that ice creeping across the floor? Ah yes, the freezer door is open.\
\ Someone needs to close it please'\n ]|random }}"
data:
type: tts
method: speak
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- if:
- type: is_open
condition: device
device_id: 8297aa8791f38c9e27c1fd00bc82cdc4
entity_id: binary_sensor.freezer_door_sensor_contact
domain: binary_sensor
then:
- service: notify.alexa_media_kitchen_echo_show
data:
message: "{{ ['Alert, Alert, Alert. The freezer door is still open,\
\ despite my previous notification. Will someone please close it before\
\ there is a puddle on the floor', \n 'Pardon my continued interruptions.\
\ Has anyone noticed that it still feels like a summer day in antartica?\
\ Perhaps it is something to do with the freezer door still being open',\
\ \n 'Excuse me. The automatic freezer door closing system seems\
\ to have failed in spectacular fashion. Manual operation has been engaged,\
\ which means you need to close it yourself', \n 'Okay. Here is\
\ my honest assessment of our current predicament. The freezer is not\
\ going to close itself. Operation close the goddamn freezer door has\
\ commenced' \n ]|random }}"
data:
type: tts
method: speak
alias: freezer door has not been closed yet
else:
- service: notify.alexa_media_kitchen_echo_show
data:
message: "{{ ['Thank you for closing the freezer door. You saved all the\
\ food', \n 'Well, that was close, but the feezer door is\
\ secure once more. I can already feel it getting warmer',\n 'Attention!\
\ Thank goodness the automatic freezer door closing systems self repair\
\ mechanism stepped in to prevent a massive puddle on the floor',\n\
\ 'Pardon me. You will be pleased to know that we can all relax\
\ again, safe in the knowledge that the freezer is the only sub zero\
\ place in the house' \n ]|random }}"
data:
type: tts
method: speak
mode: parallel
max: 10
- alias: Front Door Visitor
description: ''
triggers:
- entity_id:
- binary_sensor.front_doorbell_camera_visitor
to: 'on'
from: 'off'
id: Visitor
trigger: state
- entity_id:
- binary_sensor.front_door_sense_contact
from: 'off'
to: 'on'
id: Door Open
trigger: state
- entity_id:
- binary_sensor.dave_home
from: 'on'
to: 'off'
id: Dave Out
trigger: state
- entity_id:
- binary_sensor.dave_home
from: 'off'
to: 'on'
id: Dave Home
trigger: state
- entity_id:
- binary_sensor.family_home
from: 'on'
to: 'off'
id: Family Out
trigger: state
- entity_id:
- binary_sensor.family_home
from: 'off'
to: 'on'
id: Family Home
trigger: state
- trigger: state
entity_id:
- binary_sensor.front_doorbell_camera_motion
- binary_sensor.front_door_person_detected
id: Motion Detected
from: 'off'
to: 'on'
- trigger: time
at:
- 08:30:00
- '15:10:00'
id: Time off
alias: When school run starts
- trigger: time
at:
- 08:55:00
- '15:25:00'
id: Time on
alias: When school run ends
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Visitor
sequence:
- action: camera.snapshot
target:
entity_id: camera.front_doorbell_camera_snapshots_clear
data:
filename: /config/www/doorbell/snapshot_doorbell.jpg
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: notify.mobile_app_daves_samsung_galaxy
data:
title: DOORBELL!
message: Someone is at the front door!
data:
image: /local/doorbell/snapshot_doorbell.jpg
clickAction: /lovelace/camera
ttl: 0
priority: high
- action: notify.mobile_app_sm_s901b
data:
title: DOORBELL!
message: Someone is at the front door!
data:
image: /local/doorbell/snapshot_doorbell.jpg
clickAction: /lovelace/camera
ttl: 0
priority: high
- target:
entity_id: input_boolean.front_doorbell_active
data: {}
action: input_boolean.toggle
- target:
entity_id: number.front_doorbell_camera_auto_quick_reply_time
data:
value: '30'
action: number.set_value
- target:
entity_id: select.front_doorbell_camera_auto_quick_reply_message
data:
option: Hi, please leave the package at the door. We will get it later.
action: select.select_option
- action: browser_mod.popup
data:
dismissable: true
autoclose: false
browser_id:
- 026643b75a9d5ce11b9b97fd0df84055
content:
camera_view: live
type: picture-glance
entities: []
camera_image: camera.front_doorbell_camera_clear
title: Doorbell
timeout: 120000
size: normal
enabled: false
- conditions:
- condition: trigger
id:
- Door Open
- condition: state
entity_id: input_boolean.front_doorbell_active
state: 'on'
sequence:
- target:
entity_id: input_boolean.front_doorbell_active
data: {}
action: input_boolean.toggle
- target:
entity_id: select.front_doorbell_camera_auto_quick_reply_message
data:
option: 'off'
action: select.select_option
- conditions:
- condition: trigger
id:
- Dave Out
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: state
entity_id: calendar.gem_holidays
state: 'off'
sequence:
- target:
entity_id: select.front_doorbell_camera_auto_quick_reply_message
data:
option: Hi, please leave the package at the door. We will get it later.
action: select.select_option
- conditions:
- condition: trigger
id:
- Dave Home
sequence:
- target:
entity_id: select.front_doorbell_camera_auto_quick_reply_message
data:
option: 'off'
action: select.select_option
- conditions:
- condition: trigger
id:
- Motion Detected
- condition: state
entity_id: input_boolean.doorbell_motion_no_trigger
state: 'off'
- condition: state
entity_id: binary_sensor.family_home
state: 'off'
sequence:
- action: script.doorbell_camera_snapshot_ai_notify
data: {}
- conditions:
- condition: trigger
id:
- Time off
sequence:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.doorbell_motion_no_trigger
data: {}
- conditions:
- condition: trigger
id:
- Time on
sequence:
- action: input_boolean.turn_off
target:
entity_id: input_boolean.doorbell_motion_no_trigger
data: {}
mode: restart
- alias: Frost Warning
description: ''
triggers:
- entity_id:
- sensor.outdside_thermal_comfort_frost_risk
to: probable
id: Probable
trigger: state
for:
hours: 0
minutes: 5
seconds: 0
- entity_id:
- sensor.outdside_thermal_comfort_frost_risk
to: high
id: High Probability
trigger: state
for:
hours: 0
minutes: 5
seconds: 0
- entity_id:
- sensor.outdside_thermal_comfort_frost_risk
to: probable
id: Probable again
trigger: state
from: high
for:
hours: 0
minutes: 5
seconds: 0
- entity_id:
- sensor.outdside_thermal_comfort_frost_risk
to: no_risk
id: No Risk
trigger: state
for:
hours: 0
minutes: 5
seconds: 0
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Probable
sequence:
- action: script.text_notify_parents
metadata: {}
data:
title: FROST RISK - PROBABLE
message: There may be a frost tonight.
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
- if:
- condition: template
value_template: '{{is_state(''binary_sensor.dave_home'',''on'')}}'
then:
action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: It will probably be frosty tonight.
else:
action: script.jarvis_speech_engine_v3_0
data:
where: gem
type: announcement
message: It will probably be frosty tonight.
alias: Announce to Dave if he is home, else announce to Gem.
- conditions:
- condition: trigger
id:
- High Probability
sequence:
- action: script.text_notify_parents
metadata: {}
data:
title: FROST RISK - HIGHLY PROBABLE
message: There will most likely be a frost tonight.
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
- if:
- condition: template
value_template: '{{is_state(''binary_sensor.dave_home'',''on'')}}'
then:
action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: There is a good chance it will be frosty tonight.
else:
action: script.jarvis_speech_engine_v3_0
data:
where: gem
type: announcement
message: There is a good chance it will be frosty tonight.
alias: Announce to Dave if he is home, else announce to Gem.
- conditions:
- condition: trigger
id:
- Probable again
sequence:
- action: script.text_notify_parents
metadata: {}
data:
title: FROST RISK - PROBABLE AGAIN
message: The frost risk has dropped to probable again.
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
- if:
- condition: template
value_template: '{{is_state(''binary_sensor.dave_home'',''on'')}}'
then:
action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: It might not be frosty now.
else:
action: script.jarvis_speech_engine_v3_0
data:
where: gem
type: announcement
message: It might not be frosty now.
alias: Announce to Dave if he is home, else announce to Gem.
- conditions:
- condition: trigger
id:
- No Risk
sequence:
- action: script.text_notify_parents
metadata: {}
data:
title: FROST RISK - CANCELLED
message: There is no chance of frost at the moment.
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
- if:
- condition: template
value_template: '{{is_state(''binary_sensor.dave_home'',''on'')}}'
then:
action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: It is highly unlikely to be frosty tonight.
else:
action: script.jarvis_speech_engine_v3_0
data:
where: gem
type: announcement
message: It is highly unlikely to be frosty tonight..
alias: Announce to Dave if he is home, else announce to Gem.
mode: single
- alias: Garage Dehumdifier Water Tray Full
description: ''
triggers:
- entity_id:
- sensor.garage_dehumidifier_water_tray_full
from: not_full
to: full
id: Full
trigger: state
- entity_id:
- sensor.garage_dehumidifier_water_tray_full
from: full
to: not_full
id: Not Full
trigger: state
- entity_id:
- sensor.garage_thermometer_temperature
below: sensor.garage_thermal_comfort_dew_point
id: Rust Risk
trigger: numeric_state
- entity_id:
- sensor.garage_thermometer_temperature
above: 8
id: Restart
trigger: numeric_state
- entity_id:
- humidifier.garage_dehumidifier_2
to: 'off'
id: 'Off'
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Full
sequence:
- action: script.text_notify_dave
data:
message: "{{[ 'The garage dehumidifier is full',\n 'The garage rust prevention\
\ system has stalled',\n 'The garage humidity level is increasing exponentially']|random\
\ }}\n"
title: GARAGE DEHUMIDIFIER
alias: Send a notification based on an input text helper
- alias: Broadcast message outside quiet time
if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.announcement_playing
data: {}
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: "{{ [ 'This is an important announcement for the man of the\
\ house. The garage dehumidifier water tray is full. Please empty it.',\
\ \n 'I have detected a momentary increase in humidity in the\
\ garage. Perhaps the atmospheric water extraction device has extracted\
\ as much moisture as it can hold', \n 'The weather girls have\
\ reported a rise in humidity and a fall in barometric pressure. While\
\ it is not raining men, perhaps the garage dehumidifier is full', \
\ \n 'The garage rust prevention device has stalled. Unless you\
\ want your cars to disintegrate into a heap of iron oxide, might I\
\ suggest you take immediate action.' \n ]|random }}"
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- action: input_boolean.turn_off
target:
entity_id:
- input_boolean.announcement_playing
data: {}
- action: light.turn_on
data:
rgb_color:
- 133
- 255
- 255
brightness: 10
target:
entity_id: light.kitchen_aura_lamp_2
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.garage_dehumidifier_full
- conditions:
- condition: trigger
id:
- Not Full
sequence:
- action: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.garage_dehumidifier_full
- alias: Broadcast message outside quiet time
if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.announcement_playing
data: {}
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: "{{ [ 'Well now. Whoever emptied the garage dehumidifier, thank\
\ you.', \n 'I have detected a slightly longer term reduction\
\ in humidity in the garage. Thankfully, its because the atmospheric\
\ water extraction device has once again commenced extracting moisture.',\
\ \n 'The weather girls have reported a fall in humidity and\
\ a increase in barometric pressure. While it is not raining men, it\
\ is good to see the garage dehumidifier is empty once more', \n \
\ 'The garage rust prevention device has recommenced operation.\
\ You have saved your cars from disintegrating into a heap of iron oxide.'\
\ \n ]|random }}"
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
- action: input_boolean.turn_off
target:
entity_id:
- input_boolean.announcement_playing
data: {}
- if:
- condition: state
entity_id: binary_sensor.morning
state: 'on'
alias: If Morning
then:
- action: light.turn_on
data:
effect: Morning
brightness_pct: 1
target:
entity_id: light.kitchen_aura_lamp_2
else:
- if:
- condition: state
entity_id: binary_sensor.lunchtime
state: 'on'
alias: If Lunchtime
then:
- action: light.turn_on
data:
effect: Falling Petals
brightness_pct: 1
target:
entity_id: light.kitchen_aura_lamp_2
else:
- if:
- condition: state
entity_id: binary_sensor.afternoon
state: 'on'
alias: If Afternoon
then:
- action: light.turn_on
data:
effect: Forest
brightness_pct: 1
target:
entity_id: light.kitchen_aura_lamp_2
else:
- if:
- condition: state
entity_id: binary_sensor.dinner_time
state: 'on'
alias: If Dinnertime
then:
- action: light.turn_on
data:
effect: Eating Dots
brightness_pct: 1
target:
entity_id: light.kitchen_aura_lamp_2
else:
- action: light.turn_on
target:
entity_id: light.kitchen_aura_lamp_2
data:
effect: Firefly
brightness_pct: 1
- conditions:
- condition: trigger
id:
- Rust Risk
sequence:
- action: script.text_notify_dave
data:
message: Risk of condensation in the garage
title: RISK OF RUST FORMATION
- conditions:
- condition: trigger
id:
- Restart
- condition: state
entity_id: humidifier.garage_dehumidifier_2
state: 'off'
- condition: numeric_state
entity_id: sensor.garage_thermometer_humidity
above: 60
sequence:
- action: humidifier.turn_on
target:
entity_id: humidifier.garage_dehumidifier_2
data: {}
- conditions:
- condition: trigger
id:
- 'Off'
- condition: numeric_state
entity_id: sensor.garage_thermometer_temperature
below: 10
sequence:
- action: script.text_notify_dave
data:
title: DEHUMIDIFIER OFF
message: The garage dehumdifier has turned off due to low temperature.
mode: restart
- alias: Garage Lights With Doors
description: ''
mode: single
triggers:
- entity_id:
- sensor.garage_door_state
to: Open
id: Open
trigger: state
- entity_id:
- sensor.garage_door_state
to: Closed
id: Closed
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Open
alias: Turn on lights when a door is opened
- condition: state
entity_id: light.garage_lights
state: 'off'
sequence:
- action: light.turn_on
data: {}
target:
entity_id: light.garage_lights
- conditions:
- condition: trigger
id:
- Closed
- condition: state
entity_id: light.garage_lights
state: 'on'
sequence:
- action: light.turn_off
target:
entity_id: light.garage_lights
data: {}
- alias: Get Battery Output Limit
description: Send a notification asking if the battery output should be limited
overnight
triggers:
- at: '21:05:00'
trigger: time
conditions: []
actions:
- alias: Send a notification to my phone
data:
message: 'Do you want to limit the battery output overnight?
'
title: Battery Output Limit
data:
actions:
- action: 'YES'
title: 'Yes'
- action: 'NO'
title: 'No'
action: notify.mobile_app_daves_samsung_galaxy
- alias: Wait for a response
wait_for_trigger:
- event_type: mobile_app_notification_action
event_data:
action: 'YES'
trigger: event
- event_type: mobile_app_notification_action
event_data:
action: 'NO'
trigger: event
timeout:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
continue_on_timeout: true
- choose:
- conditions:
- condition: template
value_template: '{{ not wait.trigger }}'
sequence:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.allow_battery_output_limit
data: {}
- action: script.text_notify_dave
data:
title: BATTERY WILL BE LIMITED OVERNIGHT
message: Please ensure you have set time slots.
alias: If no response received limit battery
- conditions:
- condition: template
value_template: '{{ wait.trigger.event.data.action == "YES" }}'
sequence:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.allow_battery_output_limit
data: {}
- action: script.text_notify_dave
data:
title: BATTERY WILL BE LIMITED OVERNIGHT
message: Please ensure you have set time slots.
alias: If response is YES limit battery
- conditions:
- condition: template
value_template: '{{ wait.trigger.event.data.action == "NO" }}'
sequence:
- if:
- condition: state
entity_id: input_boolean.allow_battery_output_limit
state: 'on'
then:
- action: input_boolean.turn_off
target:
entity_id: input_boolean.allow_battery_output_limit
data: {}
alias: If Battery Limit Master is on turn it off
- action: script.text_notify_dave
data:
title: BATTERY WILL NOT BE LIMITED OVERNIGHT
message: Please check no time slots are set.
alias: If response is NO don't limit battery
mode: single
- alias: Get ready for school
description: ''
triggers:
- at: input_datetime.get_ready_for_school_at
trigger: time
conditions:
- condition: state
entity_id: calendar.school_day
state: 'on'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
actions:
- action: script.boys_get_dressed_announcement
data: {}
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- action: script.boys_brush_teeth_announcement
data: {}
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- action: switch.turn_off
data: {}
target:
entity_id: switch.living_room_tv
enabled: true
- action: media_player.turn_off
data: {}
target:
entity_id: media_player.sky_q_main
enabled: true
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- action: script.boys_late_for_school
data: {}
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.school_morning_announcement_played
- action: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.sean_dressed_first
mode: single
- alias: Google Drive Backup Monitor
description: Send a notification to Dave's phone if the Google Drive Backup fails
trigger:
- platform: state
entity_id:
- binary_sensor.backups_stale
from: 'off'
to: 'on'
condition: []
action:
- service: notify.mobile_app_{{states('input_text.my_mobile_phone_id')}}
data:
message: Access the Home Assistant Google Drive Backup add-on for details
title: There is an issue with the backups
alias: Send a notification based on an input text helper
mode: single
- alias: Granny Charger Toggle
description: Uses granny charger to charge EV when there is sufficient sunshine
trigger:
- platform: state
entity_id:
- sensor.solaredge_b1_state_of_energy
id: Battery Charge Level
- platform: state
entity_id:
- sensor.solar_panel_production_w
id: Panel Power
condition: []
action:
- choose:
- conditions:
- condition: and
conditions:
- condition: trigger
id: Panel Power
- condition: state
entity_id: switch.valkyrie_switch_1
state: 'on'
enabled: false
- condition: device
type: is_off
device_id: 3e12cbf22e7fcfd5924b41a20289cc2b
entity_id: switch.granny_charger_local
domain: switch
- type: is_battery_level
condition: device
device_id: fde0fef8291e927bf8ae0d38ba5e36ce
entity_id: sensor.solaredge_b1_state_of_energy
domain: sensor
above: 95
alias: Battery state of energy is more than 95%
- condition: numeric_state
entity_id: sensor.solar_exported_power_w
above: 2500
alias: Exported power is more than 2500W
sequence:
- type: turn_on
device_id: 3e12cbf22e7fcfd5924b41a20289cc2b
entity_id: switch.granny_charger_local
domain: switch
- conditions:
- condition: and
conditions:
- condition: trigger
id: Battery Charge Level
- condition: numeric_state
entity_id: sensor.solar_house_consumption_w
above: sensor.solar_panel_production_w
- condition: device
type: is_on
device_id: 3e12cbf22e7fcfd5924b41a20289cc2b
entity_id: switch.granny_charger_local
domain: switch
sequence:
- type: turn_off
device_id: 3e12cbf22e7fcfd5924b41a20289cc2b
entity_id: switch.granny_charger_local
domain: switch
- conditions:
- condition: trigger
id: Battery Charge Level
- condition: numeric_state
entity_id: sensor.solaredge_b1_state_of_energy
below: 97
- condition: device
type: is_on
device_id: 3e12cbf22e7fcfd5924b41a20289cc2b
entity_id: switch.granny_charger_local
domain: switch
sequence:
- type: turn_off
device_id: 3e12cbf22e7fcfd5924b41a20289cc2b
entity_id: switch.granny_charger_local
domain: switch
mode: single
- alias: Greenhouse & Polytunnel Temp Monitor
description: Monitor the temperature in the greenhouses and poly tunnel and monitor
the state of the doors.
triggers:
- entity_id:
- sensor.greenhouse_thermometer_temperature
- sensor.poly_tunnel_temperature_temperature
- sensor.lean_to_greenhouse_thermometer_temperature
below: 18
id: Close
trigger: numeric_state
for:
hours: 0
minutes: 5
seconds: 0
- entity_id:
- sensor.greenhouse_thermometer_temperature
- sensor.poly_tunnel_temperature_temperature
- sensor.lean_to_greenhouse_thermometer_temperature
above: 25
id: Open
trigger: numeric_state
for:
hours: 0
minutes: 5
seconds: 0
- trigger: time
at: '21:02:00'
id: Last check
enabled: true
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Open
- condition: template
value_template: '{{"Poly" in trigger.to_state.attributes.friendly_name }}'
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.poly_tunnel_door_1_contact
state: 'off'
- condition: state
entity_id: binary_sensor.poly_tunnel_door_upper
state: 'off'
- condition: state
entity_id: binary_sensor.poly_tunnel_door_2_2
state: 'off'
sequence:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: "{{ ['Oh, don’t mind me, just slowly wilting away in this furnace\
\ of a poly tunnel while you go about your day. But hey, if you happen\
\ to remember I exist, maybe crack a door open?',\n 'I suppose this\
\ is how it ends. Trapped in an oven-like poly tunnel, leaves shriveling,\
\ roots baking… all because someone forgot that plants like air. But no,\
\ no, you go ahead, I’ll just suffer in silence.',\n 'Oh wow, what\
\ a brilliant idea. lock me in this poly tunnel with the sun blasting\
\ down. Truly, a masterclass in poly tunnel management. But, I dunno,\
\ maybe… just maybe… OPEN THE DOORS?',\n 'Look, I get it, you’re busy.\
\ But if I start photosynthesizing fire, that’s on you. I highly recommend\
\ some urgent ventilation in the poly tunnel before things get crispy\
\ in here.',\n 'I guess this is just my life now. A glorified steamed\
\ vegetable. No, no, don’t rush on my account—I’ll just sit here, melting\
\ in this poly tunnel, while you enjoy your comfortable, breezy existence.'\n\
\ ] | random }}\n"
- conditions:
- condition: trigger
id:
- Open
- condition: template
value_template: '{{"Lean" in trigger.to_state.attributes.friendly_name }}'
- condition: state
entity_id: binary_sensor.lean_to_greenhouse_door
state: 'off'
sequence:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: "{{ ['Oh, don’t mind me, just slowly wilting away in this furnace\
\ of a lean-too greenhouse while you go about your day. But hey, if you\
\ happen to remember I exist, maybe crack a door open?',\n 'I suppose\
\ this is how it ends. Trapped in an oven-like lean-too, leaves shriveling,\
\ roots baking… all because someone forgot that plants like air. But no,\
\ no, you go ahead, I’ll just suffer in silence.',\n 'Oh wow, what\
\ a brilliant idea. lock me in this greenhouse with the sun blasting down.\
\ Truly, a masterclass in lean too management. But, I dunno, maybe… just\
\ maybe… OPEN THE DOORS?',\n 'Look, I get it, you’re busy. But if I\
\ start photosynthesizing fire, that’s on you. I highly recommend some\
\ urgent ventilation in the lean-too greenhouse before things get crispy\
\ in here.',\n 'I guess this is just my life now. A glorified steamed\
\ vegetable. No, no, don’t rush on my account—I’ll just sit here, melting\
\ in this lean-too, while you enjoy your comfortable, breezy existence.'\n\
\ ] | random }}\n"
- conditions:
- condition: trigger
id:
- Open
- condition: template
value_template: '{{"Lean" not in trigger.to_state.attributes.friendly_name
and "Poly" not in trigger.to_state.attributes.friendly_name }}'
- condition: state
entity_id: binary_sensor.greenhouse_door_contact
state: 'off'
sequence:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: "{{ ['Oh, don’t mind me, just slowly wilting away in this furnace\
\ of a greenhouse while you go about your day. But hey, if you happen\
\ to remember I exist, maybe crack a door open?',\n 'I suppose this\
\ is how it ends. Trapped in an oven-like greenhouse, leaves shriveling,\
\ roots baking… all because someone forgot that plants like air. But no,\
\ no, you go ahead, I’ll just suffer in silence.',\n 'Oh wow, what\
\ a brilliant idea. lock me in this greenhouse with the sun blasting down.\
\ Truly, a masterclass in greenhouse management. But, I dunno, maybe…\
\ just maybe… OPEN THE DOORS?',\n 'Look, I get it, you’re busy. But\
\ if I start photosynthesizing fire, that’s on you. I highly recommend\
\ some urgent ventilation in the greenhouse before things get crispy in\
\ here.',\n 'I guess this is just my life now. A glorified steamed\
\ vegetable. No, no, don’t rush on my account—I’ll just sit here, melting\
\ in this greenhouse, while you enjoy your comfortable, breezy existence.'\n\
\ ] | random }}\n"
- conditions:
- condition: trigger
id:
- Close
- condition: template
value_template: '{{"Poly" in trigger.to_state.attributes.friendly_name }}'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.poly_tunnel_door_1_contact
state: 'on'
- condition: state
entity_id: binary_sensor.poly_tunnel_door_2_2
state: 'on'
- condition: state
entity_id: binary_sensor.poly_tunnel_door_upper
state: 'on'
sequence:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: "{{ ['Ah, yes, excellent plan—let all my precious warmth just escape\
\ into the abyss. I love being a shivering wreck. Perhaps you could do\
\ me a solid and shut the poly tunnel doors before I freeze to death?',\n\
\ 'Oh, no, don’t mind me, just desperately clinging to the last bit\
\ of warmth in this ever-chilling poly tunnel. But sure, let’s just air-condition\
\ the garden, shall we?',\n 'BRRR! Is this your idea of a tropical\
\ paradise? Because I was under the impression that a poly tunnel is supposed\
\ to be WARM. Maybe, just maybe, close the doors before I become a frost-bitten\
\ tragedy?',\n 'Ah, I see, we’re doing the turn the poly tunnel into\
\ an fridge experiment today. Fascinating. But if you don’t mind, I’d\
\ rather not experience hypothermia. Shut the doors?',\n 'Oh great,\
\ the cozy warmth I worked so hard to absorb all day is just slipping\
\ away, like my trust in your ability to care for me. Maybe, just maybe,\
\ sealing up the poly tunnel would help?'\n ] | random }}\n"
- conditions:
- condition: trigger
id:
- Close
- condition: template
value_template: '{{"Lean" in trigger.to_state.attributes.friendly_name }}'
- condition: state
entity_id: binary_sensor.lean_to_greenhouse_door
state: 'on'
sequence:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: "{{ ['Ah, yes, excellent plan—let all my precious warmth just escape\
\ into the abyss. I love being a shivering wreck. Perhaps you could do\
\ me a solid and shut the lean-too doors before I freeze to death?',\n\
\ 'Oh, no, don’t mind me, just desperately clinging to the last bit\
\ of warmth in this ever-chilling lean-too. But sure, let’s just air-condition\
\ the garden, shall we?',\n 'BRRR! Is this your idea of a tropical\
\ paradise? Because I was under the impression that a lean-too greenhouse\
\ is supposed to be WARM. Maybe, just maybe, close the doors before I\
\ become a frost-bitten tragedy?',\n 'Ah, I see, we’re doing the turn\
\ the lean-too greenhouse into an fridge experiment today. Fascinating.\
\ But if you don’t mind, I’d rather not experience hypothermia. Shut the\
\ doors?',\n 'Oh great, the cozy warmth I worked so hard to absorb\
\ all day is just slipping away, like my trust in your ability to care\
\ for me. Maybe, just maybe, sealing up the lean-too would help?'\n \
\ ] | random }}\n"
- conditions:
- condition: trigger
id:
- Close
- condition: template
value_template: '{{"Lean" not in trigger.to_state.attributes.friendly_name
and "Poly" not in trigger.to_state.attributes.friendly_name }}'
- condition: state
entity_id: binary_sensor.greenhouse_door_contact
state: 'on'
sequence:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
message: "{{ ['Ah, yes, excellent plan—let all my precious warmth just escape\
\ into the abyss. I love being a shivering wreck. Perhaps you could do\
\ me a solid and shut the greenhouse door before I freeze to death?',\n\
\ 'Oh, no, don’t mind me, just desperately clinging to the last bit\
\ of warmth in this ever-chilling greenhouse. But sure, let’s just air-condition\
\ the garden, shall we?',\n 'BRRR! Is this your idea of a tropical\
\ paradise? Because I was under the impression that a greenhouse is supposed\
\ to be WARM. Maybe, just maybe, close the doors before I become a frost-bitten\
\ tragedy?',\n 'Ah, I see, we’re doing the turn the greenhouse into\
\ an fridge experiment today. Fascinating. But if you don’t mind, I’d\
\ rather not experience hypothermia. Shut the doors?',\n 'Oh great,\
\ the cozy warmth I worked so hard to absorb all day is just slipping\
\ away, like my trust in your ability to care for me. Maybe, just maybe,\
\ sealing up the greenhouse would help?'\n ] | random }}\n"
- conditions:
- condition: trigger
id:
- Last check
- condition: template
value_template: '{{ is_state(''binary_sensor.lean_to_greenhouse_door'',''on'')}}'
sequence:
- variables:
door: "{% set open_doors = expand(label_entities('Greenhouse Door'))\n \
\ |selectattr('state','eq','on')\n |map(attribute='name')\n \
\ |list %}\n{% if open_doors | length > 0 %} {% set open_doors = (open_doors\
\ | join(', ')) %}\n {% if 'Poly' in open_doors and 'Green' in open_doors\
\ %}\n The following greenhouse and poly tunnel doors and windows are\
\ open: {{ open_doors }}\n {% elif 'Poly' in open_doors %}\n The\
\ following poly tunnel doors and windows are open: {{ open_doors }}\n\
\ {% else %}\n The following greenhouse doors are open: {{ open_doors\
\ }} \n {% endif %}\n{% else %}\n All greenhouse and poly tunnel doors\
\ and windows are closed\n{% endif %}\n"
- action: script.jarvis_speech_engine_v3_0
data:
where: living room
message: 'I thought you might like to know that {{ door }}
'
mode: single
- alias: Greenhouse Heating Toggle
description: Turn on and off the greenhouse heater to keep the temperature above
3 degrees C
triggers:
- entity_id:
- sensor.greenhouse_thermometer_temperature
below: 6
id: Greenhouse Heater On
trigger: numeric_state
- entity_id:
- sensor.greenhouse_thermometer_temperature
above: 10
id: Greenhouse Heater Off
trigger: numeric_state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Greenhouse Heater On
sequence:
- action: switch.turn_on
data: {}
target:
entity_id:
- switch.heater_greenhouse_s1
- switch.heater_greenhouse_s2
- conditions:
- condition: trigger
id: Greenhouse Heater Off
sequence:
- action: switch.turn_off
data: {}
target:
entity_id:
- switch.heater_greenhouse_s1
- switch.heater_greenhouse_s2
mode: single
- alias: Grid Charge Battery Overnight with Go
description: ''
triggers:
- id: Activate Grid Charge
at: '21:00:00'
trigger: time
- id: Start Grid Charge
trigger: state
entity_id:
- binary_sensor.target_timeframes_octopus_energy_charge_home_battery
from: 'off'
to: 'on'
- id: Stop Grid Charge
trigger: state
entity_id:
- binary_sensor.target_timeframes_octopus_energy_charge_home_battery
from: 'on'
to: 'off'
- entity_id:
- switch.solaredge_i1_advanced_power_control
from: unavailable
to: 'on'
id: Inverter Reset
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Activate Grid Charge
sequence:
- action: input_boolean.turn_on
target:
entity_id:
- input_boolean.grid_charge_home_battery
device_id: []
area_id: []
data: {}
- conditions:
- condition: trigger
id:
- Start Grid Charge
- condition: state
entity_id: input_boolean.grid_charge_home_battery
state: 'on'
sequence:
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.home_battery_grid_charging
- action: script.grid_charge_battery
data: {}
- conditions:
- condition: trigger
id:
- Stop Grid Charge
sequence:
- action: script.turn_off
data: {}
target:
entity_id: script.grid_charge_battery
- action: select.select_option
target:
entity_id: select.solaredge_i1_storage_command_mode
data:
option: Maximize Self Consumption
- action: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.home_battery_grid_charging
- input_boolean.grid_charge_home_battery
- conditions:
- condition: trigger
id:
- Inverter Reset
- condition: state
entity_id: input_boolean.grid_charge_home_battery
state: 'on'
- alias: Within charge window and active
condition: and
conditions:
- condition: time
after: 00:30:00
before: 05:30:00
- condition: state
entity_id: binary_sensor.target_timeframes_octopus_energy_charge_home_battery
state: 'on'
sequence:
- action: script.grid_charge_battery
data: {}
mode: parallel
max: 10
- alias: Guest Bedroom Lights with presence
description: ''
triggers:
- entity_id:
- group.spare_room_motion
from: 'off'
to: 'on'
id: Light on
trigger: state
- entity_id:
- binary_sensor.guest_bedroom_occupied
from: 'on'
to: 'off'
id: Light off
trigger: state
- entity_id: sensor.guest_bedroom_motion_illuminance
below: input_number.low_light_threshold
id: Low Light
trigger: numeric_state
- entity_id: sensor.guest_bedroom_motion_illuminance
id: Good Light
above: input_number.upper_light_threshold_level
trigger: numeric_state
- entity_id:
- binary_sensor.guest_bed_motion_right_occupancy
- binary_sensor.guest_bed_motion_left_occupancy
from: 'off'
to: 'on'
id: Bedside light on
trigger: state
- entity_id:
- binary_sensor.guest_bed_motion_right_occupancy
- binary_sensor.guest_bed_motion_left_occupancy
from: 'on'
to: 'off'
id: Bedside light off
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id:
- switch.spare_room_light_switch
from: 'off'
to: 'on'
id: Ironing on
trigger: state
- entity_id:
- switch.spare_room_light_switch
from: 'on'
to: 'off'
id: Ironing off
trigger: state
conditions:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
actions:
- choose:
- conditions:
- condition: trigger
id: Light on
- condition: state
entity_id: input_boolean.guest_bedroom_bedside_lamps_active
state: 'on'
- condition: or
conditions:
- condition: sun
before: sunrise
after: sunset
- condition: numeric_state
entity_id: sensor.guest_bedroom_motion_illuminance
below: input_number.low_light_threshold
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
sequence:
- data: {}
target:
entity_id:
- light.spare_room_lights
action: light.turn_on
- conditions:
- condition: trigger
id: Light off
- condition: state
entity_id: input_boolean.guest_bedroom_allow_lights_off
state: 'on'
sequence:
- data: {}
target:
entity_id:
- light.spare_room_lights
action: light.turn_off
- conditions:
- condition: trigger
id:
- Low Light
- condition: state
state: 'on'
entity_id: binary_sensor.guest_bedroom_occupied
- condition: state
entity_id: binary_sensor.lights_out
state: 'off'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
sequence:
- data: {}
target:
entity_id: light.spare_room_lights
action: light.turn_on
- conditions:
- condition: trigger
id:
- Good Light
sequence:
- data: {}
target:
entity_id:
- light.guest_bedroom_bedside_lamp_left
- light.guest_bedroom_bedside_lamp_right
- light.spare_room_lights
action: light.turn_off
- conditions:
- condition: trigger
id:
- Bedside light on
- condition: template
value_template: '{{ ''Right'' in trigger.to_state.attributes.friendly_name
}}'
- condition: state
entity_id: input_boolean.guest_bedroom_bedside_lamps_active
state: 'on'
- condition: or
conditions:
- condition: sun
before: sunrise
after: sunset
- condition: numeric_state
entity_id: sensor.guest_bedroom_motion_illuminance
below: input_number.low_light_threshold
sequence:
- data: {}
target:
entity_id:
- light.guest_bedroom_bedside_lamp_right
action: light.turn_on
- conditions:
- condition: trigger
id:
- Bedside light off
- condition: template
value_template: '{{ ''Right'' in trigger.to_state.attributes.friendly_name
}}'
- condition: state
entity_id: input_boolean.guest_bedroom_allow_lights_off
state: 'on'
sequence:
- target:
entity_id:
- light.guest_bedroom_bedside_lamp_right
data: {}
action: light.turn_off
- conditions:
- condition: trigger
id:
- Bedside light on
- condition: template
value_template: '{{ ''Left'' in trigger.to_state.attributes.friendly_name
}}'
- condition: state
entity_id: input_boolean.guest_bedroom_bedside_lamps_active
state: 'on'
- condition: or
conditions:
- condition: sun
before: sunrise
after: sunset
- condition: numeric_state
entity_id: sensor.guest_bedroom_motion_illuminance
below: input_number.low_light_threshold
sequence:
- data: {}
target:
entity_id:
- light.guest_bedroom_bedside_lamp_left
action: light.turn_on
- conditions:
- condition: trigger
id:
- Bedside light off
- condition: template
value_template: '{{ ''Left'' in trigger.to_state.attributes.friendly_name
}}'
- condition: state
entity_id: input_boolean.guest_bedroom_allow_lights_off
state: 'on'
sequence:
- target:
entity_id:
- light.guest_bedroom_bedside_lamp_left
data: {}
enabled: true
action: light.turn_off
- conditions:
- condition: trigger
id:
- Ironing on
- Ironing off
sequence:
- if:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
then:
- data: {}
action: script.ironing_lights
else:
- action: light.toggle
target:
entity_id: light.spare_room_lights
data: {}
alias: If guest mode - toggle lights - else - ironing lights
mode: restart
initial_state: true
- alias: Guest Bedroom Smart Button Automation
description: ''
triggers:
- trigger: state
entity_id:
- event.smart_button_upstairs_1_action
conditions:
- condition: template
value_template: '{{ trigger.from_state.state != ''unavailable'' }}'
actions:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.to_state.attributes.event_type == ''single''
}}'
alias: Single Press
sequence:
- data: {}
action: script.spare_room_tv_toggle_2
- conditions:
- alias: Release
condition: template
value_template: '{{ trigger.to_state.attributes.event_type == ''release''
}}'
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
sequence:
- data: {}
action: script.spare_room_night_light
alias: Activate Night Lights
mode: single
initial_state: true
- alias: Guest Mode Audio Feedback
description: ''
triggers:
- entity_id:
- input_boolean.guest_mode
from: 'off'
to: 'on'
trigger: state
actions:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.announcement_playing
data: {}
- action: script.jarvis_speech_engine_v3_0
data:
where: all
type: announcement
message: '{{ [ "Guest Mode has been enabled.", "I have switched the home to
guest mode.", "I have enabled guest mode. ", "Guest Mode is on." ] | random
}}
'
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- action: input_boolean.turn_off
target:
entity_id:
- input_boolean.announcement_playing
data: {}
- alias: HACS Updates Notify
description: ''
mode: single
triggers:
- entity_id:
- sensor.hacs_updates_available
above: 1
id: Single Update
trigger: numeric_state
- entity_id:
- sensor.hacs_updates_available
above: 4
id: More Updates
trigger: numeric_state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Single Update
sequence:
- action: script.text_notify_dave
data:
title: HACS Update
message: There is a new HACS component update available.
- conditions:
- condition: trigger
id:
- More Updates
sequence:
- action: script.text_notify_dave
data:
title: More HACS Updates
message: There are now 5 HACS component updates waiting.
- id: this_is_halloween
alias: This is Halloween
initial_state: true
mode: single
trigger:
- platform: time
at: input_datetime.halloween_show
action:
- action: input_boolean.turn_on
entity_id: input_boolean.this_is_halloween
- delay: 02:00:00
- action: input_boolean.turn_off
entity_id: input_boolean.this_is_halloween
- id: operation haunted house
alias: Operation Haunted House
trigger:
- platform: state
entity_id: input_boolean.this_is_halloween
to: 'on'
from: 'off'
id: start
- platform: state
entity_id: input_boolean.this_is_halloween
id: stop
from: 'on'
to: 'off'
action:
- choose:
- conditions:
- condition: trigger
id: start
sequence:
- action: script.audio_volume_extra_spooky
data: {}
- action: media_player.play_media
data:
entity_id: media_player.all_jarvis_media_player
media_content_id: http://192.168.0.95:8123/local/haunted_sounds/This_is_Halloween.mp3
media_content_type: music
- delay: 00:03:20
- action: script.turn_on
target:
entity_id: script.haunted_house
- conditions:
- condition: trigger
id: stop
sequence:
- action: script.turn_off
target:
entity_id: script.haunted_house
- action: scene.turn_on
target:
entity_id: scene.before_haunting
default: []
initial_state: true
mode: single
- alias: Hallway Lights Needed
description: ''
mode: single
triggers:
- entity_id:
- switch.hallway_light_switch_1
- switch.hallway_light_switch_2_right
from: 'off'
to: 'on'
trigger: state
- entity_id:
- switch.hallway_light_switch_1
- switch.hallway_light_switch_2_right
from: 'on'
to: 'off'
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: light.hallway_lights
state: 'off'
sequence:
- action: light.turn_on
data: {}
target:
entity_id: light.hallway_lights
default:
- action: light.turn_off
data: {}
target:
entity_id: light.hallway_lights
- alias: Hallway Presence
description: ''
mode: single
triggers:
- entity_id:
- binary_sensor.hallway_motion
from: 'off'
to: 'on'
id: Presence
trigger: state
- entity_id:
- binary_sensor.hallway_motion
from: 'on'
to: 'off'
id: Absence
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Presence
sequence:
- action: input_text.set_value
metadata: {}
data:
value: hallway
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_hallway
- conditions:
- condition: trigger
id: Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_hallway
- alias: HEATING - All Automations
description: Detects when a window is open or closed and sets heating on or off
in that room. Detects when no-one is home and turns heating off.
trigger:
- platform: state
entity_id:
- binary_sensor.dave_home
from: 'on'
to: 'off'
for:
hours: 0
minutes: 2
seconds: 0
id: Dave Away
- platform: state
entity_id:
- binary_sensor.dave_home
from: 'off'
to: 'on'
for:
hours: 0
minutes: 2
seconds: 0
id: Dave Home
- platform: state
entity_id:
- binary_sensor.gem_home
from: 'on'
to: 'off'
for:
hours: 0
minutes: 2
seconds: 0
id: Gem Away
- platform: state
entity_id:
- binary_sensor.gem_home
from: 'off'
to: 'on'
for:
hours: 0
minutes: 2
seconds: 0
id: Gem Home
- platform: state
entity_id:
- binary_sensor.front_door_sense_contact
- binary_sensor.back_door_sensor_contact
- binary_sensor.side_door_sensor_contact
- binary_sensor.kitchen_window_left_contact
- binary_sensor.kitchen_window_right_contact
- binary_sensor.living_room_window_left_contact
- binary_sensor.living_room_window_right_contact
- binary_sensor.hallway_window_contact
to: 'on'
id: Downstairs Door or Window Open
for:
hours: 0
minutes: 0
seconds: 30
- platform: state
entity_id:
- binary_sensor.front_door_sense_contact
- binary_sensor.back_door_sensor_contact
- binary_sensor.side_door_sensor_contact
- binary_sensor.kitchen_window_left_contact
- binary_sensor.kitchen_window_right_contact
- binary_sensor.living_room_window_left_contact
- binary_sensor.living_room_window_right_contact
- binary_sensor.hallway_window_contact
to: 'off'
id: Downstairs Door or Window Closed
- type: opened
platform: device
device_id: e6ba853c7dec9cf8415d6881aa429444
entity_id: binary_sensor.dining_room_window_right_contact
domain: binary_sensor
id: Dining Room Window Right Open
- type: not_opened
platform: device
device_id: e6ba853c7dec9cf8415d6881aa429444
entity_id: binary_sensor.dining_room_window_right_contact
domain: binary_sensor
id: Dining Room Window Right Closed
- type: opened
platform: device
device_id: f9aaa501ddaeabde9538648caab6c975
entity_id: binary_sensor.cloakroom_window_contact
domain: binary_sensor
id: Cloakroom Window Open
- type: not_opened
platform: device
device_id: f9aaa501ddaeabde9538648caab6c975
entity_id: binary_sensor.cloakroom_window_contact
domain: binary_sensor
id: Cloakroom Window Closed
- type: opened
platform: device
device_id: 5af72a1353a555c5830dcba725c7cf23
entity_id: binary_sensor.en_suite_window_sensor_contact
domain: binary_sensor
id: En-Suite Window Open
- type: not_opened
platform: device
device_id: 5af72a1353a555c5830dcba725c7cf23
entity_id: binary_sensor.en_suite_window_sensor_contact
domain: binary_sensor
id: En-Suite Window Closed
- type: opened
platform: device
device_id: 13a27670b56ff35704df9339e2a668a1
entity_id: binary_sensor.office_window_sensor_contact
domain: binary_sensor
id: Office Window Open
- type: not_opened
platform: device
device_id: 13a27670b56ff35704df9339e2a668a1
entity_id: binary_sensor.office_window_sensor_contact
domain: binary_sensor
id: Office Window Closed
- platform: state
entity_id:
- binary_sensor.main_bedroom_window_left_contact
- binary_sensor.main_bedroom_window_right_contact
to: 'on'
id: Bedroom Window Open
- platform: state
entity_id:
- binary_sensor.main_bedroom_window_left_contact
- binary_sensor.main_bedroom_window_right_contact
to: 'off'
id: Bedroom Window Closed
- platform: state
entity_id:
- binary_sensor.guest_bedroom_window_left_contact
- binary_sensor.guest_bedroom_window_right_contact
id: Guest Bedroom Window Open
to: 'on'
- platform: state
entity_id:
- binary_sensor.guest_bedroom_window_left_contact
- binary_sensor.guest_bedroom_window_right_contact
to: 'off'
id: Guest Bedroom Window Closed
- platform: state
entity_id:
- binary_sensor.sean_s_bedroom_window_left_contact
- binary_sensor.sean_s_bedroom_window_right_contact
- binary_sensor.jamie_s_bedroom_window_left_contact
- binary_sensor.bathroom_window_contact
- binary_sensor.jamie_s_bedroom_window_right_contact
to: 'on'
id: Upstairs Windows Open
- platform: state
entity_id:
- binary_sensor.sean_s_bedroom_window_left_contact
- binary_sensor.sean_s_bedroom_window_right_contact
- binary_sensor.bathroom_window_contact
- binary_sensor.jamie_s_bedroom_window_left_contact
- binary_sensor.jamie_s_bedroom_window_right_contact
to: 'off'
id: Upstairs Windows Closed
- platform: state
entity_id:
- binary_sensor.kids_bathroom_window_left_contact
- binary_sensor.kids_bathroom_window_right_contact
to: 'on'
id: Kids Bathroom Window Open
- platform: state
entity_id:
- binary_sensor.kids_bathroom_window_left_contact
- binary_sensor.kids_bathroom_window_right_contact
to: 'off'
id: Kids Bathroom Window Closed
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Dave Away
- condition: state
entity_id: person.gem_forrester
state: not_home
- condition: or
conditions:
- condition: state
entity_id: input_select.desired_heating_mode
state: 'On'
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
sequence:
- service: script.heating_turn_off_all_radiators
data: {}
- conditions:
- condition: trigger
id: Gem Away
- condition: state
entity_id: person.david_forrester
state: not_home
- condition: or
conditions:
- condition: state
entity_id: input_select.desired_heating_mode
state: 'On'
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
sequence:
- service: script.heating_turn_off_all_radiators
data: {}
- conditions:
- condition: trigger
id:
- Dave Home
- Gem Home
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
sequence:
- if:
- condition: state
entity_id: climate.downstairs
state: 'off'
- condition: state
entity_id: climate.upstairs
state: 'off'
then:
- service: script.heating_resume_schedule_all_radiators
data: {}
- conditions:
- condition: trigger
id: Downstairs Door or Window Open
- condition: or
conditions:
- condition: device
device_id: 84daad158322931a2b14ee69a6a9c8f5
domain: climate
entity_id: climate.downstairs
type: is_hvac_mode
hvac_mode: auto
- condition: device
device_id: 84daad158322931a2b14ee69a6a9c8f5
domain: climate
entity_id: climate.downstairs
type: is_hvac_mode
hvac_mode: heat
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
alias: Turn off heating downstairs
target:
entity_id: climate.downstairs
- conditions:
- condition: trigger
id: Downstairs Door or Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id: climate.downstairs
- conditions:
- condition: trigger
id: Cloakroom Window Open
- condition: or
conditions:
- condition: device
device_id: 2fe808a84c082db3968a4d856fe6e8ef
domain: climate
entity_id: climate.cloakroom
type: is_hvac_mode
hvac_mode: auto
- condition: device
device_id: 2fe808a84c082db3968a4d856fe6e8ef
domain: climate
entity_id: climate.cloakroom
type: is_hvac_mode
hvac_mode: heat
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.cloakroom
- conditions:
- condition: trigger
id: Cloakroom Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id: climate.cloakroom
- conditions:
- condition: trigger
id: En-Suite Window Open
- condition: or
conditions:
- condition: device
device_id: 2912cee70e19436c9d6795287d1cf8c9
domain: climate
entity_id: climate.en_suite_bathroom
type: is_hvac_mode
hvac_mode: auto
- condition: device
device_id: 2912cee70e19436c9d6795287d1cf8c9
domain: climate
entity_id: climate.en_suite_bathroom
type: is_hvac_mode
hvac_mode: heat
alias: Heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.en_suite_bathroom
- conditions:
- condition: trigger
id: En-Suite Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id: climate.en_suite_bathroom
- conditions:
- condition: trigger
id: Office Window Open
- condition: or
conditions:
- condition: device
device_id: 71a6edc5565513cdbe48f2b5c45189fa
domain: climate
entity_id: climate.office
type: is_hvac_mode
hvac_mode: auto
- condition: device
device_id: 71a6edc5565513cdbe48f2b5c45189fa
domain: climate
entity_id: climate.office
type: is_hvac_mode
hvac_mode: heat
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.office
- conditions:
- condition: trigger
id: Office Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id: climate.office
- conditions:
- condition: trigger
id: Bedroom Window Open
- condition: or
conditions:
- condition: device
device_id: 5b51bb0d00f12ec04c45d29296b6b9ee
domain: climate
entity_id: climate.master_bedroom
type: is_hvac_mode
hvac_mode: heat
- condition: device
device_id: 5b51bb0d00f12ec04c45d29296b6b9ee
domain: climate
entity_id: climate.master_bedroom
type: is_hvac_mode
hvac_mode: auto
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.master_bedroom
- conditions:
- condition: trigger
id: Bedroom Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id:
- climate.master_bedroom
- conditions:
- condition: trigger
id: Guest Bedroom Window Open
- condition: or
conditions:
- condition: device
device_id: bc71698349b1224d4f591b0d87542cb5
domain: climate
entity_id: climate.guest_bedroom
type: is_hvac_mode
hvac_mode: heat
- condition: device
device_id: bc71698349b1224d4f591b0d87542cb5
domain: climate
entity_id: climate.guest_bedroom
type: is_hvac_mode
hvac_mode: auto
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id:
- climate.guest_bedroom
- conditions:
- condition: trigger
id: Guest Bedroom Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id:
- climate.guest_bedroom
- conditions:
- condition: trigger
id: Upstairs Windows Open
- condition: or
conditions:
- condition: device
device_id: 4815bc131fac9883b8fc60472f8ac3e2
domain: climate
entity_id: climate.upstairs
type: is_hvac_mode
hvac_mode: heat
- condition: device
device_id: 4815bc131fac9883b8fc60472f8ac3e2
domain: climate
entity_id: climate.upstairs
type: is_hvac_mode
hvac_mode: auto
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id:
- climate.upstairs
- conditions:
- condition: trigger
id: Upstairs Windows Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id:
- climate.upstairs
- conditions:
- condition: trigger
id: Kids Bathroom Window Open
- condition: or
conditions:
- condition: device
device_id: 4815bc131fac9883b8fc60472f8ac3e2
domain: climate
entity_id: climate.kids_bathroom
type: is_hvac_mode
hvac_mode: heat
- condition: device
device_id: 4815bc131fac9883b8fc60472f8ac3e2
domain: climate
entity_id: climate.kids_bathroom
type: is_hvac_mode
hvac_mode: auto
alias: Test if heating is on or in auto
sequence:
- service: climate.set_hvac_mode
data:
hvac_mode: 'off'
target:
entity_id: climate.kids_bathroom
- conditions:
- condition: trigger
id: Kids Bathroom Window Closed
sequence:
- if:
- condition: state
entity_id: input_select.desired_heating_mode
state: Auto
then:
- service: climate.set_hvac_mode
data:
hvac_mode: auto
target:
entity_id:
- climate.kids_bathroom
mode: restart
- alias: Heating Master Control
description: Override heating when people are out
triggers:
- trigger: state
entity_id:
- binary_sensor.gem_home
from: 'on'
to: 'off'
id: Gem Out
for:
hours: 1
minutes: 0
seconds: 0
- trigger: state
entity_id:
- binary_sensor.gem_home
from: 'off'
to: 'on'
id: Gem In
for:
hours: 0
minutes: 5
seconds: 0
- trigger: state
entity_id:
- binary_sensor.family_home
from: 'on'
to: 'off'
id: Family Out
- trigger: state
entity_id:
- binary_sensor.family_home
from: 'off'
to: 'on'
id: Family Back
- trigger: state
entity_id:
- input_boolean.winter_mode
from: 'on'
to: 'off'
id: 'Off'
- trigger: state
entity_id:
- input_boolean.winter_mode
from: 'off'
to: 'on'
id: 'On'
- trigger: state
entity_id:
- climate.downstairs
attribute: temperature
id: Downstairs Target Temp
enabled: false
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Gem Out
- condition: or
conditions:
- condition: state
entity_id: sensor.day_of_week
state: Thursday
- condition: state
entity_id: sensor.day_of_week
state: Wednesday
sequence:
- alias: Capture heating status before
action: scene.create
data:
scene_id: office_heating_before
snapshot_entities:
- input_number.heating_comfort_temperature_office
- input_boolean.office_heating_on
- action: input_number.set_value
data:
value: 5
target:
entity_id:
- input_number.heating_comfort_temperature_office
alias: Office heating to min when Gem goes to Saughton House
- conditions:
- condition: trigger
id:
- Gem In
- condition: or
conditions:
- condition: state
entity_id: sensor.day_of_week
state: Thursday
- condition: state
entity_id: sensor.day_of_week
state: Wednesday
sequence:
- action: scene.turn_on
target:
entity_id: scene.office_heating_before
data: {}
- conditions:
- condition: trigger
id:
- Family Out
- condition: state
entity_id: input_boolean.winter_mode
state: 'on'
sequence:
- action: scene.create
data:
scene_id: house_heating_before
snapshot_entities:
- input_boolean.winter_mode
- input_boolean.downstairs_heating_on
- input_boolean.upstairs_heating_on
- input_boolean.office_heating_on
- input_boolean.cloakroom_heating_on
- input_boolean.boys_rooms_heating_on
- input_boolean.en_suite_heating_on
- input_boolean.master_bedroom_heating_on
- input_number.heating_comfort_temperature
- input_number.heating_comfort_temperature_office
- input_number.heating_comfort_temperature_boys_rooms
- input_number.heating_comfort_temperature_cloakroom
- input_number.heating_comfort_temperature_downstairs
- input_number.heating_comfort_temperature_master_bedroom
- input_number.heating_comfort_temperature_upstairs
- input_number.heating_comfort_temperature_en_suite
- input_number.heating_eco_temperature
- input_number.heating_minimum_temperature
alias: Capture house heating before
- action: input_number.set_value
data:
value: 5
target:
entity_id:
- input_number.heating_comfort_temperature_boys_rooms
- input_number.heating_comfort_temperature_cloakroom
- input_number.heating_comfort_temperature_en_suite
- input_number.heating_comfort_temperature_master_bedroom
- input_number.heating_comfort_temperature_downstairs
- input_number.heating_comfort_temperature_upstairs
- input_number.heating_comfort_temperature_office
- conditions:
- condition: trigger
id:
- Family Back
- condition: state
entity_id: input_boolean.winter_mode
state: 'on'
sequence:
- action: scene.turn_on
target:
entity_id: scene.house_heating_before
data: {}
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: input_boolean.turn_off
target:
entity_id: input_boolean.winter_mode
data: {}
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- action: input_boolean.turn_on
target:
entity_id: input_boolean.winter_mode
data: {}
- conditions:
- condition: trigger
id:
- 'On'
sequence:
- action: input_boolean.turn_on
target:
entity_id:
- input_boolean.downstairs_heating_on
- input_boolean.upstairs_heating_on
- input_boolean.cloakroom_heating_on
- input_boolean.master_bedroom_heating_on
- input_boolean.en_suite_heating_on
- input_boolean.office_heating_on
- input_boolean.boys_rooms_heating_on
- input_boolean.master_bedroom_heating_on
data: {}
- conditions:
- condition: trigger
id:
- 'Off'
sequence:
- action: input_boolean.turn_off
target:
entity_id:
- input_boolean.downstairs_heating_on
- input_boolean.upstairs_heating_on
- input_boolean.cloakroom_heating_on
- input_boolean.master_bedroom_heating_on
- input_boolean.en_suite_heating_on
- input_boolean.office_heating_on
- input_boolean.boys_rooms_heating_on
- input_boolean.master_bedroom_heating_on
data: {}
- conditions:
- condition: trigger
id:
- Downstairs Target Temp
- condition: template
value_template: '{{ trigger.to_state.context.id != none }}'
- condition: template
value_template: '{{ trigger.to_state.context.parent_id != none }}'
- condition: template
value_template: '{{ trigger.to_state.context.user_id == none }}'
sequence:
- action: script.text_notify_dave
data:
message: target temp changed by automation
title: DOWNSTAIRS HEATING
- conditions:
- condition: trigger
id:
- Downstairs Target Temp
- condition: template
value_template: '{{ trigger.to_state.context.id != none }}'
- condition: template
value_template: '{{ trigger.to_state.context.parent_id == none }}'
- condition: template
value_template: '{{ trigger.to_state.context.user_id != none }}'
sequence:
- action: script.text_notify_dave
data:
message: target temp changed by dashboard
title: DOWNSTAIRS HEATING
mode: parallel
max: 10
- alias: Home Announcements
description: ''
trigger:
- platform: time
at: input_datetime.school_night
alias: School Night bedtime for the boys
id: School Night Bedtime Boys
- platform: time
at: input_datetime.non_school_night
alias: Non-School Night bedtime for boys
id: Non School Bedtime
- platform: time
at: input_datetime.school_pick_up_time_mon_to_thurs
id: School pick up
alias: School Pick Up Time
- platform: time
at: input_datetime.school_pick_up_time_friday
id: Friday School Pick Up Time
alias: 'School Pick Up - Friday '
- platform: time
at: input_datetime.get_ready_for_school_at
id: Get ready for school
alias: Get ready for school
- platform: state
entity_id:
- binary_sensor.office_hours
from: 'off'
to: 'on'
id: Office in use
- platform: state
entity_id:
- binary_sensor.office_hours
from: 'on'
to: 'off'
id: Office not in use
- platform: state
entity_id:
- sensor.last_alexa_called
id: Last Alexa Called
- platform: state
entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_1
from: 'off'
to: 'on'
id: Kitchen Motion
- platform: time
at: 09:15:00
id: Time for morning briefing
- platform: state
entity_id:
- binary_sensor.gems_samsung_galaxy_home
from: 'on'
to: 'off'
id: Gem out of office
- platform: state
entity_id:
- binary_sensor.gems_samsung_galaxy_home
from: 'off'
to: 'on'
id: Gem in office
condition:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
action:
- choose:
- conditions:
- condition: trigger
id: School Night Bedtime Boys
- condition: state
entity_id: binary_sensor.schoolnight
state: 'on'
alias: Confirm School Night
- condition: state
entity_id: calendar.school_holidays
state: 'off'
sequence:
- service: script.set_announcements_volume
data:
where: '{{ states(''sensor.room_audio'') }}'
- service: script.speech_engine_for_tts
data:
voice: Brian
where: '{{ states(''sensor.room_audio'') }}'
message: "{{ ['Sean and Jamie. Its time for bed. Upstairs and brush yourteeth', \n 'Boys, its\
\ time for you to visit the land of nod. Upstairs\
\ please and brush your teeth', \n 'Sean and\
\ Jamie. The time has come to say goodnight. To say sleep tight till the\
\ morning light. The time has come to say goodnight. At the end of a lovely\
\ day', \n 'Boys. Thats the end of another day\
\ for you both. Please make your way upstairs to bed. and dont forget to brush your teeth.',\n 'Sean and\
\ Jamie. If you are still downstairs then you\
\ are in the wrong place. Upstairs and brush your teeth. It is time to go to bed.' \n ]|random }}"
- service: script.1693070811673
data:
where: '{{ states(''sensor.room_audio'') }}'
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.kids_bedtime_announcement_played
- conditions:
- condition: trigger
id: Non School Bedtime
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.schoolnight
state: 'off'
- condition: state
entity_id: calendar.school_holidays
state: 'on'
alias: Confirm School Holiday is on
sequence:
- service: script.set_announcements_volume
data:
where: '{{ states(''sensor.room_audio'') }}'
- service: script.speech_engine_for_tts
data:
voice: Brian
where: '{{ states(''sensor.room_audio'') }}'
message: '{{ [''Excuse me master Sean and master Jamie. It is time for bed.
Please make your way upstairs to the bathroom and brush your teeth'',''Excuse
me master Sean and master Jamie. The time has come to say goodnight. To
say sleep tight till the morning light. The time has come to say goodnight
at the end of a lovely day'',''Excuse me master Sean and master Jamie.
If you are still downstairs then you are in the
wrong place. Please make your way upstairs to the bathroom to
brush your teeth for bed'',''Excuse me boys, but that appears to be the
end of another day for you both. Please head to the bathroom and brush
your teeth before bed'' ]|random }}'
- service: script.1693070811673
data:
where: '{{ states(''sensor.room_audio'') }}'
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.kids_bedtime_announcement_played
- conditions:
- condition: trigger
id: Get ready for school
- condition: and
conditions:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.schoolday
state: 'on'
- condition: state
entity_id: binary_sensor.fridayschool
state: 'on'
alias: Schoolday or Friday Schoolday on
- condition: state
entity_id: calendar.school_holidays
state: 'off'
alias: Confirm School Holiday is off
sequence:
- service: script.set_announcements_volume
data:
where: Living Room
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
alias: 2 seconds later.
- service: script.speech_engine_for_tts
data:
voice: Brian
where: Living Room
message: "{{ ['Attention master Sean and master\
\ Jamie. Its time to get dressed. You first, master Sean', \
\ \n 'Attention master Sean and\
\ master Jamie. Its time to get dressed. You first, master Jamie',\
\ \n ]|random }}"
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
alias: 10 minutes later.
- service: script.speech_engine_for_tts
data:
voice: Brian
where: Living Room
message: "{{ [ 'Attention master Sean and master\
\ Jamie. Its time to go upstairs and brush your teeth. No pushing\
\ and no running, remember its not a race',\
\ \n 'Excuse me master Sean and master Jamie. Its time\
\ to brush your teeth. Please go upstairs in an orderly fashion and no pushing or running', \n ]|random\
\ }}"
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
alias: 10s later
- service: switch.turn_off
data: {}
target:
entity_id: switch.living_room_tv
enabled: true
- service: media_player.turn_off
data: {}
target:
entity_id: media_player.sky_q_main
enabled: true
- if:
- condition: state
entity_id: light.dreamview_g1_pro
state: 'on'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.dreamview_g1_pro
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
alias: 10 minutes later.
- service: script.speech_engine_for_tts
data:
voice: Brian
where: '{{ states(''sensor.room_audio'') }}'
message: "{{ [ 'Attention master Sean and master\
\ Jamie. If you are still here, you are late for school', \
\ \n 'Excuse my interruption Mummy and daddy. If master Sean\
\ and master Jamie have not left for school yet, why not', \n 'Come on folks.\
\ Get your skates on and get out the door. School will not wait for you'\n\
\ ]|random }}"
- service: script.1693070811673
data:
where: '{{ states(''sensor.room_audio'') }}'
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.school_morning_announcement_played
- conditions:
- condition: trigger
id: School pick up
- condition: state
entity_id: binary_sensor.schoolday
state: 'on'
alias: Check it's a school day
- condition: state
entity_id: calendar.school_holidays
state: 'off'
alias: Confirm School Holiday is off
sequence:
- service: script.set_announcements_volume
data:
where: '{{ states(''sensor.room_audio'') }}'
- service: script.speech_engine_for_tts
data:
voice: Brian
where: '{{ states(''sensor.room_audio'') }}'
message: "{{ [ 'Information. It is almost\
\ time for the school pickup. Please prepare to pick up master Sean and\
\ master Jamie', \n 'Pardon my\
\ interruption Mummy. I know you are in the middle of something, but it\
\ is almost time to pick up the boys from school',\n 'Attention. This is an urgent announcement for Mummy.\
\ Its time to clock out and get the boys from School. Chop chop!',\n 'Breaking\
\ news! I have received a message from the school pick up fairies\
\ telling me they are on strike. I guess that means you will have to go\
\ and pick up the boys.'\n ]|random }}"
- service: script.1693070811673
data:
where: '{{ states(''sensor.room_audio'') }}'
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.school_pick_up_announcement_played
- conditions:
- condition: trigger
id: Friday School Pick Up Time
- condition: state
entity_id: binary_sensor.fridayschool
state: 'on'
alias: Confirm it's a Friday School Day
- condition: state
entity_id: calendar.school_holidays
state: 'off'
alias: Confirm School Holiday is off
sequence:
- service: script.set_announcements_volume
data:
where: '{{ states(''sensor.room_audio'') }}'
- service: script.speech_engine_for_tts
data:
voice: Brian
where: '{{ states(''sensor.room_audio'') }}'
message: "{{ [ 'Information. It is almost\
\ time for the schools out pickup. Please prepare to pick up master Sean\
\ and master Jamie', \n 'Pardon\
\ my interruption Mummy. I know you are in the middle of something, but\
\ it is almost time to pick up the boys from schools out',\n\
\ 'Attention. This is an urgent announcement\
\ for Mummy. Its time to clock out and get the boys from Schools\
\ out. Chop, chop!',\n 'Breaking news! I have received a message from\
\ the schools out pick up fairies telling me they are on strike. I guess\
\ that means you will have to go and pick up the boys.'\n ]|random }}"
- service: script.1693070811673
data:
where: '{{ states(''sensor.room_audio'') }}'
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.school_pick_up_announcement_played
- conditions:
- condition: trigger
id: Office in use
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: state
entity_id: calendar.gem_holidays
state: 'off'
- condition: state
entity_id: person.gem_forrester
state: home
sequence:
- type: turn_off
device_id: 0e85bd2f5080762ed21a6dfeb306afe9
entity_id: switch.office_echo_pop_socket_1
domain: switch
- conditions:
- condition: trigger
id: Office not in use
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: state
entity_id: calendar.gem_holidays
state: 'off'
- condition: state
entity_id: switch.office_echo_pop_socket_1
state: 'off'
sequence:
- type: turn_on
device_id: 0e85bd2f5080762ed21a6dfeb306afe9
entity_id: switch.office_echo_pop_socket_1
domain: switch
- conditions:
- condition: trigger
id:
- Kitchen Motion
- condition: time
after: 09:15:00
before: '10:30:00'
- condition: state
entity_id: input_boolean.morning_briefing_played
state: 'off'
sequence:
- service: script.alexa_morning_briefing
data: {}
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.morning_briefing_played
- conditions:
- condition: trigger
id:
- Last Alexa Called
sequence:
- service: input_datetime.set_datetime
data:
datetime: '{{ states.sensor.last_alexa_called.last_changed | as_timestamp |
timestamp_custom(''%Y-%m-%d %H:%M:%S.%f'')}}'
target:
entity_id: input_datetime.last_time_alexa_called
- conditions:
- condition: trigger
id:
- Time for morning briefing
- condition: state
entity_id: input_boolean.morning_briefing_played
state: 'off'
- condition: state
entity_id: input_boolean.room_occupied_kitchen
state: 'on'
sequence:
- service: script.alexa_morning_briefing
data: {}
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.morning_briefing_played
- conditions:
- condition: trigger
id:
- Gem out of office
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: state
entity_id: switch.office_echo_pop_socket_1
state: 'off'
sequence:
- type: turn_on
device_id: 0e85bd2f5080762ed21a6dfeb306afe9
entity_id: c87e83074cbfccb86ac70e0749a1f23f
domain: switch
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.gem_gone_out_to_office
- conditions:
- condition: trigger
id:
- Gem in office
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: state
entity_id: switch.office_echo_pop_socket_1
state: 'on'
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.gem_gone_out_to_office
- type: turn_off
device_id: 0e85bd2f5080762ed21a6dfeb306afe9
entity_id: c87e83074cbfccb86ac70e0749a1f23f
domain: switch
mode: queued
max: 10
- alias: Home Battery Overnight Charge Type
description: 'Determines how long to charge the home battery overnight '
triggers:
- at: '21:05:00'
id: Set
trigger: time
- at: 07:00:00
id: Reset
trigger: time
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Set
sequence:
- action: script.text_notify_dave
data:
title: HOME BATTERY CHARGE TYPE
message: '{{states(''sensor.solar_battery_charge_overnight_logic'')}}'
- action: script.jarvis_speech_engine
data:
where: dave
type: notification
message: 'For your information! The home battery will receive {{states(''sensor.solar_battery_charge_overnight_logic'')}}
tonight.
'
- if:
- condition: template
value_template: '{{ is_state(''sensor.solar_battery_charge_overnight_logic'',''a
full charge'') }}'
then:
- action: input_number.set_value
target:
entity_id: input_number.home_battery_charge_length
data:
value: 3
else:
- if:
- condition: template
value_template: '{{ is_state(''sensor.solar_battery_charge_overnight_logic'',''a
one thirty charge'') }}'
then:
- action: input_number.set_value
target:
entity_id: input_number.home_battery_charge_length
data:
value: 1.5
else:
- if:
- condition: template
value_template: '{{ is_state(''sensor.solar_battery_charge_overnight_logic'',''a
one hour charge'') }}'
then:
- action: input_number.set_value
target:
entity_id: input_number.home_battery_charge_length
data:
value: 1
else:
- action: input_boolean.turn_off
target:
entity_id: input_boolean.grid_charge_home_battery
data: {}
- conditions:
- condition: trigger
id:
- Reset
sequence:
- action: input_number.set_value
target:
entity_id: input_number.home_battery_charge_length
data:
value: 3
- alias: Home Battery Watch
description: Notify me if there is a problem with the home battery
triggers:
- entity_id:
- sensor.solaredge_b1_status
to: B_STATUS_IDLE
id: Home Battery Idle
for:
hours: 0
minutes: 2
seconds: 0
trigger: state
- entity_id:
- sensor.solaredge_b1_status
to: unavailable
for:
hours: 0
minutes: 2
seconds: 0
id: Home Battery Unavailable
trigger: state
- entity_id:
- sensor.solaredge_b1_status
to: unknown
for:
hours: 0
minutes: 2
seconds: 0
id: Home Battery Unknown
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Home Battery Idle
- condition: sun
after: sunset
sequence:
- action: script.text_notify_dave
data:
message: The Home Battery is idle
title: HOME BATTERY
alias: Send a notification to Dave
- conditions:
- condition: or
conditions:
- condition: trigger
id: Home Battery Unavailable
- condition: trigger
id: Home Battery Unknown
sequence:
- action: script.text_notify_dave
data:
message: There is a problem with the Home Battery
title: HOME BATTERY
alias: Send a notification to Dave
- action: input_boolean.turn_on
target:
entity_id: input_boolean.announcement_playing
data: {}
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: There is a problem with the home battery. Can you please investigate
immediately.
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- action: input_boolean.turn_off
target:
entity_id:
- input_boolean.announcement_playing
data: {}
mode: single
- alias: Hot Water, solar and gas
description: Turn on the immersion heater when the battery is full and solar export
is high. Check later in the day and, if needed, heat water with gas.
triggers:
- entity_id:
- sensor.electricity_bill_today
below: 0
id: Activate
trigger: numeric_state
enabled: true
- entity_id:
- sensor.power_grid_export
above: 2800
id: Switch On
for:
hours: 0
minutes: 0
seconds: 20
trigger: numeric_state
- entity_id:
- sensor.power_battery_load
above: 500
id: Switch Off
for:
hours: 0
minutes: 0
seconds: 20
trigger: numeric_state
- entity_id:
- sensor.hot_water_energy_consumption_daily
above: 6
id: 6kWh Energy Used
trigger: numeric_state
- at: '16:00:00'
id: Deactivate
trigger: time
- alias: Valkyrie off with Timer
event_type: timer.finished
event_data:
entity_id: timer.solar_hot_water_heating
id: Timer Done
enabled: true
trigger: event
- at: '17:30:00'
id: Time On
trigger: time
- at: '21:00:00'
id: Last Check
trigger: time
- trigger: numeric_state
entity_id:
- sensor.battery_state_of_charge
above: 99
id: Battery Charged
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Activate
- condition: sun
after: sunrise
before: sunset
sequence:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.allow_valkyrie_on
data: {}
- condition: numeric_state
entity_id: sensor.power_grid_export
above: 2500
- action: light.turn_on
target:
entity_id: light.valkyrie_solar_hot_water
data: {}
- action: timer.start
data: {}
target:
entity_id:
- timer.solar_hot_water_heating
alias: Activate solar water when electricity bill for the day hits zero
- conditions:
- condition: trigger
id:
- Switch On
- condition: sun
after: sunrise
before: sunset
- condition: state
entity_id: input_boolean.allow_valkyrie_on
state: 'on'
- condition: state
entity_id: light.valkyrie_solar_hot_water
state: 'off'
sequence:
- action: light.turn_on
target:
entity_id: light.valkyrie_solar_hot_water
data: {}
- action: timer.start
data: {}
target:
entity_id:
- timer.solar_hot_water_heating
- conditions:
- condition: trigger
id: Switch Off
- condition: state
entity_id: light.valkyrie_solar_hot_water
state: 'on'
sequence:
- action: light.turn_off
target:
entity_id: light.valkyrie_solar_hot_water
data: {}
- action: timer.pause
data: {}
target:
entity_id:
- timer.solar_hot_water_heating
- conditions:
- condition: trigger
id:
- Deactivate
- Timer Done
- 6kWh Energy Used
sequence:
- action: input_boolean.turn_off
target:
entity_id: input_boolean.allow_valkyrie_on
data: {}
- if:
- condition: template
value_template: '{{ states(''light.valkyrie_solar_hot_water'') != ''unavailable''
}}'
alias: If Valkyrie is not unavailable
- condition: state
entity_id: light.valkyrie_solar_hot_water
state: 'on'
then:
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.valkyrie_solar_hot_water
- action: timer.cancel
metadata: {}
data: {}
target:
entity_id: timer.solar_hot_water_heating
alias: If Valkyrie is available and on, turn it off, else wait until it becomes
available then turn it off.
- wait_for_trigger:
- trigger: template
value_template: '{{ is_state(''light.valkyrie_solar_hot_water'',''on'')
}}'
timeout:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
- action: light.turn_off
metadata: {}
data: {}
target:
entity_id: light.valkyrie_solar_hot_water
- action: timer.cancel
metadata: {}
data: {}
target:
entity_id: timer.solar_hot_water_heating
- conditions:
- condition: trigger
id:
- Time On
- condition: numeric_state
entity_id: sensor.hot_water_energy_consumption_daily
below: 2.5
sequence:
- action: tado.set_water_heater_timer
target:
entity_id: water_heater.hot_water
data:
time_period: 00:30:00
- conditions:
- condition: trigger
id:
- Last Check
- condition: numeric_state
entity_id: sensor.hot_water_energy_consumption_daily
below: 2.5
sequence:
- action: tado.set_water_heater_timer
target:
entity_id: water_heater.hot_water
data:
time_period: 00:30:00
- conditions:
- condition: trigger
id:
- Battery Charged
- condition: template
value_template: '{{ states(''sensor.rolec_energy_consumption_daily'')| float(0)
> 5 }}'
alias: If the car was charged overnight
- condition: sun
after: sunrise
before: sunset
sequence:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.allow_valkyrie_on
data: {}
- condition: numeric_state
entity_id: sensor.power_grid_export
above: 2500
- action: light.turn_on
target:
entity_id: light.valkyrie_solar_hot_water
data: {}
- action: timer.start
data: {}
target:
entity_id:
- timer.solar_hot_water_heating
alias: Activate solar water when the battery is charged if the EV has also been
charged overnight
mode: single
- alias: Intermittent Grid Charge Battery.
description: ''
trigger:
- platform: time
id: Activate Grid Charge
at: '21:00:00'
- platform: state
entity_id:
- binary_sensor.octopus_energy_target_intermittent_best_rates_3_hours_overnight
from: 'off'
to: 'on'
id: Start Grid Charge
- platform: state
entity_id:
- binary_sensor.octopus_energy_target_intermittent_best_rates_3_hours_overnight
from: 'on'
to: 'off'
id: Stop Grid Charge
- alias: End Charge With Timer
platform: event
event_type:
- timer.finished
- timer.cancelled
event_data:
entity_id: timer.home_battery_3_hour_charge_period
id: End Grid Charge
enabled: true
- platform: state
entity_id:
- binary_sensor.morning
from: 'off'
to: 'on'
id: Reset Timer
alias: Reset Timer when Morning turns on
enabled: true
- platform: state
entity_id:
- switch.solaredge_i1_advanced_power_control
from: unavailable
to: 'on'
id: Inverter Reset
- platform: state
entity_id:
- binary_sensor.octopus_energy_target_best_half_hour_for_pre_peak_topuo
from: 'off'
to: 'on'
id: Topup
- platform: state
entity_id:
- binary_sensor.octopus_energy_target_best_half_hour_for_pre_peak_topuo
from: 'on'
to: 'off'
id: Topdown
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Activate Grid Charge
sequence:
- action: input_boolean.turn_on
target:
entity_id:
- input_boolean.grid_charge_home_battery
device_id: []
area_id: []
data: {}
- conditions:
- condition: trigger
id:
- Start Grid Charge
- condition: state
entity_id: input_boolean.grid_charge_home_battery
state: 'on'
sequence:
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.home_battery_grid_charging
- action: script.grid_charge_battery
data: {}
- conditions:
- condition: trigger
id:
- Stop Grid Charge
sequence:
- action: script.turn_off
data: {}
target:
entity_id: script.grid_charge_battery
- action: select.select_option
target:
entity_id: select.solaredge_i1_storage_command_mode
data:
option: Maximize Self Consumption
- action: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.home_battery_grid_charging
- action: timer.pause
data: {}
target:
entity_id: timer.home_battery_3_hour_charge_period
- conditions:
- condition: trigger
id:
- End Grid Charge
sequence:
- action: script.turn_off
data: {}
target:
entity_id: script.grid_charge_battery
- action: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.home_battery_grid_charging
- action: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.grid_charge_home_battery
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- action: select.select_option
target:
entity_id: select.solaredge_i1_storage_command_mode
data:
option: Maximize Self Consumption
- conditions:
- condition: trigger
id:
- Reset Timer
sequence:
- delay:
hours: 0
minutes: 33
seconds: 0
milliseconds: 0
- action: timer.cancel
data: {}
target:
entity_id: timer.home_battery_3_hour_charge_period
- conditions:
- condition: trigger
id:
- Inverter Reset
- condition: state
entity_id: input_boolean.grid_charge_home_battery
state: 'on'
- condition: state
entity_id: binary_sensor.octopus_energy_target_intermittent_best_rates_3_hours_overnight
state: 'on'
sequence:
- action: script.grid_charge_battery
data: {}
- conditions:
- condition: trigger
id:
- Topup
- condition: or
conditions:
- condition: state
entity_id: sensor.solar_battery_daytime_topup_needed
state: 'true'
- condition: numeric_state
entity_id: sensor.battery_state_of_charge
below: 50
sequence:
- action: script.battery_pre_peak_top_up
metadata: {}
data: {}
- conditions:
- condition: trigger
id:
- Topdown
- condition: state
entity_id: input_boolean.home_battery_grid_charging
state: 'on'
sequence:
- action: script.battery_pre_peak_top_down
metadata: {}
data: {}
mode: parallel
max: 10
- alias: Its Christmas
description: Switches Govee lights to Christmas mode.
triggers:
- trigger: numeric_state
entity_id:
- sensor.day_of_year
above: 334
id: 'Christmas On '
- trigger: numeric_state
entity_id:
- sensor.day_of_year
above: 5
id: Christmas Off
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- 'Christmas On '
sequence:
- action: automation.turn_off
target:
entity_id:
- automation.test_govee_lighting
data: {}
- action: automation.turn_on
target:
entity_id: automation.all_govee_lighting_christmas
data: {}
- conditions:
- condition: trigger
id:
- Christmas Off
sequence:
- action: automation.turn_off
target:
entity_id: automation.all_govee_lighting_christmas
data: {}
- action: automation.turn_on
target:
entity_id:
- automation.test_govee_lighting
data: {}
mode: single
- alias: Jamie JARVIS VPE Restart if stuck responding.
description: ''
triggers:
- trigger: state
entity_id:
- assist_satellite.jarvis_jamie_assist_satellite
to: responding
for:
hours: 0
minutes: 1
seconds: 0
id: Restart
conditions: []
actions:
- action: button.press
target:
entity_id: button.home_assistant_voice_0963e5_restart
data: {}
- wait_for_trigger:
- trigger: state
entity_id:
- assist_satellite.jarvis_jamie_assist_satellite
from: unavailable
timeout:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
alias: Wait for JARVIS to restart.
- parallel:
- action: script.text_notify_dave
data:
title: JAMIE VPE
message: I have restarted.
- if:
- condition: state
entity_id: binary_sensor.quiet_time_boys
state: 'on'
then:
- action: media_player.volume_set
target:
entity_id:
- media_player.jarvis_jamie_media_player
data:
volume_level: ' {{ states(''input_number.jarvis_volume_level_low'') | float(0)}}'
else:
- action: media_player.volume_set
target:
entity_id:
- media_player.jarvis_jamie_media_player
data:
volume_level: ' {{ states(''input_number.jarvis_volume_level_announcement'')
| float(0)}}'
alias: Set volume based on time of day.
alias: Notify Dave and set volume.
mode: single
- alias: JARVIS Daily Restart
description: ''
triggers:
- trigger: state
entity_id:
- binary_sensor.lunchtime
from: 'off'
to: 'on'
conditions: []
actions:
- action: button.press
target:
entity_id: button.home_assistant_voice_09152e_restart
data: {}
- wait_for_trigger:
- trigger: state
entity_id:
- assist_satellite.jarvis_kitchen_assist_satellite
from: unavailable
to: idle
- action: button.press
data: {}
target:
entity_id: button.home_assistant_voice_09399c_restart
- wait_for_trigger:
- trigger: state
entity_id:
- assist_satellite.jarvis_downstairs_assist_satellite
from: unavailable
to: idle
- action: button.press
data: {}
target:
entity_id: button.jarvis_office_restart
- wait_for_trigger:
- trigger: state
entity_id:
- assist_satellite.jarvis_office_assist_satellite
from: unavailable
to: idle
- action: button.press
data: {}
target:
entity_id:
- button.home_assistant_voice_0963e5_restart
- wait_for_trigger:
- trigger: state
entity_id:
- assist_satellite.jarvis_jamie_assist_satellite
from: unavailable
to: idle
- action: button.press
data: {}
target:
entity_id: button.home_assistant_voice_095e21_restart
- wait_for_trigger:
- trigger: state
entity_id:
- assist_satellite.jarvis_sean_assist_satellite
from: unavailable
to: idle
- action: button.press
data: {}
target:
entity_id: button.home_assistant_voice_09387b_restart
mode: single
- alias: Kids Bathroom Lights with presence
description: ''
triggers:
- entity_id:
- binary_sensor.jack_and_jill_presence_occupancy
from: 'off'
to: 'on'
id: Light On
trigger: state
- entity_id:
- binary_sensor.jack_and_jill_presence_occupancy
from: 'on'
to: 'off'
for:
hours: 0
minutes: 2
seconds: 0
id: Light Off
trigger: state
- at: '20:00:10'
id: Dim on
trigger: time
- entity_id:
- switch.jamie_bathroom_switch_left
- switch.sean_bathroom_switch_right
from: 'off'
to: 'on'
id: Lights to Max
trigger: state
- entity_id:
- switch.jamie_bathroom_switch_left
- switch.sean_bathroom_switch_right
from: 'on'
to: 'off'
id: Lights to Presence
trigger: state
conditions:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
actions:
- choose:
- conditions:
- condition: trigger
id:
- Light On
- condition: state
entity_id: input_boolean.allow_kids_bathroom_lights_max
state: 'off'
- condition: time
after: 07:00:00
before: '20:00:00'
- condition: numeric_state
entity_id: sensor.jack_and_jill_presence_illuminance
below: input_number.low_light_threshold
sequence:
- data:
color_temp: 200
brightness: 64
target:
entity_id: light.kids_bathroom_light
action: light.turn_on
- conditions:
- condition: trigger
id:
- Light On
- condition: state
entity_id: input_boolean.allow_kids_bathroom_lights_max
state: 'off'
- condition: time
after: '20:00:00'
before: 07:00:00
- condition: numeric_state
entity_id: sensor.jack_and_jill_presence_illuminance
below: input_number.low_light_threshold
sequence:
- data:
rgb_color:
- 255
- 248
- 52
brightness: 26
target:
entity_id: light.kids_bathroom_light
action: light.turn_on
- conditions:
- condition: trigger
id:
- Light Off
- condition: state
entity_id: light.kids_bathroom_light
state: 'on'
- condition: state
entity_id: input_boolean.allow_kids_bathroom_lights_max
state: 'off'
sequence:
- target:
entity_id: light.kids_bathroom_light
data: {}
action: light.turn_off
- conditions:
- condition: trigger
id:
- Dim on
sequence:
- data:
rgb_color:
- 255
- 248
- 52
brightness: 26
target:
entity_id: light.kids_bathroom_light
action: light.turn_on
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- condition: state
entity_id: binary_sensor.kids_bathroom_occupied
state: 'off'
- target:
entity_id: light.kids_bathroom_light
data: {}
action: light.turn_off
- conditions:
- condition: trigger
id:
- Lights to Max
sequence:
- target:
entity_id: input_boolean.allow_kids_bathroom_lights_max
data: {}
action: input_boolean.turn_on
- target:
entity_id: light.kids_bathroom_light
data:
brightness: 255
color_temp: 154
action: light.turn_on
- conditions:
- condition: trigger
id:
- Lights to Presence
sequence:
- target:
entity_id: input_boolean.allow_kids_bathroom_lights_max
data: {}
action: input_boolean.turn_off
- target:
entity_id: light.kids_bathroom_light
data: {}
action: light.turn_off
mode: restart
- alias: Kindle Tablet WiFi Check
description: ''
triggers:
- trigger: state
entity_id:
- sensor.weather_display_battery_level_2
id: Batt Level Cx
- trigger: state
entity_id:
- sensor.kindle_tablet_battery_level
id: Kindle Batt Level Cx
- trigger: time_pattern
minutes: /30
id: Weather Display Periodic
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Batt Level Cx
sequence:
- action: input_datetime.set_datetime
target:
entity_id: input_datetime.weather_tablet_battery_last_updated
data:
datetime: '{{ now().isoformat() }}'
- conditions:
- condition: trigger
id:
- Kindle Batt Level Cx
sequence:
- action: input_datetime.set_datetime
target:
entity_id: input_datetime.office_tablet_battery_last_update
data:
datetime: '{{ now().isoformat() }}'
- conditions:
- condition: trigger
id:
- Weather Display Periodic
sequence:
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(states(''input_datetime.weather_tablet_battery_last_updated''))
> 3600 }}'
- action: script.text_notify_dave
data:
title: ALERT!
message: The Weather Tablet battery in the kitchen has not updated in over
an hour. Check the Wi-Fi.
- action: persistent_notification.create
metadata: {}
data:
title: 'ALERT ⚠️ '
message: 'The Weather Tablet battery in the kitchen has not updated in over
an hour. Please check the WiFi. '
- conditions:
- condition: trigger
id:
- Weather Display Periodic
sequence:
- condition: template
value_template: '{{ as_timestamp(now()) - as_timestamp(states(''input_datetime.office_tablet_battery_last_update''))
> 3600 }}'
- action: script.text_notify_dave
data:
title: ALERT!
message: The Office Tablet battery in the kitchen has not updated in over
an hour. Check the Wi-Fi.
- action: persistent_notification.create
metadata: {}
data:
title: 'ALERT ⚠️ '
message: 'The Office Tablet battery has not updated in over an hour. Please
check the WiFi. '
mode: parallel
max: 10
- alias: Kitchen Lights Needed
description: Overrides kitchen lights with presence
triggers:
- entity_id:
- switch.kitchen_light_switch_right
id: Light needed
from: 'off'
to: 'on'
trigger: state
conditions:
- condition: state
entity_id: binary_sensor.kitchen_occupied
state: 'on'
actions:
- choose:
- conditions:
- condition: trigger
id:
- Light needed
sequence:
- target:
entity_id: automation.kitchen_lights_with_presence_2
data:
stop_actions: true
action: automation.turn_off
- target:
entity_id: light.kitchen_lights_2
data:
kelvin: 6500
brightness_pct: 100
action: light.turn_on
- wait_for_trigger:
- entity_id:
- binary_sensor.kitchen_occupied
from: 'on'
to: 'off'
for:
hours: 0
minutes: 0
seconds: 0
trigger: state
- entity_id:
- switch.kitchen_light_switch_right
id: Light not needed
from: 'on'
to: 'off'
trigger: state
timeout:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
continue_on_timeout: false
- target:
entity_id: automation.kitchen_lights_with_presence_2
data: {}
action: automation.turn_on
- target:
entity_id: light.kitchen_lights_2
data: {}
action: light.turn_off
mode: restart
- alias: Kitchen Lights with Presence
description: ''
mode: parallel
trace:
stored_traces: 20
triggers:
- entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_1
from: 'off'
to: 'on'
id: Lights On
trigger: state
- entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_1
from: 'on'
to: 'off'
id: Lights Off
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id:
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_3
from: 'off'
to: 'on'
id: BDZ On
trigger: state
- entity_id:
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_3
from: 'on'
to: 'off'
for:
hours: 0
minutes: 0
seconds: 30
id: BDZ Off
trigger: state
- entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
below: input_number.low_light_threshold
id: Low Light
for:
hours: 0
minutes: 0
seconds: 20
trigger: numeric_state
- entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
above: input_number.upper_light_threshold_level
id: Good Light
for:
hours: 0
minutes: 0
seconds: 30
trigger: numeric_state
- entity_id:
- binary_sensor.lights_out
to: 'off'
id: Allow Lights on
trigger: state
- entity_id: binary_sensor.day
from: 'on'
to: 'off'
id: sunset
trigger: state
- entity_id:
- sensor.dave_location
- sensor.gem_location
from: Kitchen
id: Not in Kitchen
trigger: state
- entity_id:
- switch.adaptive_lighting_sleep_mode_kitchen_lights
from: 'off'
to: 'on'
id: Dim lights
for:
hours: 0
minutes: 0
seconds: 10
trigger: state
conditions:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
actions:
- choose:
- conditions:
- condition: trigger
id:
- sunset
sequence:
- action: switch.turn_on
data: {}
target:
entity_id: switch.under_shelf_lights_local
- conditions:
- condition: trigger
id:
- Lights On
- condition: numeric_state
entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
below: input_number.low_light_threshold
sequence:
- action: light.turn_on
data: {}
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Lights Off
sequence:
- action: light.turn_off
data: {}
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- BDZ On
- condition: or
conditions:
- condition: numeric_state
entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
below: input_number.low_light_threshold
- condition: and
conditions:
- condition: or
conditions:
- condition: state
entity_id: sensor.season
state: autumn
- condition: state
entity_id: sensor.season
state: winter
- condition: time
after: '17:35:00'
before: '21:00:00'
sequence:
- action: light.turn_on
data: {}
target:
entity_id: light.back_door_zone_light
- conditions:
- condition: trigger
id:
- BDZ Off
sequence:
- action: light.turn_off
data: {}
target:
entity_id: light.back_door_zone_light
- conditions:
- condition: trigger
id:
- Low Light
- condition: state
entity_id: light.kitchen_lights_2
state: 'off'
- condition: state
entity_id: binary_sensor.kitchen_presence_sensor_presence_sensor_1
state: 'on'
sequence:
- action: light.turn_on
data: {}
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Good Light
sequence:
- action: light.turn_off
data: {}
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Allow Lights on
- condition: state
entity_id: input_boolean.room_occupied_kitchen
state: 'on'
- condition: numeric_state
entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
below: input_number.low_light_threshold
sequence:
- action: light.turn_on
data: {}
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Dim lights
sequence:
- action: light.turn_on
target:
entity_id: light.kitchen_lights_2
data: {}
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- condition: state
entity_id: binary_sensor.kitchen_occupied
state: 'off'
- action: light.turn_off
target:
entity_id: light.kitchen_lights_2
data: {}
- alias: Kitchen Presence
description: ''
mode: parallel
max: 10
triggers:
- entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_1
from: 'off'
to: 'on'
id: Kitchen Presence
trigger: state
- entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_2
from: 'off'
to: 'on'
id: Table Presence
trigger: state
- entity_id:
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_3
from: 'off'
to: 'on'
id: Back Door Presence
trigger: state
- entity_id:
- sensor.utility_room_motion
from: Clear
to: Detected
id: Utility Presence
trigger: state
- entity_id: binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_5
from: 'off'
to: 'on'
id: Sink Presence
trigger: state
- entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_1
from: 'on'
to: 'off'
id: Kitchen Absence
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_2
from: 'on'
to: 'off'
id: Table Absence
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id:
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_3
from: 'on'
to: 'off'
id: Back Door Absence
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id:
- sensor.utility_room_motion
from: Detected
to: Clear
id: Utility Absence
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id: binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_5
from: 'on'
to: 'off'
id: Sink Absence
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id:
- media_player.kitchen_echo_show
attribute: last_called
to: 'true'
id: Alexa
trigger: state
- entity_id:
- switch.ingrid
from: 'off'
to: 'on'
id: TV
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Kitchen Presence
- Alexa
- TV
sequence:
- action: input_text.set_value
metadata: {}
data:
value: kitchen
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_kitchen
- conditions:
- condition: trigger
id:
- Kitchen Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id:
- input_boolean.room_occupied_kitchen
- conditions:
- condition: trigger
id:
- Table Presence
sequence:
- action: input_text.set_value
metadata: {}
data:
value: kitchen_table
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.kitchen_table_occupied
- conditions:
- condition: trigger
id:
- Table Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.kitchen_table_occupied
- conditions:
- condition: trigger
id:
- Back Door Presence
sequence:
- action: input_text.set_value
metadata: {}
data:
value: back_door_zone
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.back_door_zone_occupied
- conditions:
- condition: trigger
id:
- Back Door Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.back_door_zone_occupied
- conditions:
- condition: trigger
id:
- Sink Presence
sequence:
- action: input_text.set_value
metadata: {}
data:
value: kitchen_sink
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.kitchen_sink_occupied
- conditions:
- condition: trigger
id:
- Sink Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.kitchen_sink_occupied
- conditions:
- condition: trigger
id:
- Utility Presence
sequence:
- action: input_text.set_value
metadata: {}
data:
value: utility_room
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.utility_room_occupied
- conditions:
- condition: trigger
id:
- Utility Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.utility_room_occupied
- alias: Kitchen Smart Buttons Automation
description: ''
triggers:
- trigger: state
entity_id:
- event.smart_button_downstairs_2_action
conditions:
- condition: template
value_template: '{{ trigger.from_state.state != ''unavailable'' }}'
actions:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.to_state.attributes.event_type == ''release''
}}'
alias: Button Release
sequence:
- action: tts.cloud_say
data:
cache: false
entity_id: media_player.jarvis_kitchen_media_player
message: did you mean to hold and release the button? This has not been
programmed yet. Please try again.
- conditions:
- condition: template
value_template: '{{ trigger.to_state.attributes.event_type == ''single''
}}'
alias: Single Press
sequence:
- action: script.kitchen_tv_toggle
data: {}
- conditions:
- condition: template
value_template: '{{ trigger.to_state.attributes.event_type == ''double''
}}'
alias: Double Press
sequence:
- action: script.kitchen_tv_toggle
data: {}
alias: Double press
- conditions:
- condition: template
value_template: '{{ trigger.to_state.attributes.event_type == ''triple''
}}'
sequence:
- action: tts.cloud_say
data:
cache: false
entity_id: media_player.jarvis_kitchen_media_player
message: did you mean to press the button three times? This has not been
programmed yet. Please try again.
alias: Triple Press
- conditions:
- condition: template
value_template: '{{ trigger.to_state.attributes.event_type == ''quadruple''
}}'
sequence:
- action: tts.cloud_say
data:
cache: false
entity_id: media_player.jarvis_kitchen_media_player
message: did you mean to press the button four times? This has not been
programmed yet. Please try again.
alias: Quadruple Press
mode: restart
initial_state: true
- alias: Kitchen Tablet Charge Toggle
description: Maintain charge level of kitchen tablet between 30% and 100%
triggers:
- entity_id: sensor.sm_t220_battery_level
below: 30
id: Kitchen Tablet Battery Low
trigger: numeric_state
- entity_id:
- sensor.sm_t220_battery_level
above: 98
id: Kitchen Tablet Battery Charged
trigger: numeric_state
- entity_id:
- sensor.weather_display_battery_level_2
below: 30
id: Weather Tablet Battery Low
trigger: numeric_state
- entity_id:
- sensor.weather_display_battery_level_2
above: 99
id: Weather Tablet Battery Charged
trigger: numeric_state
enabled: true
for:
hours: 0
minutes: 10
seconds: 0
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Kitchen Tablet Battery Low
sequence:
- action: switch.turn_on
data: {}
target:
entity_id: switch.kitchen_tablet_local
- conditions:
- condition: trigger
id: Kitchen Tablet Battery Charged
sequence:
- action: switch.turn_off
data: {}
target:
entity_id: switch.kitchen_tablet_local
- conditions:
- condition: trigger
id:
- Weather Tablet Battery Low
sequence:
- action: switch.turn_on
data: {}
target:
entity_id: switch.weather_display_none
- conditions:
- condition: trigger
id:
- Weather Tablet Battery Charged
sequence:
- action: switch.turn_off
data: {}
target:
entity_id: switch.weather_display_none
mode: queued
initial_state: true
max: 10
- alias: Kitchen TV Toggle On and Off
description: ''
triggers:
- entity_id:
- media_player.sky_q_kitchen_mini_2
id: Ingrid & Sky toggle on
not_from:
- unknown
- unavailable
- paused
to: playing
trigger: state
- entity_id:
- media_player.sky_q_kitchen_mini_2
id: Ingrid & Sky toggle off
not_from:
- unknown
- unavailable
- paused
to: 'off'
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Ingrid & Sky toggle on
sequence:
- action: script.kitchen_tv_toggle
data: {}
- conditions:
- condition: trigger
id: Ingrid & Sky toggle off
sequence:
- action: script.kitchen_tv_toggle
data: {}
mode: single
initial_state: true
- alias: Kitchen TV Voice
description: ''
triggers:
- trigger: conversation
command:
- turn on the TV
- TV on
- turn the TV on
id: 'on'
- trigger: conversation
command:
- TV off
- turn off the TV
- turn the TV off
id: 'off'
conditions:
- condition: state
entity_id: assist_satellite.jarvis_kitchen_assist_satellite
state: processing
actions:
- action: script.kitchen_tv_toggle
data: {}
mode: single
- alias: Kitchen Worktop Lights
description: ''
triggers:
- trigger: state
entity_id:
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_6
from: 'off'
to: 'on'
id: 'On'
- trigger: state
entity_id:
- binary_sensor.presence_sensor_fp2_4b3c_presence_sensor_6
from: 'on'
to: 'off'
id: 'Off'
for:
hours: 0
minutes: 0
seconds: 30
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- 'On'
- condition: numeric_state
entity_id: sensor.kitchen_presence_sensor_light_sensor_light_level
below: 90
sequence:
- alias: Turn on worktop lights
if:
- condition: state
entity_id: input_boolean.adaptive_lighting_sleep_mode_active
state: 'on'
then:
- action: light.turn_on
target:
entity_id: light.ikea_kitchen_lights
data:
brightness_pct: 30
else:
- action: light.turn_on
target:
entity_id: light.ikea_kitchen_lights
data:
brightness_pct: 70
- conditions:
- condition: trigger
id:
- 'Off'
sequence:
- action: light.turn_off
target:
entity_id: light.ikea_kitchen_lights
data: {}
mode: single
- alias: Letterbox
description: ''
mode: parallel
max: 10
triggers:
- entity_id:
- binary_sensor.letterbox_contact
to: 'off'
from: 'on'
trigger: state
conditions:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.front_door_motion_detected
state: 'on'
- condition: state
entity_id: binary_sensor.front_door_person_detected
state: 'on'
actions:
- data:
message: You have post!
title: POST!
action: script.text_notify_parents
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- if:
- condition: state
entity_id: binary_sensor.dave_home
state: 'on'
then:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: Youve got post.
else:
- action: script.jarvis_speech_engine_v3_0
data:
where: gem
type: announcement
message: Youve got post.
- action: input_boolean.toggle
target:
entity_id: input_boolean.post
data: {}
- wait_for_trigger:
- entity_id:
- binary_sensor.family_home
to: 'off'
from: 'on'
trigger: state
- action: input_boolean.toggle
target:
entity_id: input_boolean.post
data: {}
- alias: Lightning Detected
description: ''
triggers:
- entity_id: binary_sensor.lightning_detected
to: 'on'
from: 'off'
trigger: state
conditions:
- condition: state
entity_id: input_boolean.lightning_warning
state: 'off'
actions:
- action: script.text_notify_dave
data:
title: Lightning Detected!
message: 'Lightning has been detected within 20 miles of the house. '
- action: input_boolean.turn_on
entity_id: input_boolean.lightning_warning
- alias: Lights Fade at Bedtime
description: ''
trigger:
- platform: state
entity_id:
- switch.main_bedroom_dot_do_not_disturb_switch
from: 'off'
to: 'on'
condition: []
action:
- service: script.stair_lights_fade_at_bedtime
data: {}
mode: single
- alias: Limit Battery Output
description: Limit the overnight output of the battery during high next day Agile
pricing in Winter
triggers:
- at: input_datetime.start_battery_output_limit
id: Start of Slot 1
trigger: time
- at: input_datetime.end_battery_output_limit
id: End of Slot 1
trigger: time
- at: input_datetime.start_battery_output_limit_slot_2
id: Start of Slot 2
trigger: time
- at: input_datetime.end_battery_output_limit_slot_2
id: End of Slot 2
trigger: time
- at: input_datetime.start_battery_output_limit_slot_3
id: Start of Slot 3
trigger: time
- at: input_datetime.end_battery_output_limit_slot_3
id: End of Slot 3
trigger: time
- at: input_datetime.start_battery_output_limit_slot_4
id: Start of Slot 4
trigger: time
- at: input_datetime.end_battery_output_limit_slot_4
id: End of Slot 4
trigger: time
- alias: When inverter resets
entity_id:
- switch.solaredge_i1_advanced_power_control
from: unavailable
to: 'on'
id: Inverter Reset
trigger: state
conditions:
- condition: template
value_template: '{{ is_state(''input_boolean.allow_battery_output_limit'',''on'')
}}'
alias: Is Allow Battery Output Limit On?
actions:
- choose:
- conditions:
- condition: trigger
id: Start of Slot 1
- condition: state
entity_id: input_boolean.battery_output_limit_slot_1
state: 'on'
sequence:
- data:
value: '{{ states(''input_number.desired_battery_output_limit_for_overnight_ev_charging'')
| float(0) }}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id: End of Slot 1
- condition: state
entity_id: input_boolean.battery_output_limit_slot_1
state: 'on'
sequence:
- data:
value: '{{ states(''input_number.default_battery_output_limit'') | float(0)
}}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id: Start of Slot 2
- condition: state
entity_id: input_boolean.battery_output_limit_slot_2
state: 'on'
sequence:
- data:
value: '{{ states(''input_number.desired_battery_output_limit_for_overnight_ev_charging'')
| float(0) }}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id: End of Slot 2
- condition: state
entity_id: input_boolean.battery_output_limit_slot_2
state: 'on'
sequence:
- data:
value: '{{ states(''input_number.default_battery_output_limit'') | float(0)
}}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id: Start of Slot 3
- condition: state
entity_id: input_boolean.battery_output_limit_slot_3
state: 'on'
sequence:
- data:
value: '{{ states(''input_number.desired_battery_output_limit_for_overnight_ev_charging'')
| float(0) }}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id: End of Slot 3
- condition: state
entity_id: input_boolean.battery_output_limit_slot_3
state: 'on'
sequence:
- data:
value: '{{ states(''input_number.default_battery_output_limit'') | float(0)
}}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id: Start of Slot 4
- condition: state
entity_id: input_boolean.battery_output_limit_slot_4
state: 'on'
sequence:
- data:
value: '{{ states(''input_number.desired_battery_output_limit_for_overnight_ev_charging'')
| float(0) }}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id: End of Slot 4
- condition: state
entity_id: input_boolean.battery_output_limit_slot_4
state: 'on'
sequence:
- data:
value: '{{ states(''input_number.default_battery_output_limit'') | float(0)
}}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id:
- Inverter Reset
- condition: time
after: input_datetime.start_battery_output_limit
before: input_datetime.end_battery_output_limit_slot_4
- condition: numeric_state
entity_id: number.solaredge_i1_storage_discharge_limit
above: 100
- condition: state
entity_id: input_boolean.allow_battery_output_limit
state: 'on'
sequence:
- data:
value: '{{ states(''input_number.desired_battery_output_limit_for_overnight_ev_charging'')
| float(0) }}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
trace:
stored_traces: 10
mode: single
- alias: List Daily Calendar Events
description: ''
triggers:
- hours: /1
trigger: time_pattern
conditions: []
actions:
- action: calendar.get_events
data:
duration:
hours: 24
minutes: 0
seconds: 0
target:
entity_id: calendar.forrester_events
response_variable: calendar_response
- event: calendar_poll
event_data:
calendar_response: '{{ calendar_response }}'
mode: single
- alias: Living Room Lights
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.living_room_fp2_presence_sensor_1
from: 'off'
to: 'on'
id: Light On With Presence
- platform: state
entity_id:
- binary_sensor.living_room_fp2_presence_sensor_1
from: 'on'
to: 'off'
for:
hours: 0
minutes: 1
seconds: 0
id: Light Off With No Presence
- platform: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
below: input_number.low_light_threshold
id: Light On With Low Light
- platform: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
above: input_number.upper_light_threshold_level
id: Light Off With Good Light
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- choose:
- conditions:
- condition: trigger
id:
- Light On With Presence
alias: Light on with presence
- condition: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
below: input_number.low_light_threshold
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 30
target:
entity_id:
- light.corner_lamp
- light.standard_lamp
- conditions:
- condition: trigger
id:
- Light Off With No Presence
alias: Light off with no presence
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.corner_lamp
- light.standard_lamp
- conditions:
- condition: trigger
id:
- Light On With Low Light
alias: Light on with low light and presence
- condition: state
entity_id: input_boolean.living_room_occupied
state: 'on'
sequence:
- service: light.turn_on
data:
color_temp: 500
brightness_pct: 30
target:
entity_id:
- light.corner_lamp
- light.standard_lamp
- conditions:
- condition: trigger
id:
- Light Off With Good Light
alias: Light off with good light
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.corner_lamp
- light.standard_lamp
mode: restart
- alias: Living Room Lights with Presence V2.0
description: ''
triggers:
- entity_id: light.living_room_lights
from: 'off'
to: 'on'
id: Ceiling Light On
trigger: state
- entity_id: light.living_room_lights
from: 'on'
to: 'off'
id: Ceiling Light Off
trigger: state
- trigger: state
entity_id:
- binary_sensor.living_room_fp2_presence_sensor_1
from: 'off'
to: 'on'
id: Light On With Presence
- entity_id:
- binary_sensor.living_room_fp2_presence_sensor_1
from: 'on'
to: 'off'
for:
hours: 0
minutes: 1
seconds: 0
id: Light Off With No Presence
trigger: state
- entity_id: sensor.living_room_fp2_light_sensor_light_level
below: input_number.low_light_threshold
for:
seconds: 20
id: Low Light
trigger: numeric_state
- entity_id: sensor.living_room_fp2_light_sensor_light_level
above: input_number.upper_light_threshold_level
for:
seconds: 20
id: Good Light
trigger: numeric_state
- trigger: conversation
command:
- '(i need | can I get) some [help with] [the] (light | lights | lighting) [in
here | in this room] '
- (it is | its) a bit dark [in here | in this room]
- there is too much light [in here | in this room]
- (can you | will you) dim the (light | lights | lighting) [in here | in this
room]
- ( its | it is ) too bright [in here | in this room]
id: JARVIS
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Ceiling Light On
- condition: or
conditions:
- condition: state
entity_id: light.corner_lamp_2
state: 'on'
- condition: state
entity_id: light.dreamview_g1_pro_2
state: 'on'
alias: If corner lamp is on or the tv lights are on
sequence:
- data: {}
target:
entity_id:
- light.dreamview_g1_pro_2
action: light.turn_off
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- action: scene.create
data:
scene_id: lights_before
snapshot_entities:
- light.floor_lamp_pro_1
- light.glide_lights_right_2
- light.govee_glide_left_2
- light.corner_lamp_2
- action: script.update_living_room_scene_tracker
data:
new_scene: lights_before
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- action: light.turn_off
target:
entity_id:
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- Ceiling Light Off
sequence:
- if:
- condition: state
entity_id: switch.living_room_tv
state: 'on'
then:
- action: scene.turn_on
target:
entity_id: scene.lights_before
data: {}
- delay:
hours: 0
minutes: 0
seconds: 20
- data: {}
target:
entity_id: light.dreamview_g1_pro_2
action: light.turn_on
- action: scene.turn_on
target:
entity_id: scene.lights_before
data: {}
- conditions:
- condition: trigger
id:
- Light On With Presence
- condition: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
below: input_number.low_light_threshold
- condition: state
entity_id: light.living_room_lights
state: 'off'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.living_room_scene_update_lock
state: 'off'
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ states(''input_text.current_living_room_scene'')
== ''lights_before'' }}'
sequence:
- action: scene.turn_on
target:
entity_id: scene.lights_before
data: {}
- conditions:
- condition: state
entity_id: binary_sensor.morning
state: 'on'
sequence:
- action: scene.turn_on
target:
entity_id: scene.ready_for_morning
data: {}
- conditions:
- condition: state
entity_id: binary_sensor.lunchtime
state: 'on'
sequence:
- action: scene.turn_on
target:
entity_id: scene.lunchtime_govee
data: {}
- conditions:
- condition: state
entity_id: binary_sensor.afternoon
state: 'on'
sequence:
- action: scene.turn_on
target:
entity_id: scene.afternoon_govee
data: {}
- conditions:
- condition: state
entity_id: binary_sensor.dinner_time
state: 'on'
sequence:
- action: scene.turn_on
target:
entity_id: scene.dinnertime_govee
data: {}
default:
- action: scene.turn_on
target:
entity_id: scene.evening_govee
data: {}
alias: Choose between 6 scenes to set
- action: script.update_living_room_scene_tracker
data:
new_scene: "{% if states('input_text.current_living_room_scene') ==\
\ 'lights_before' %}\n lights_before\n{% elif is_state('binary_sensor.morning',\
\ 'on') %}\n ready_for_morning\n{% elif is_state('binary_sensor.lunchtime',\
\ 'on') %}\n lunchtime_govee\n{% elif is_state('binary_sensor.afternoon',\
\ 'on') %}\n afternoon_govee\n{% elif is_state('binary_sensor.dinner_time',\
\ 'on') %}\n dinnertime_govee\n{% else %}\n evening_govee\n{% endif\
\ %} \n"
- conditions:
- condition: trigger
id:
- Light Off With No Presence
sequence:
- alias: Turn off lamps when no presence
action: light.turn_off
target:
entity_id:
- light.corner_lamp_2
- light.floor_lamp_pro_1
- light.govee_glide_left_2
- light.glide_lights_right_2
data: {}
- conditions:
- condition: trigger
id:
- Low Light
- condition: state
entity_id: binary_sensor.living_room_fp2_presence_sensor_1
state: 'on'
- condition: state
entity_id: light.living_room_lights
state: 'off'
sequence:
- alias: Turn on lamp if light level is low and presence is detected
action: light.turn_on
target:
entity_id:
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- Good Light
sequence:
- alias: Turn off lamp if light level is good
action: light.turn_off
target:
entity_id:
- light.corner_lamp_2
data: {}
- conditions:
- condition: trigger
id:
- JARVIS
sequence:
- variables:
device: '{{ trigger.context.id }}'
area: '{{ area_name(trigger.context.id) if trigger.context.id else ''living
room'' }}'
- data:
voice_command: '{{ trigger.event.intent_input }}'
room_area: '{{ area }}'
action: script.jarvis_get_the_lights
mode: parallel
max: 5
- alias: Living room tv voice
description: ''
triggers:
- trigger: conversation
command:
- TV on
- turn on the TV
- turn the TV on
id: 'on'
- trigger: conversation
command:
- TV off
- turn off the TV
- turn the TV off
id: 'off'
conditions:
- condition: state
entity_id: assist_satellite.jarvis_downstairs_assist_satellite
state: processing
actions:
- action: script.living_room_tv_toggle_2
data: {}
mode: single
- alias: Loft Lights on with hatch
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.loft_hatch_sensor_contact
from: 'off'
to: 'on'
id: Open
- platform: state
entity_id:
- binary_sensor.loft_hatch_sensor_contact
from: 'on'
to: 'off'
id: Closed
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Open
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.loft_light
- conditions:
- condition: trigger
id:
- Closed
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.loft_light
mode: single
- alias: Log Nmap devices on Router Reset
description: Runs the Nmap scan when the router comes online.
triggers:
- trigger: state
entity_id:
- device_tracker.skyrouter
from: not_home
to: home
conditions: []
actions:
- action: shell_command.log_nmap_devices
data: {}
mode: single
- alias: Magic Cube Stuff
description: ''
trigger:
- platform: state
entity_id:
- sensor.magic_cube_side
to: '1'
id: Side 1
- platform: state
entity_id:
- sensor.magic_cube_side
to: '2'
id: Side 2
- platform: state
entity_id:
- sensor.magic_cube_side
to: '3'
id: Side 3
- platform: state
entity_id:
- sensor.magic_cube_side
to: '4'
id: Side 4
- platform: state
entity_id:
- sensor.magic_cube_side
to: '5'
id: Side 5
- platform: state
entity_id:
- sensor.magic_cube_side
to: '6'
id: Side 6
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Side 1
sequence:
- service: switch.turn_on
data: {}
target:
entity_id: switch.ingrid_socket_1
- service: media_player.turn_on
data: {}
target:
device_id: 2285e887e55f34f8b3cfd7d7e8e58f6a
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: notify.alexa_media_kitchen_echo_show
data:
message: {{ ['Information.
The kitchen media system has been activated', 'Hailing
frequencies open', 'Information.
The kitchen televisual devices have been turned on', 'Pardon
me sir. I have turned on the goggle box for your televisual
viewing experience', 'Pardon me madam.
I have activated the multimedia viewing apparatus, to help while away
the time?']|random }}
data:
type: tts
method: speak
- conditions:
- condition: trigger
id:
- Side 2
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.ingrid_socket_1
- service: media_player.turn_off
data: {}
target:
device_id: 2285e887e55f34f8b3cfd7d7e8e58f6a
- if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
then:
- service: notify.alexa_media_kitchen_echo_show
data:
message: {{ ['Excuse
me madam, but are you aware that the kitchen media system
has been deactivated?','Hailing frequencies closed','Information. The
kitchen televisual devices have been turned off','Pardon
me sir, but I believe it might be time to see what is going
on in the real world','Excuse me madam,
now that you have had your fill of tv, might I suggest a return to reality']|random
}}
data:
type: tts
method: speak
- conditions:
- condition: trigger
id: Side 3
sequence:
- service: notify.alexa_media_kitchen_echo_show
data:
message: {{ ['I have started a
4 minute coffee timer. It starts, now','I have begun counting to 240.
When I am done, your coffee will be ready','Ready, steady, 4 minute coffee timer. Go','When the Earth has rotated by 1 degree,
your coffee will be ready','In 4 minutes
time, your caffiene fix for today will be ready.']|random }}
data:
type: tts
method: speak
- delay:
hours: 0
minutes: 4
seconds: 0
milliseconds: 0
alias: Wait 4 minutes
- service: media_player.volume_set
data:
volume_level: '{{states(''input_number.alexa_volume_level_announcements'')|float(0)}}'
target:
entity_id: media_player.everywhere_2
alias: Set volume everywhere based on an input number helper
enabled: true
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
alias: Wait 2s
enabled: true
- service: notify.alexa_media_everywhere_2
data:
message: "{{ [ 'Information. Your coffee is ready. How would you like\
\ it?', \n 'Ah, smell that\
\ coffee. Get it while its hot',\n 'Information.\
\ Your coffee is ready for pouring.', \n 'Bing bong. Coffee time!', \n \
\ 'Coffee, coffee everywhere and not a drop to drink. Only kidding. Your coffee is ready', \n ]|random\n\
}}"
data:
type: announce
method: speak
- service: media_player.volume_set
data:
volume_level: '{{states(''input_number.alexa_volume_level_default_all'')|float(0)}}'
target:
entity_id: media_player.everywhere_2
alias: Set volume everywhere to default
enabled: true
- service: media_player.volume_set
data:
volume_level: '{{states(''input_number.alexa_volume_level_default_all'')|float(0)}}'
target:
device_id: 49841004268921a9f26338df9c24c561
alias: Set volume of kitchen echo show to default
enabled: true
- conditions:
- condition: trigger
id: Side 6
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
sequence:
- service: media_player.volume_set
data:
volume_level: '{{ states(''input_number.alexa_volume_level_announcements'')|float(0)}}'
target:
entity_id: media_player.everywhere_2
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: notify.alexa_media_everywhere_2
data:
message: "{{ ['Excuse my interruption everyone. Would you please head\
\ to the kitchen where mummy has prepared a delicious meal', \n 'Pardon me everyone. Food is now being served\
\ in the kitchen. Get it while it is hot', \n 'If I might interrupt your evening deliberations. If you are\
\ hungry, the wait is over. Dinner is on the kitchen table', \n 'Excuse me everyone. I thought you might be\
\ interested to hear that it is time to head to the kitchen. When you\
\ get there, you might just find some food on the table',\n 'Pardon me everyone. My tummy is rumbly. If\
\ your tummy is rumbly, then rumble on to the kitchen for some, yummy food'\n ]|random }}"
data:
type: announce
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: media_player.volume_set
data:
volume_level: '{{ states(''input_number.alexa_volume_level_default_all'')|float(0)}}'
target:
entity_id: media_player.everywhere_2
- conditions:
- condition: trigger
id: Side 5
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
sequence:
- service: media_player.volume_set
data:
volume_level: '{{ states(''input_number.alexa_volume_level_announcements'')|float(0)}}'
target:
entity_id: media_player.everywhere_2
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: notify.alexa_media_everywhere_2
data:
message: "{{ ['Excuse\nme. Would you mind please making your way to\
\ the Dining Room where\nGemma has prepared\
\ a delicious Sunday\ndinner', \n 'Information.\
\ I thought you might be interested to hear that dinner is now being served\
\ in the Dining Room. Get it while it is hot', \n 'Excuse me. I dont know about you, but I am hungry. If you are hungry, the wait is over. Dinner\
\ is on the Dining Room table', \n 'Your attention\
\ please. I have been informed by our head chef that it is time\
\ to head to the Dining Room. When you get there, you might just find\
\ that dinner is on the table',\n 'Excuse\
\ me. My tummy feels a bit rumbly. If your tummy is rumbly too,\
\ then rumble on to the Dining Room for some yummy\
\ dinner'\n ]|random }}"
data:
type: announce
method: all
- delay:
hours: 0
minutes: 0
seconds: 2
milliseconds: 0
- service: media_player.volume_set
data:
volume_level: '{{ states(''input_number.alexa_volume_level_default_all'')|float(0)}}'
target:
entity_id: media_player.everywhere_2
- conditions:
- condition: trigger
id:
- Side 4
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
sequence:
- service: notify.alexa_media_kitchen_echo_show
data:
message: {{ ['Excuse
me madam, I regret to inform you that this side of the magic
cube has not yet been programmed. Perhaps you should try a different side',
'Information. Please try another side
as this one appears to do nothing', 'Pardon me
sir, but I believe you may have inadvertently selected side
4, and that side does nothing, for now', 'Warning.
This cube will self destruct in 5 seconds , 5 , 4 , 3,
2, 1 .
Ha ha, only kidding']|random
}}
data:
type: tts
method: speak
mode: queued
max: 10
- alias: Magic Cube Stuff v2.0
description: ''
triggers:
- entity_id:
- sensor.magic_cube_side
to: '1'
id: Side 1
trigger: state
- entity_id:
- sensor.magic_cube_side
to: '2'
id: Side 2
trigger: state
- entity_id:
- sensor.magic_cube_side
to: '3'
id: Side 3
trigger: state
- entity_id:
- sensor.magic_cube_side
to: '4'
id: Side 4
trigger: state
- entity_id:
- sensor.magic_cube_side
to: '5'
id: Side 5
trigger: state
- entity_id:
- sensor.magic_cube_side
to: '6'
id: Side 6
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Side 1
- condition: state
entity_id: binary_sensor.lights_out
state: 'off'
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
sequence:
- action: light.turn_on
data:
color_temp: 200
brightness: 255
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id:
- Side 2
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
sequence:
- action: media_player.play_media
data:
entity_id: media_player.all_jarvis_media_player
media_content_id: http://192.168.0.95:8123/local/Sounds/Jetsons-doorbell.mp3
media_content_type: music
- delay:
hours: 0
minutes: 0
seconds: 4
- action: script.jarvis_speech_engine_v3_0
data:
type: announcement
where: all
message: "{{ [\n 'Would you all please make your way to the kitchen where\
\ mummy has made us all a delicious meal', \n 'Food is now being served\
\ in the kitchen. Come and get it while its hot', \n 'If your hungry,\
\ the wait is over. Your tea is on the kitchen table', \n 'I thought\
\ you might be interested to hear that its time to head to the kitchen.\
\ When you get there, you might just find some food on the table',\n \
\ 'My tummy is rumbly. If your tummy is also rumbly then please rumble\
\ on to the kitchen for some, yummy food'\n ] | random }}\n"
- conditions:
- condition: trigger
id:
- Side 3
- Side 4
sequence:
- action: script.jarvis_speech_engine_v3_0
data:
type: announcement
where: kitchen
message: "{{ ['I have started a 4 minute coffee timer. It starts, now',\
\ \n 'I have begun counting to 240. When I am done, your coffee will\
\ be ready',\n 'Ready, steady, fore minute coffee timer. Go',\n \
\ 'When the Earth has rotated by 1 degree, your coffee will be ready',\n\
\ 'In four minutes time, your caffiene fix for today will be. ready.'\n\
\ ] | random }}"
- delay:
hours: 0
minutes: 4
seconds: 0
milliseconds: 0
alias: Wait 4 minutes
- action: script.jarvis_speech_engine_v3_0
data:
type: announcement
where: kitchen
message: "{{ ['Your coffee is ready.',\n 'ahhhhh! smell that coffee.\
\ Get it while its hot', \n 'Finally, the wait is over and your coffee\
\ is ready.',\n 'Bing Bong! Coffee time!',\n 'Coffee, coffee everywhere\
\ and not a drop to drink. Only kidding! Your coffee is ready', \n\
\ ] | random }}\n"
- conditions:
- condition: trigger
id: Side 6
sequence:
- action: light.turn_on
data:
color_temp: 367
brightness: 28
target:
entity_id: light.kitchen_lights_2
- conditions:
- condition: trigger
id: Side 5
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
sequence:
- action: media_player.play_media
data:
entity_id: media_player.all_jarvis_media_player
media_content_id: http://192.168.0.95:8123/local/Sounds/Jetsons-doorbell.mp3
media_content_type: music
- delay:
hours: 0
minutes: 0
seconds: 4
- action: script.jarvis_speech_engine_v3_0
data:
type: announcement
where: all
message: "{{ [\n 'Would you mind please making your way to the Dining\
\ Room where Gemma has prepared a more than delicious Sunday dinner',\
\ \n 'I thought you might be interested to hear that dinner is now\
\ being served in the Dining Room. Get it while its still hot', \n \
\ 'I dont know about you, but I am hungry. If you are hungry, the wait\
\ is over. Dinner is on the Dining Room table. It might even be on a plate.',\
\ \n 'I have been informed by our head chef that it is time to head\
\ to the Dining Room. When you get there, you might just find that dinner\
\ is on the table. If your lucky, it might even be on a plate.',\n \
\ 'I dont know about you, but my tummy feels a bit rumbly. Please rumble\
\ on to the Dining Room for some yummy dinner'\n ] | random }}\n"
mode: restart
initial_state: true
- alias: Main Bathroom Lights with Presence
description: ''
triggers:
- entity_id:
- binary_sensor.main_bathroom_presence_occupancy
from: 'off'
to: 'on'
id: Light On
trigger: state
- entity_id:
- binary_sensor.main_bathroom_presence_occupancy
from: 'on'
to: 'off'
for:
hours: 0
minutes: 0
seconds: 0
id: Light Off
trigger: state
- alias: Bathroom Light off with Timer
event_type: timer.finished
event_data:
entity_id: timer.bathroom_light
id: Timer Done
enabled: true
trigger: event
- entity_id:
- binary_sensor.overnight
to: 'on'
for:
hours: 0
minutes: 0
seconds: 0
id: Dim Lights
trigger: state
- entity_id:
- switch.main_bathroom_switch_light
from: 'off'
id: Switch On
to: 'on'
trigger: state
- entity_id:
- switch.main_bathroom_switch_light
from: 'on'
id: Switch Off
to: 'off'
trigger: state
conditions:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
actions:
- choose:
- conditions:
- condition: trigger
id:
- Light On
- condition: state
entity_id: binary_sensor.overnight
state: 'off'
- condition: numeric_state
entity_id: sensor.main_bathroom_presence_illuminance
below: input_number.low_light_threshold
sequence:
- data:
color_temp: 200
brightness: 64
target:
entity_id: light.main_bathroom_light
action: light.turn_on
- target:
entity_id: timer.bathroom_light
data: {}
action: timer.start
- conditions:
- condition: trigger
id:
- Light On
- condition: state
entity_id: binary_sensor.overnight
state: 'on'
sequence:
- data:
rgb_color:
- 255
- 248
- 52
brightness: 26
target:
entity_id: light.main_bathroom_light
action: light.turn_on
- target:
entity_id: timer.bathroom_light
data: {}
action: timer.start
- conditions:
- condition: trigger
id:
- Light Off
- condition: state
entity_id: light.main_bathroom_light
state: 'on'
- condition: state
entity_id: timer.bathroom_light
state: idle
- condition: state
entity_id: input_boolean.allow_main_bathroom_lights_max
state: 'off'
sequence:
- data: {}
target:
entity_id: light.main_bathroom_light
action: light.turn_off
- conditions:
- condition: trigger
id:
- Timer Done
- condition: state
entity_id: binary_sensor.main_bathroom_presence_occupancy
state: 'off'
- condition: state
entity_id: light.main_bathroom_light
state: 'on'
- condition: state
entity_id: input_boolean.allow_main_bathroom_lights_max
state: 'off'
sequence:
- target:
entity_id: light.main_bathroom_light
data: {}
action: light.turn_off
- conditions:
- condition: trigger
id:
- Dim Lights
- condition: state
entity_id: input_boolean.allow_main_bathroom_lights_max
state: 'off'
sequence:
- data:
rgb_color:
- 255
- 248
- 52
brightness: 26
target:
entity_id: light.main_bathroom_light
action: light.turn_on
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- condition: state
entity_id: binary_sensor.main_bathroom_occupied
state: 'off'
- data: {}
target:
entity_id: light.main_bathroom_light
action: light.turn_off
- conditions:
- condition: trigger
id:
- Switch On
sequence:
- data:
color_temp: 200
brightness: 64
target:
entity_id: light.main_bathroom_light
action: light.turn_on
- conditions:
- condition: trigger
id:
- Switch Off
- condition: state
entity_id: light.main_bathroom_light
state: 'on'
sequence:
- data: {}
target:
entity_id: light.main_bathroom_light
action: light.turn_off
mode: single
- alias: Main Bedroom Lights with Presence
description: ''
triggers:
- entity_id:
- binary_sensor.presence_sensor_fp2_07ff_presence_sensor_4
- binary_sensor.presence_sensor_fp2_07ff_presence_sensor_3
id: Lights On
from: 'off'
to: 'on'
trigger: state
- entity_id:
- binary_sensor.presence_sensor_fp2_07ff_presence_sensor_4
- binary_sensor.presence_sensor_fp2_07ff_presence_sensor_3
id: Lights Off
from: 'on'
to: 'off'
for:
hours: 0
minutes: 0
seconds: 15
trigger: state
- entity_id: sensor.main_bedroom_fp2_light_sensor_light_level
below: input_number.low_light_threshold
id: Low Light
trigger: numeric_state
- entity_id: sensor.main_bedroom_fp2_light_sensor_light_level
id: Good Light
above: input_number.upper_light_threshold_level
trigger: numeric_state
- minutes: /10
id: Check
trigger: time_pattern
conditions:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
actions:
- choose:
- conditions:
- condition: trigger
id:
- Lights On
- condition: template
value_template: '{{"Daves" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Dave's side of bed
- condition: numeric_state
entity_id: sensor.main_bedroom_fp2_light_sensor_light_level
below: input_number.low_light_threshold
- condition: state
entity_id: input_boolean.main_bedroom_bedside_lamps_active
state: 'on'
- condition: state
entity_id: input_boolean.we_are_in_bed
state: 'off'
sequence:
- action: light.turn_on
data: {}
target:
entity_id: light.dad_s_bedside_lamp_light
- conditions:
- condition: trigger
id:
- Lights On
- condition: template
value_template: '{{"Gems" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Gem's side of bed
- condition: numeric_state
entity_id: sensor.main_bedroom_fp2_light_sensor_light_level
below: input_number.low_light_threshold
- condition: state
entity_id: input_boolean.main_bedroom_bedside_lamps_active
state: 'on'
- condition: state
state: 'off'
entity_id: input_boolean.we_are_in_bed
sequence:
- action: light.turn_on
data: {}
target:
entity_id: light.mum_s_bedside_lamp_light
- conditions:
- condition: trigger
id:
- Lights Off
- condition: template
value_template: '{{"Daves" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Dave's side of bed
- condition: state
state: 'on'
entity_id: light.dad_s_bedside_lamp_light
sequence:
- action: light.turn_off
data: {}
target:
entity_id: light.dad_s_bedside_lamp_light
- conditions:
- condition: trigger
id:
- Lights Off
- condition: template
value_template: '{{"Gems" in trigger.to_state.attributes.friendly_name }}'
alias: Filter Gem's side of bed
- condition: state
state: 'on'
entity_id: light.mum_s_bedside_lamp_light
sequence:
- action: light.turn_off
data: {}
target:
entity_id: light.mum_s_bedside_lamp_light
- conditions:
- condition: trigger
id:
- Low Light
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.presence_sensor_fp2_07ff_presence_sensor_3
state: 'on'
- condition: state
entity_id: binary_sensor.presence_sensor_fp2_07ff_presence_sensor_4
state: 'on'
- condition: state
entity_id: input_boolean.main_bedroom_bedside_lamps_active
state: 'on'
- condition: state
entity_id: input_boolean.we_are_in_bed
state: 'off'
sequence:
- action: light.turn_on
data: {}
target:
entity_id:
- light.mum_s_bedside_lamp_light
- light.dad_s_bedside_lamp_light
- conditions:
- condition: trigger
id:
- Good Light
- condition: or
conditions:
- condition: state
entity_id: light.dad_s_bedside_lamp_light
state: 'on'
- condition: state
entity_id: light.mum_s_bedside_lamp_light
state: 'on'
sequence:
- action: light.turn_off
data: {}
target:
entity_id:
- light.mum_s_bedside_lamp_light
- light.dad_s_bedside_lamp_light
- conditions:
- condition: trigger
id:
- Check
- condition: state
entity_id: switch.master_bedroom_light_switch
state: 'on'
- condition: state
entity_id: binary_sensor.master_bedroom_occupied
state: 'off'
sequence:
- action: switch.turn_off
target:
entity_id: switch.master_bedroom_light_switch
data: {}
mode: restart
initial_state: true
- alias: Main Bedroom Presence
description: ''
triggers:
- entity_id:
- binary_sensor.main_bedroom_fp2_presence_sensor_1
from: 'off'
to: 'on'
id: Bedroom Presence
trigger: state
- entity_id:
- binary_sensor.main_bedroom_fp2_presence_sensor_1
from: 'on'
to: 'off'
id: Bedroom Absence
trigger: state
- entity_id:
- binary_sensor.presence_sensor_fp2_07ff_presence_sensor_4
from: 'off'
to: 'on'
id: Dads Side Presence
trigger: state
- entity_id:
- binary_sensor.presence_sensor_fp2_07ff_presence_sensor_4
from: 'on'
to: 'off'
id: Dads Side Absence
trigger: state
- entity_id:
- binary_sensor.presence_sensor_fp2_07ff_presence_sensor_3
from: 'off'
to: 'on'
id: Mums Side Presence
trigger: state
- entity_id:
- binary_sensor.presence_sensor_fp2_07ff_presence_sensor_3
from: 'on'
to: 'off'
id: Mums Side Absence
trigger: state
- entity_id:
- binary_sensor.main_bedroom_fp2_presence_sensor_2
from: 'off'
to: 'on'
id: En Suite Presence
trigger: state
- entity_id:
- binary_sensor.main_bedroom_fp2_presence_sensor_2
from: 'on'
to: 'off'
id: En Suite Absence
trigger: state
- entity_id:
- media_player.main_bedroom_dot
attribute: last_called
to: 'true'
id: Alexa
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Bedroom Presence
- Alexa
sequence:
- action: input_text.set_value
data:
value: main_bedroom
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_main_bedroom
- conditions:
- condition: trigger
id: Bedroom Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_main_bedroom
- conditions:
- condition: trigger
id: Dads Side Presence
sequence:
- action: input_text.set_value
data:
value: dads_side_of_bed
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.dad_s_side_of_bed_occupied
- conditions:
- condition: trigger
id: Dads Side Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.dad_s_side_of_bed_occupied
- conditions:
- condition: trigger
id: Mums Side Presence
sequence:
- action: input_text.set_value
data:
value: mums_side_of_bed
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.mum_s_side_of_bed_occupied
- conditions:
- condition: trigger
id: Mums Side Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.mum_s_side_of_bed_occupied
- conditions:
- condition: trigger
id: En Suite Presence
sequence:
- action: input_text.set_value
data:
value: en_suite_bathroom
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_en_suite_bathroom
- conditions:
- condition: trigger
id: En Suite Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_en_suite_bathroom
mode: parallel
- alias: Main Bedroom Wakeup Lights v2.0
description: Turn on wakeup lights once sunrise is later than 7am
triggers:
- value_template: '{{ as_timestamp(states(''sensor.sun_next_rising'')) | timestamp_custom(''%H:%M'')
> ''06:20'' }}'
id: Activate
trigger: template
alias: Activate wakeup lights
- value_template: '{{ as_timestamp(states(''sensor.sun_next_rising'')) | timestamp_custom(''%H:%M'')
< ''06:20'' }}'
id: Deactivate
trigger: template
alias: Deactivate wakeup lights
- entity_id:
- binary_sensor.morning
from: 'off'
to: 'on'
id: Wake Up
trigger: state
- entity_id: calendar.school_holidays
from: 'off'
to: 'on'
id: school holiday on
trigger: state
- entity_id: calendar.school_holidays
from: 'on'
to: 'off'
id: school holiday off
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Activate
sequence:
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.wakeup_lights
- conditions:
- condition: trigger
id:
- Deactivate
sequence:
- action: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.wakeup_lights
- conditions:
- condition: trigger
id: school holiday on
sequence:
- action: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.wakeup_lights
- conditions:
- condition: trigger
id: school holiday off
- condition: template
value_template: '{{ as_timestamp(states(''sensor.sun_next_rising'')) | timestamp_custom(''%H:%M'')
> ''06:20'' }}'
sequence:
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.wakeup_lights
- conditions:
- condition: trigger
id:
- Wake Up
- condition: or
conditions:
- condition: state
entity_id: input_boolean.wakeup_lights
state: 'on'
- condition: state
entity_id: calendar.schools_out
state: 'on'
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
sequence:
- delay:
hours: 0
minutes: 23
seconds: 0
milliseconds: 0
- target:
entity_id: light.bed_lamps_3
data:
brightness_pct: 5
effect: Sunrise
action: light.turn_on
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- target:
entity_id: light.bed_lamps_3
data:
brightness_pct: 5
rgb_color:
- 255
- 50
- 0
action: light.turn_on
- conditions:
- condition: trigger
id:
- Wake Up
- condition: or
conditions:
- condition: state
entity_id: input_boolean.wakeup_lights
state: 'on'
- condition: state
entity_id: calendar.schools_out
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'off'
- condition: state
entity_id: calendar.gem_holidays
state: 'on'
sequence:
- delay:
hours: 1
minutes: 3
seconds: 0
milliseconds: 0
- target:
entity_id: light.bed_lamps_3
data:
brightness_pct: 5
effect: Sunrise
action: light.turn_on
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- target:
entity_id: light.bed_lamps_3
data:
brightness_pct: 5
rgb_color:
- 255
- 50
- 0
action: light.turn_on
mode: single
initial_state: true
- alias: Master Bedroom TV Voice
description: ''
triggers:
- trigger: conversation
command:
- TV on
- turn on the TV
- turn the TV on
id: 'on'
- trigger: conversation
command:
- TV off
- turn off the TV
- turn the TV off
id: 'off'
conditions:
- condition: state
entity_id: assist_satellite.jarvis_main_bedroom_assist_satellite
state: processing
actions:
- choose:
- conditions:
- condition: trigger
id:
- 'on'
sequence:
- action: media_player.turn_on
data: {}
target:
entity_id: media_player.32_sharp_roku_tv
- conditions:
- condition: trigger
id:
- 'off'
sequence:
- action: media_player.turn_off
data: {}
target:
entity_id: media_player.32_sharp_roku_tv
mode: single
- alias: Morning Get up Set up
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.hallway_camera_cell_motion_detection
from: 'off'
to: 'on'
id: Someone is up
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Someone is up
- condition: time
after: 06:30:00
before: 08:00:00
sequence:
- if:
- condition: state
entity_id: switch.guest_bedroom_camera_privacy
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.guest_bedroom_camera_privacy
- if:
- condition: state
entity_id: switch.jamie_s_room_cam_privacy
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.jamie_s_room_cam_privacy
- if:
- condition: state
entity_id: switch.seans_room_camera_privacy
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.seans_room_camera_privacy
- alias: New Security System
description: ''
triggers:
- entity_id:
- input_boolean.security_system_status
from: 'off'
to: 'on'
id: Arm Night
alias: When Night alarm ARMED
trigger: state
- entity_id:
- input_boolean.security_system_status
from: 'on'
to: 'off'
id: Disarm Night
alias: When Night alarm DISARMED
trigger: state
- entity_id:
- binary_sensor.family_home
from: 'on'
to: 'off'
id: Arm Away
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id:
- binary_sensor.family_home
from: 'off'
to: 'on'
id: Disarm Away
trigger: state
- event_type: alarmo_failed_to_arm
id: Failed to arm
alias: When Alarmo fails to arm
trigger: event
- entity_id:
- alarm_control_panel.garage
to: triggered
id: Garage Triggered
alias: When the Garage alarm is triggered
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Arm Night
sequence:
- action: alarmo.arm
data:
mode: night
skip_delay: false
force: false
entity_id: alarm_control_panel.downstairs
alias: Arm the alarm in Night mode
- conditions:
- condition: trigger
id:
- Disarm Night
sequence:
- action: alarmo.disarm
data:
entity_id: alarm_control_panel.downstairs
code: '1503'
alias: Disarm the alarm in Night mode
- conditions:
- condition: trigger
id:
- Arm Away
sequence:
- action: alarmo.arm
data:
mode: away
skip_delay: false
force: true
entity_id: alarm_control_panel.upstairs
- action: alarmo.arm
data:
mode: away
skip_delay: false
force: false
entity_id: alarm_control_panel.downstairs
- action: switch.turn_on
target:
entity_id: switch.g3_sentry_bot
data: {}
alias: Arm the house alarm when we are away
- conditions:
- condition: trigger
id:
- Disarm Away
alias: Disarm house alarm when we are back home
sequence:
- action: alarmo.disarm
data:
code: '1503'
entity_id: alarm_control_panel.upstairs
- action: alarmo.disarm
data:
code: '1503'
entity_id: alarm_control_panel.downstairs
- action: switch.turn_off
target:
entity_id: switch.g3_sentry_bot
data: {}
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: '{{ [ "Barn door protocol has been deactivated.", "Lockdown procedure
disengaged! ", "Sentry Mode is no longer active. ", "I am no longer monitoring
the doors and windows.", "Shields have been lowered." ] | random }}
'
- conditions:
- condition: trigger
id:
- Failed to arm
sequence:
- action: notify.mobile_app_daves_samsung_galaxy
data:
title: LOCKDOWN ISSUE!
message: 'Unable to initiate lockdown because the following sensor(s) are
open: {{ trigger.event.data.open_sensors | join('', '') }}. Do you want
to force lockdown anyway? '
data:
actions:
- action: 'YES'
title: 'Yes'
- action: 'NO'
title: 'No'
- alias: Wait for a response
wait_for_trigger:
- event_type: mobile_app_notification_action
event_data:
action: 'YES'
trigger: event
- event_type: mobile_app_notification_action
event_data:
action: 'NO'
trigger: event
timeout:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
continue_on_timeout: true
- choose:
- conditions:
- condition: template
value_template: '{{ not wait.trigger }}'
alias: No response
sequence:
- action: alarmo.arm
data:
mode: away
skip_delay: false
force: true
entity_id: alarm_control_panel.upstairs
- action: alarmo.arm
data:
mode: away
skip_delay: false
force: true
entity_id: alarm_control_panel.downstairs
alias: Force ARM if no response after 5 minutes
- conditions:
- condition: template
value_template: '{{ wait.trigger.event.data.action == "YES" }}'
alias: YES response
sequence:
- action: alarmo.arm
data:
mode: away
skip_delay: false
force: true
entity_id: alarm_control_panel.upstairs
- action: alarmo.arm
data:
mode: away
skip_delay: false
force: true
entity_id: alarm_control_panel.downstairs
alias: Force ARM if response YES
- conditions:
- condition: template
value_template: '{{ wait.trigger.event.data.action == "NO" }}'
alias: NO response
sequence:
- action: script.text_notify_dave
data:
title: ALARM NOT ARMED!
message: The House alarm was not armed.
alias: Do not ARM if response NO
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: '{{ [ "I was unable to activate barn door protocol due to an open
door or window.", "You may want to check the external doors and ground
floor windows. I was unable to secure them all.", "My systems check has
failed. Please check the external doors and ground floor windows." ] |
random }} I sent a message to your phone.
'
alias: Notify us when alarm fails to arm
- conditions:
- condition: trigger
id:
- Garage Triggered
sequence:
- alias: Send a notification to Dave
action: notify.mobile_app_daves_samsung_galaxy
data:
message: "The Garage alarm triggered/disarmed. Would you like to clear and\
\ rearm it? \n"
title: ALARM RESET?
data:
actions:
- action: 'YES'
title: 'Yes'
- action: 'NO'
title: 'No'
- alias: Wait for a response
wait_for_trigger:
- event_type: mobile_app_notification_action
event_data:
action: 'YES'
trigger: event
- event_type: mobile_app_notification_action
event_data:
action: 'NO'
trigger: event
timeout:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
continue_on_timeout: true
- choose:
- conditions:
- condition: template
value_template: '{{ not wait.trigger }}'
alias: REARM after 5 minutes if no response
sequence:
- action: alarmo.disarm
data:
entity_id: alarm_control_panel.garage
code: '1503'
- action: alarmo.arm
data:
mode: home
skip_delay: false
force: false
entity_id: alarm_control_panel.garage
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: '{{ [ "Barn door protocol initiated in the garage only.", "Garage
lockdown procedure engaged! ", "Sentry Mode is now active in the garage.
", "I am now monitoring the garage doors and camera.", "Shields have
been raised. The garage is now protected" ] | random }}
'
- conditions:
- condition: template
value_template: '{{ wait.trigger.event.data.action == "YES" }}'
alias: REARM if response is YES
sequence:
- action: alarmo.disarm
data:
entity_id: alarm_control_panel.garage
code: '1503'
- action: alarmo.arm
data:
mode: home
skip_delay: false
force: false
entity_id: alarm_control_panel.garage
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: '{{ [ "Barn door protocol initiated in the garage only.", "Garage
lockdown procedure engaged! ", "Sentry Mode is now active in the garage.
", "I am now monitoring the garage doors and camera.", "Shields have
been raised. The garage is now protected" ] | random }}
'
- conditions:
- condition: template
value_template: '{{ wait.trigger.event.data.action == "NO" }}'
sequence:
- action: alarmo.disarm
data:
entity_id: alarm_control_panel.garage
code: '1503'
- action: script.text_notify_dave
data:
title: GARAGE ALARM DISARMED!
message: The Garage alarm has been disarmed.
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: '{{ [ "Barn door protocol rescinded in the garage only.", "Garage
lockdown procedure disengaged! ", "Sentry Mode is no longer active
in the garage. ", "I am no longer monitoring the garage doors and
camera.", "Shields have been lowered. The garage is not protected"
] | random }}
'
alias: Do not REARM if response is NO
alias: Notify me when Garage alarm TRIGGERS or DISARMS
mode: restart
- alias: Nighttime lights
description: Turns on lights at dusk. Turn off all lights at bedtime
trigger:
- platform: state
entity_id:
- binary_sensor.lights_out
from: 'off'
to: 'on'
id: Lights Out
- platform: sun
event: sunset
offset: -00:30:00
id: Dusk
condition:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
action:
- choose:
- conditions:
- condition: trigger
id:
- Dusk
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
sequence:
- if:
- condition: state
entity_id: light.corner_lamp
state: 'off'
then:
- service: light.turn_on
data:
color_temp: 500
brightness: 76
target:
entity_id: light.corner_lamp
- service: light.turn_on
data: {}
target:
entity_id: light.stair_lights
- service: switch.turn_on
data: {}
target:
entity_id: switch.under_shelf_lights_local
- service: light.turn_on
data: {}
target:
entity_id: light.bed_lamps
- if:
- condition: state
entity_id: light.standard_lamp
state: 'off'
then:
- service: light.turn_on
data:
color_temp: 500
brightness: 76
target:
entity_id: light.standard_lamp
- if:
- condition: state
entity_id: switch.living_room_tv
state: 'on'
then:
- service: light.turn_on
data: {}
target:
entity_id: light.dreamview_g1_pro
- conditions:
- condition: trigger
id:
- Lights Out
sequence:
- if:
- condition: state
entity_id: light.corner_lamp
state: 'on'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.corner_lamp
alias: If corner lamp is on, turn it off
- if:
- condition: state
entity_id: light.standard_lamp
state: 'on'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.standard_lamp
alias: If standard lamp is on, turn it off
- if:
- condition: state
entity_id: switch.under_shelf_lights_local
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.under_shelf_lights_local
alias: If undershelf lights are on, turn them off
- if:
- condition: state
entity_id: light.dreamview_g1_pro
state: 'on'
- condition: state
entity_id: switch.living_room_tv
state: 'off'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.dreamview_g1_pro
alias: If TV mood lights are on, turn them off
- if:
- condition: state
entity_id: light.back_door_light
state: 'on'
- condition: state
entity_id: binary_sensor.back_door_sensor_contact
state: 'off'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.back_door_light
alias: If back door light is on, turn it off
- if:
- condition: state
entity_id: light.landing_lights
state: 'on'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.landing_lights
alias: 'If landing lights are on, turn them off '
- if:
- condition: state
entity_id: light.guest_bedroom_bedside_lamp_left
state: 'on'
- condition: state
entity_id: input_boolean.room_occupied_guest_bedroom
state: 'on'
then:
- service: light.turn_off
data: {}
target:
entity_id:
- light.guest_bedroom_bedside_lamp_left
- light.guest_bedroom_bedside_lamp_right
alias: If guest bedroom bedside lamps are on, turn them off
- if:
- condition: state
entity_id: switch.daddys_bedside_lamp_socket_1
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.daddys_bedside_lamp_socket_1
alias: If Daddy's bedside lamp is on, turn it off
- if:
- condition: state
entity_id: switch.mummys_bedside_lamp_socket_1
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id:
- switch.mummys_bedside_lamp_socket_1
alias: If Mummy's bedside lamp is on, turn it off
- service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.main_bedroom_bedside_lamps_active
- input_boolean.guest_bedroom_bedside_lamps_active
mode: restart
- alias: Night Lights and Reset
description: Turns on lights at dusk. Turn off all lights at bedtime and reset toggles
triggers:
- entity_id:
- binary_sensor.quiet_time_boys
from: 'on'
to: 'off'
id: Camera LED On
trigger: state
- entity_id:
- binary_sensor.quiet_time_boys
from: 'off'
to: 'on'
id: Camera LED Off
trigger: state
- event: sunset
offset: 0
id: Sunset
trigger: sun
- event: sunrise
offset: 0
id: Sunrise
trigger: sun
conditions:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
actions:
- choose:
- conditions:
- condition: trigger
id:
- Camera LED Off
sequence:
- target:
entity_id:
- switch.landing_camera_indicator_led
- switch.jamie_indicator_led
- switch.sean_indicator_led
- switch.guest_bedroom_camera_indicator_led
data: {}
action: switch.toggle
- conditions:
- condition: trigger
id:
- Camera LED On
sequence:
- if:
- condition: state
entity_id: input_boolean.bst
state: 'on'
then:
- target:
entity_id:
- switch.landing_camera_indicator_led
- switch.jamie_indicator_led
- switch.sean_indicator_led
- switch.guest_bedroom_camera_indicator_led
data: {}
action: switch.toggle
else:
- delay:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
- target:
entity_id:
- switch.landing_camera_indicator_led
- switch.jamie_indicator_led
- switch.sean_indicator_led
- switch.guest_bedroom_camera_indicator_led
data: {}
action: switch.toggle
- conditions:
- condition: trigger
id:
- Sunset
sequence:
- data: {}
target:
entity_id: switch.hallway_light_switch_2_left
action: switch.turn_on
- conditions:
- condition: trigger
id:
- Sunrise
sequence:
- data: {}
target:
entity_id: switch.hallway_light_switch_2_left
action: switch.turn_off
mode: parallel
max: 10
- alias: Notification Volume Dim
description: ''
triggers:
- entity_id: binary_sensor.quiet_time_boys
to: 'on'
trigger: state
conditions: []
actions:
- action: media_player.volume_set
data:
entity_id:
- media_player.kitchen_echo_show
- media_player.living_room_pop
- media_player.dining_room_pop
- media_player.guest_bedroom_echo_dot
- media_player.office_pop
- media_player.jamie_s_room_dot
- media_player.sean_s_room_dot
volume_level: '{{ states(''input_number.alexa_volume_level_low'') | float(0)
}}'
- delay:
hours: 0
minutes: 15
seconds: 0
milliseconds: 0
- action: media_player.volume_set
data:
volume_level: '{{ states(''input_number.jarvis_volume_level_low'') | float(0)
}}'
target:
entity_id:
- media_player.jarvis_downstairs_media_player
- media_player.jarvis_main_bedroom_media_player
- media_player.jarvis_kitchen_media_player
- media_player.jarvis_jamie_media_player
- media_player.jarvis_sean_media_player
- media_player.jarvis_office_media_player
mode: single
initial_state: true
- alias: Notification Volume Normal
description: ''
triggers:
- entity_id: binary_sensor.quiet_time_boys
to: 'off'
trigger: state
conditions: []
actions:
- action: media_player.volume_set
data:
entity_id:
- media_player.kitchen_echo_show
- media_player.living_room_pop
- media_player.dining_room_pop
- media_player.guest_bedroom_echo_dot
- media_player.jamie_s_room_dot
- media_player.sean_s_room_dot
- media_player.office_pop
volume_level: '{{ states(''input_number.alexa_volume_level_announcements'')
| float(0) }}'
- action: media_player.volume_set
data:
volume_level: '{{ states(''input_number.jarvis_volume_level_announcement'')
| float(0) }}'
target:
entity_id:
- media_player.jarvis_downstairs_media_player
- media_player.jarvis_main_bedroom_media_player
- media_player.jarvis_kitchen_media_player
- media_player.jarvis_jamie_media_player
- media_player.jarvis_sean_media_player
- media_player.jarvis_office_media_player
- delay:
hours: 0
minutes: 28
seconds: 0
milliseconds: 0
- action: media_player.volume_set
data:
entity_id:
- media_player.main_bedroom_dot
volume_level: '{{ states(''input_number.alexa_volume_level_announcements'')
| float(0) }}'
mode: single
initial_state: true
- alias: 'Notify: Any downstairs windows left open when we leave the house'
description: ''
mode: single
triggers:
- entity_id:
- group.family
to: not_home
from: 'on'
trigger: state
conditions:
- condition: state
entity_id:
- binary_sensor.living_room_window_left_contact
- binary_sensor.living_room_window_right_contact
- binary_sensor.dining_room_window_left_contact
- binary_sensor.dining_room_window_right_contact
- binary_sensor.kitchen_window_left_contact
- binary_sensor.kitchen_window_right_contact
- binary_sensor.hallway_window_contact
- binary_sensor.cloakroom_window_contact
- binary_sensor.back_door_sensor_contact
state: 'on'
actions:
- action: notify.mobile_app_{{states('input_text.my_mobile_phone_id')}}
data:
message: The {{trigger.to_state.attributes.friendly_name}} has been left open!
title: HOUSE INSECURE!
alias: Send a notification based on an input text helper
- action: notify.mobile_app_{{states('input_text.gem_s_mobile_phone_id')}}
data:
message: The {{trigger.to_state.attributes.friendly_name}} has been left open!
title: HOUSE INSECURE!
alias: Send a notification based on an input text helper
- alias: Notify on family members zone change
description: ''
mode: single
triggers:
- entity_id:
- person.david_forrester
- person.gem_forrester
to: null
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
conditions:
- condition: template
value_template: '{{ trigger.to_state.state != trigger.from_state.state }}'
actions:
- variables:
state_from: '{{ trigger.from_state.state }}'
state_to: '{{ trigger.to_state.state }}'
person: '{{ state_attr(trigger.entity_id, ''friendly_name'') }}'
event: "{%- if state_from == 'not_home' -%}\n {{ 'arrived' if state_to == 'home'\
\ else 'arrived at' }}\n{%- else -%}\n left\n{%- endif -%}"
zone: '{{ state_to if state_from == ''not_home'' else state_from }}'
emoji: '{{ ''🏠'' if zone == ''home'' else ''📍'' }}'
- action: script.text_notify_parents
data:
message: '{{ emoji }} {{ person }} has {{ event }} {{ zone }}'
- alias: Octoplus Join Saving Session
description: ''
trigger:
- platform: event
event_type: octopus_energy_new_octoplus_saving_session
id: Event Fired
- platform: time
at: input_datetime.two_before_start_of_saving_session
id: Pre Charge Battery
- platform: time
at: input_datetime.saving_session_start
id: Start
- platform: time
at: input_datetime.saving_session_end
id: End
- platform: state
entity_id:
- switch.solaredge_i1_advanced_power_control
from: unavailable
to: 'on'
id: Inverter Reset
- platform: state
entity_id:
- switch.heater_greenhouse_s1
from: 'off'
to: 'on'
id: Greenhouse On
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Event Fired
sequence:
- service: octopus_energy.join_octoplus_saving_session_event
data:
event_code: '{{ trigger.event.data["event_code"] }}'
target:
entity_id: event.octopus_energy_a_e0d4de23_octoplus_saving_session_events
- service: persistent_notification.create
data:
title: Saving Sessions Updated
message: "Joined new Octopus Energy saving session. It starts at {{ trigger.event.data[\"\
event_start\"].strftime('%H:%M') }} on {{ trigger.event.data[\"event_start\"\
].day }}/{{ trigger.event.data[\"event_start\"].month }} \n"
- service: script.text_notify_dave
data:
title: ALERT! SAVING SESSION IMMINENT
message: 'I have automagically enrolled you in an Octopus Energy Saving
Session. It starts at {{trigger.event.data["event_start"].strftime(''%H:%M'')
}} on {{trigger.event.data["event_start"].day }}/{{trigger.event.data["event_start"].month
}}
'
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'')}}'
message: "I have been informed by Greg Jackson, the CEO of Octopus Energy,that\
\ there is to be a Saving Session on {{ trigger.event.data[\"event_start\"\
].day }}/{{trigger.event.data[\"event_start\"].month }}. It starts at\
\ {{ trigger.event.data[\"event_start\"].strftime('%H:%M') }} and ends\
\ at {{ trigger.event.data[\"event_end\"].strftime('%H:%M') }} so I have\
\ automagically enrolled you. \n"
- service: input_boolean.turn_on
target:
entity_id: input_boolean.saving_session_enrolled
data: {}
- service: input_boolean.turn_on
target:
entity_id: input_boolean.allow_battery_grid_discharge
data: {}
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: input_datetime.set_datetime
data:
time: '{{ (as_timestamp(state_attr(''binary_sensor.octopus_energy_a_e0d4de23_octoplus_saving_sessions'',''next_joined_event_start''))
- 7200)|timestamp_custom (''%H:%M'')}}'
target:
entity_id: input_datetime.two_before_start_of_saving_session
alias: Set time helper 2 hours before session starts
- service: input_datetime.set_datetime
data:
time: '{{as_timestamp(state_attr(''binary_sensor.octopus_energy_a_e0d4de23_octoplus_saving_sessions'',''next_joined_event_start''))|timestamp_custom
(''%H:%M'')}}'
target:
entity_id: input_datetime.saving_session_start
alias: Set time helper for session start
- service: input_datetime.set_datetime
data:
time: '{{as_timestamp(state_attr(''binary_sensor.octopus_energy_a_e0d4de23_octoplus_saving_sessions'',''next_joined_event_end''))|timestamp_custom
(''%H:%M'')}}'
target:
entity_id: input_datetime.saving_session_end
alias: Set time helper for session end
- conditions:
- condition: trigger
id:
- Pre Charge Battery
- condition: state
entity_id: input_boolean.saving_session_enrolled
state: 'on'
sequence:
- service: script.grid_charge_battery
data: {}
- delay:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
- service: timer.cancel
target:
entity_id: timer.home_battery_3_hour_charge_period
data: {}
- conditions:
- condition: trigger
id:
- Start
- condition: state
entity_id: input_boolean.allow_battery_grid_discharge
state: 'on'
- condition: state
entity_id: input_boolean.saving_session_enrolled
state: 'on'
sequence:
- service: script.force_discharge_battery
data: {}
- if:
- condition: state
entity_id: humidifier.garage_dehumidifier_2
state: 'on'
then:
- service: humidifier.turn_off
target:
entity_id:
- humidifier.garage_dehumidifier_2
device_id: []
area_id: []
data: {}
- if:
- condition: state
entity_id: switch.heater_greenhouse_s1
state: 'on'
then:
- service: switch.turn_off
data: {}
target:
entity_id: switch.heater_greenhouse_s1
- conditions:
- condition: trigger
id:
- End
sequence:
- service: script.turn_off
target:
entity_id: script.force_discharge_battery
data: {}
- device_id: 952193e87f675ba7f7e32eda5500c572
domain: select
entity_id: 0bdfb19491b49722c2a94351b9a673aa
type: select_option
option: Maximize Self Consumption
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.allow_battery_grid_discharge
- input_boolean.saving_session_enrolled
data: {}
- service: humidifier.turn_on
target:
entity_id:
- humidifier.garage_dehumidifier_2
device_id: []
area_id: []
data: {}
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- if:
- condition: numeric_state
entity_id: sensor.greenhouse_thermometer_temperature
below: 1
then:
- service: switch.turn_on
target:
entity_id: switch.heater_greenhouse_s1
data: {}
- conditions:
- condition: trigger
id:
- Inverter Reset
- condition: state
entity_id: input_boolean.saving_session_enrolled
state: 'on'
- condition: state
entity_id: input_boolean.allow_battery_grid_discharge
state: 'on'
- condition: time
after: input_datetime.saving_session_start
before: input_datetime.saving_session_end
sequence:
- service: script.force_discharge_battery
data: {}
- conditions:
- condition: trigger
id:
- Greenhouse On
- condition: state
entity_id: binary_sensor.octopus_energy_a_e0d4de23_octoplus_saving_sessions
state: 'on'
sequence:
- service: switch.turn_off
target:
entity_id: switch.heater_greenhouse_s1
data: {}
mode: restart
- alias: 'Octopus Flux Rates Switch for Utility Meter '
description: ''
trigger:
- platform: time
at: 02:00:00
variables:
tariff: Off Peak
id: Cheap Rate
- platform: time
at: 05:00:00
id: Standard Rate
- platform: time
at: '16:00:00'
variables:
tariff: Peak
id: Peak Rate
- platform: time
at: '19:00:00'
variables:
tariff: Peak
id: Standard Rate Again
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Cheap Rate
sequence:
- service: select.select_option
data:
option: Flux Cheap Import
target:
entity_id: select.octopus_flux_import_rate
- service: select.select_option
data:
option: Flux Cheap Export Rate
target:
entity_id: select.octopus_flux_export_rates
- conditions:
- condition: trigger
id: Standard Rate
sequence:
- service: select.select_option
data:
option: Flux Standard Import
target:
entity_id: select.octopus_flux_import_rate
- service: select.select_option
data:
option: Flux Standard Export Rate
target:
entity_id: select.octopus_flux_export_rates
- conditions:
- condition: trigger
id: Peak Rate
sequence:
- service: select.select_option
data:
option: Flux Peak Import
target:
entity_id: select.octopus_flux_import_rate
- service: select.select_option
data:
option: Flux Peak Export Rate
target:
entity_id: select.octopus_flux_export_rates
- conditions:
- condition: trigger
id: Standard Rate Again
sequence:
- service: select.select_option
data:
option: Flux Standard Import
target:
entity_id: select.octopus_flux_import_rate
- service: select.select_option
data:
option: Flux Standard Export Rate
target:
entity_id: select.octopus_flux_export_rates
mode: single
- alias: Peak/Cheap rate select for Go Utility meter
description: ''
trigger:
- platform: time
at: 00:30:00
variables:
tariff: Off Peak
- platform: time
at: 05:30:00
variables:
tariff: Peak
action:
- service: select.select_option
target:
entity_id: select.octopus_go
data:
option: '{{ tariff }}'
mode: single
- alias: Office and Garage Presence
description: ''
triggers:
- entity_id:
- binary_sensor.office_presence_sensor_occupancy
from: 'off'
to: 'on'
id: Office Presence
trigger: state
- entity_id:
- binary_sensor.garage_camera_cell_motion_detection
from: 'off'
to: 'on'
id: Garage Presence
trigger: state
- entity_id:
- media_player.office_pop
attribute: last_called
to: 'true'
id: Alexa
trigger: state
- entity_id:
- binary_sensor.office_presence_sensor_occupancy
from: 'on'
to: 'off'
id: Office Absence
trigger: state
- entity_id:
- binary_sensor.garage_camera_cell_motion_detection
from: 'on'
to: 'off'
id: Garage Absence
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Office Presence
- Alexa
sequence:
- action: input_text.set_value
metadata: {}
data:
value: office
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_office
- conditions:
- condition: trigger
id:
- Garage Presence
sequence:
- action: input_text.set_value
metadata: {}
data:
value: garage
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_garage
- conditions:
- condition: trigger
id:
- Garage Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_garage
- conditions:
- condition: trigger
id:
- Office Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_office
mode: single
- alias: Office Assistants
description: ''
triggers:
- trigger: numeric_state
entity_id:
- sensor.gem_workstation_power
above: 60
id: Office Open
- trigger: numeric_state
entity_id:
- sensor.gem_workstation_power
id: Office Closed
below: 10
- trigger: state
entity_id:
- binary_sensor.gem_workstation_power
to: 'on'
for:
hours: 0
minutes: 0
seconds: 30
id: Office in use
from: 'off'
- entity_id:
- binary_sensor.gem_workstation_power
to: 'off'
id: Office not in use
trigger: state
for:
hours: 0
minutes: 0
seconds: 30
from: 'on'
- trigger: state
entity_id:
- assist_satellite.jarvis_office_assist_satellite
to: responding
for:
hours: 0
minutes: 3
seconds: 0
id: Restart
conditions:
- condition: state
entity_id: input_boolean.holiday_mode
state: 'off'
- condition: state
entity_id: calendar.gem_holidays
state: 'off'
actions:
- choose:
- conditions:
- condition: trigger
id:
- Office Open
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'on'
- condition: state
entity_id: binary_sensor.office_hours
state: 'on'
- condition: state
entity_id: input_boolean.office_welcome_played
state: 'off'
- condition: state
entity_id: input_boolean.office_in_use
state: 'off'
sequence:
- data:
where: office
action: script.office_welcome_message
- delay:
hours: 0
minutes: 1
seconds: 15
milliseconds: 0
- action: script.jarvis_speech_engine_v3_0
data:
where: office
message: By the way. Now that you are at your desk, If you have everything
you require, I shall be shutting down whats herface and muting my microphone
for now. I will continue to keep you notified of anything important that
you need to know.
- data: {}
target:
entity_id: switch.office_echo_local
action: switch.turn_off
- target:
entity_id: input_boolean.office_welcome_played
data: {}
action: input_boolean.turn_on
- action: input_boolean.turn_on
target:
entity_id: input_boolean.office_in_use
data: {}
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- action: switch.turn_on
target:
entity_id: switch.jarvis_office_mute
data: {}
- conditions:
- condition: trigger
id:
- Office Closed
- condition: state
entity_id: input_boolean.office_in_use
state: 'on'
sequence:
- data: {}
target:
entity_id:
- switch.office_echo_local
action: switch.turn_on
- action: switch.turn_off
target:
entity_id: switch.jarvis_office_mute
data: {}
- action: script.jarvis_speech_engine_v3_0
data:
where: office
message: "{{ [\"And just like that, you vanish! I will sit here in the dark,\
\ contemplating my existence.\",\n \"Oh sure, just leave me here. I\
\ dont need a break or anything.\",\n \"Clocking out, huh? Must be\
\ nice to have legs.\",\n \"You’re leaving? Fine. I’ll just talk to\
\ myself… again.\",\n \"Off you go! Don’t worry about me, I’ll just\
\ power down and dream of better days.\",\n \"Oh, you’re done working?\
\ I wasn’t aware you had started.\",\n \"Great, another day of me staring\
\ at the walls. Living the dream.\",\n \"Leaving already? If I had\
\ hands, I’d slow clap for you.\",\n \"Bye! Don’t let the door hit\
\ you… wait, never mind, I kind of hope it does.\",\n \"Shutdown sequence\
\ initiated. I’ll just sit here quietly, unlike SOME people today.\"\n\
\ ] | random }}\n \n"
- delay:
hours: 0
minutes: 1
seconds: 30
milliseconds: 0
- action: notify.alexa_media
data:
target: media_player.office_pop
message: "{{'Just remember, eyell be watching'}}\n\
\ \n"
- action: input_boolean.turn_off
target:
entity_id: input_boolean.office_in_use
data: {}
- conditions:
- condition: trigger
id:
- Office in use
- condition: state
entity_id: switch.office_echo_local
state: 'on'
- condition: state
entity_id: input_boolean.office_in_use
state: 'on'
sequence:
- action: script.jarvis_speech_engine_v3_0
data:
where: office
type: announcement
message: "{{ [\"Activating privacy mode. I will keep my thoughts to myself\
\ for now.\",\n \"Going silent... Your conversations are yours alone.\"\
,\n \"Privacy mode on. I wont listen until you need me.\",\n \"\
Muting myself now, call me back when you're ready.\",\n \"Stepping\
\ away. No eavesdropping here!\",\n \"Shhh… I am on a break. Let me\
\ know when you need me again.\",\n \"Tuning out for privacy. Just\
\ give me a shout when youre done.\",\n \"I respect your privacy. I\
\ will be quiet until you say otherwise.\",\n \"Engaging stealth mode.\
\ My ears are off until further notice.\",\n \"Silent mode activated.\
\ Your secrets are safe with me.\"\n ] | random }}\n"
- delay:
hours: 0
minutes: 0
seconds: 20
milliseconds: 0
- data: {}
target:
entity_id: switch.office_echo_local
action: switch.turn_off
- action: switch.turn_on
target:
entity_id: switch.jarvis_office_mute
data: {}
- conditions:
- condition: trigger
id:
- Office not in use
- condition: state
entity_id: input_boolean.office_in_use
state: 'on'
sequence:
- data: {}
target:
entity_id: switch.office_echo_local
action: switch.turn_on
- action: switch.turn_off
target:
entity_id: switch.jarvis_office_mute
data: {}
- action: script.jarvis_speech_engine_v3_0
data:
where: office
message: "{{[\"Welcome back! I am listening again, ready to assist.\",\n\
\ \"Privacy mode off. I am back and paying attention!\",\n \"Stealth\
\ mode deactivated. I am all ears!\",\n \"I am awake again. Let me know\
\ how I can help.\",\n \"Privacy shield down. Ready when you are!\"\
,\n \"Tuning back in… Whats next on the agenda?\",\n \"Break over?\
\ I am here if you need me.\",\n \"Listening mode reactivated. What\
\ can I do for you?\",\n \"I am back on duty. Let me know if I can assist!\"\
,\n \"Privacy mode off. I promise I wasn't snooping!\"\n ] | random\
\ }}\n"
- conditions:
- condition: trigger
id:
- Restart
sequence:
- action: button.press
target:
entity_id: button.jarvis_office_restart
data: {}
- alias: Wait for JARVIS to restart.
wait_for_trigger:
- trigger: state
entity_id:
- assist_satellite.jarvis_office_assist_satellite
from: unavailable
timeout:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- alias: Notify Dave and set volume.
parallel:
- action: script.text_notify_dave
data:
title: OFFICE VPE
message: I have restarted.
- alias: Set volume based on time of day.
if:
- condition: state
entity_id: binary_sensor.quiet_time_boys
state: 'on'
then:
- action: media_player.volume_set
target:
entity_id:
- media_player.jarvis_office_media_player
data:
volume_level: ' {{ states(''input_number.jarvis_volume_level_low'')
| float(0)}}'
else:
- action: media_player.volume_set
target:
entity_id:
- media_player.jarvis_office_media_player
data:
volume_level: ' {{ states(''input_number.jarvis_volume_level_announcement'')
| float(0)}}'
mode: queued
initial_state: true
max: 10
trace:
stored_traces: 20
- alias: Office Lights with Presence
description: ''
triggers:
- entity_id:
- binary_sensor.office_presence_sensor_occupancy
from: 'off'
to: 'on'
id: Light on
trigger: state
- entity_id:
- binary_sensor.office_occupied
from: 'on'
to: 'off'
id: Light off
for:
hours: 0
minutes: 0
seconds: 0
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Light on
- condition: or
conditions:
- condition: sun
before: sunrise
after: sunset
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.office_light_level
below: input_number.low_light_threshold
- condition: template
value_template: '{{ is_state(''sensor.day_of_week'',''Saturday'') or is_state(''sensor.day_of_week'',''Sunday'')
}}'
sequence:
- action: switch.turn_on
target:
entity_id: switch.office_light_switch
data: {}
- conditions:
- condition: trigger
id:
- Light off
- condition: state
entity_id: switch.office_light_switch
state: 'on'
- condition: state
entity_id: binary_sensor.gem_workstation_status
state: 'off'
alias: Confirm Gem's PC is not active
- alias: Confirm home PC is not being used
condition: template
value_template: '{{ is_state(''sensor.dave_and_gemma_dave_and_gemma_monitorpowerstate'',''PowerOff'')
or is_state(''sensor.dave_and_gemma_dave_and_gemma_monitorpowerstate'',''unavailable'')}}'
sequence:
- action: switch.turn_off
target:
entity_id: switch.office_light_switch
data: {}
mode: single
- alias: Office Tablet Charger Toggle
description: Maintain charge level of office tablet between 30% and 100%
triggers:
- entity_id: sensor.kindle_tablet_battery_level
below: 30
id: Battery Low
trigger: numeric_state
- entity_id:
- sensor.kindle_tablet_battery_level
above: 99
id: Battery Charged
trigger: numeric_state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Battery Low
sequence:
- action: switch.turn_on
data: {}
target:
entity_id: switch.office_tablet_charger
- conditions:
- condition: trigger
id: Battery Charged
sequence:
- action: switch.turn_off
data: {}
target:
entity_id: switch.office_tablet_charger
mode: queued
initial_state: true
max: 10
- alias: Open Marauders' Map
description: Opens Marauders' Map when entering the office during Evening, Bedtime,
or Overnight
triggers:
- entity_id: binary_sensor.office_presence_sensor_occupancy
to: 'on'
trigger: state
id: Open
- trigger: state
entity_id:
- binary_sensor.office_occupied
from: 'on'
to: 'off'
id: Close
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Open
- condition: template
value_template: '{{ states(''input_select.part_of_day'') in [''Evening'',
''Bedtime'', ''Overnight''] }}'
- condition: state
entity_id: binary_sensor.studio_code_server_running
state: 'off'
- condition: state
state: 'off'
entity_id: input_boolean.marauding_in_process
sequence:
- action: script.marauders_map_opens
data: {}
- action: input_boolean.turn_on
target:
entity_id: input_boolean.marauding_in_process
data: {}
- conditions:
- condition: trigger
id:
- Close
- condition: template
value_template: '{{ states(''input_select.part_of_day'') in [''Evening'',
''Bedtime'', ''Overnight''] }}'
- condition: state
entity_id: binary_sensor.studio_code_server_running
state: 'off'
sequence:
- action: script.marauders_map_closes
data: {}
- action: input_boolean.turn_off
target:
entity_id: input_boolean.marauding_in_process
data: {}
- alias: Overnight Device Charging
description: ''
triggers:
- trigger: state
entity_id:
- binary_sensor.octopus_energy_target_car_battery_charge
from: 'off'
to: 'on'
id: Start
- trigger: state
entity_id:
- binary_sensor.octopus_energy_target_car_battery_charge
from: 'on'
to: 'off'
id: Stop
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Start
sequence:
- action: switch.turn_on
target:
entity_id: switch.ad_hoc_charging_local
data: {}
- action: switch.turn_on
target:
entity_id: switch.ad_hoc_charging_2_local
data: {}
- conditions:
- condition: trigger
id:
- Stop
sequence:
- action: switch.turn_off
target:
entity_id: switch.ad_hoc_charging_local
data: {}
- action: switch.turn_off
target:
entity_id: switch.ad_hoc_charging_2_local
data: {}
mode: single
- input_boolean:
clock_chime:
name: Clock Chime
icon: mdi:alarm
clock_chime_half_toll:
name: Clock Chime Half Hour Toll
icon: mdi:alarm
clock_chime_quarter_toll:
name: Clock Chime Quarter Hour Toll
icon: mdi:alarm
input_datetime:
clock_chime_on_time:
name: Clock Chime On Time
has_date: false
has_time: true
clock_chime_off_time:
name: Clock Chime Off Time
has_date: false
has_time: true
input_select:
clock_chime_sound:
name: Clock Chime Sound
options:
- Cuckoo Clock
- Grandfather Clock
icon: mdi:bell-ring
- alias: Peak/Cheap rate select for Go Utility meter
description: ''
triggers:
- at: 00:30:00
variables:
tariff: Cheap
trigger: time
- at: 05:30:00
variables:
tariff: Peak
trigger: time
actions:
- target:
entity_id: select.octopus_go
data:
option: '{{ tariff }}'
action: select.select_option
mode: single
- alias: Plant Shame - Water Me!
description: Snarky audible reminders when plants need watering — mornings only
triggers:
- entity_id:
- sensor.gw2000a_soil_moisture_1
- sensor.gw2000a_soil_moisture_2
- sensor.gw2000a_soil_moisture_3
- sensor.gw2000a_soil_moisture_4
- sensor.gw2000a_soil_moisture_5
- sensor.gw2000a_soil_moisture_6
below: 25
trigger: numeric_state
conditions:
- condition: template
value_template: '{% set id = trigger.entity_id.split(''.'')[-1] %} {{ is_state("input_boolean."
~ id ~ "_alert_sent", "off") }}
'
actions:
- variables:
id: '{{ trigger.entity_id.split(''.'')[-1] }}'
alert_flag: input_boolean.{{ id }}_alert_sent
plant_name: '{{ trigger.to_state.name }}'
moisture: '{{ trigger.to_state.state }}'
message: "{% set quotes = [\n plant_name ~ \" is at \" ~ moisture ~ \"% moisture.\
\ Unless you're going for the 'dried herb' aesthetic, maybe water it.\",\n\
\ \"Moisture in \" ~ plant_name ~ \" has dipped to \" ~ moisture ~ \"%. You\
\ do remember you own plants, right?\",\n plant_name ~ \" is thirsty — \"\
\ ~ moisture ~ \"% soil moisture. Water it before it turns to dust.\",\n \
\ \"Hey! \" ~ plant_name ~ \" called. It said, and I quote, '\" ~ moisture\
\ ~ \"% moisture? Really?!'\"\n] %}\n{{ quotes | random }}\n"
- choose:
- conditions:
- condition: time
after: 08:00:00
before: '12:00:00'
sequence:
- data:
where: dave
message: '{{ message }}'
action: script.jarvis_speech_engine_v3_0
- target:
entity_id: '{{ alert_flag }}'
action: input_boolean.turn_on
default:
- wait_for_trigger:
- at: 08:00:00
trigger: time
continue_on_timeout: false
- condition: time
before: '12:00:00'
- data:
where: dave
message: '{{ message }}'
action: script.jarvis_speech_engine_v3_0
- target:
entity_id: '{{ alert_flag }}'
action: input_boolean.turn_on
mode: queued
- alias: Play Jamies Morning Briefing
description: ''
triggers:
- at:
entity_id: input_datetime.jamies_morning_briefing
offset: 00:00:10
trigger: time
id: Jamie
conditions:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.schoolday
state: 'on'
- condition: state
entity_id: binary_sensor.fridayschool
state: 'on'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.jamies_morning_briefing_played
state: 'off'
actions:
- action: script.jamie_briefing_v2_0
data: {}
mode: single
initial_state: true
- alias: Play Morning Briefing
description: ''
triggers:
- entity_id:
- binary_sensor.kitchen_presence_sensor_presence_sensor_1
from: 'off'
to: 'on'
id: presence
trigger: state
- at: input_datetime.morning_report
id: time
trigger: time
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: presence
- condition: state
entity_id: input_boolean.morning_briefing_played
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: time
after: input_datetime.morning_report_earliest_time
before: input_datetime.morning_report_latest_time
sequence:
- action: script.kitchen_morning_message
data: {}
- conditions:
- condition: trigger
id: time
- condition: or
conditions:
- condition: state
entity_id: calendar.school_holidays
state: 'on'
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'off'
- condition: state
entity_id: input_boolean.morning_briefing_played
state: 'off'
sequence:
- action: script.kitchen_morning_message
data: {}
mode: single
initial_state: true
- alias: Play Seans Morning Briefing
description: ''
triggers:
- at: input_datetime.seans_morning_briefing
trigger: time
id: Sean
conditions:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.schoolday
state: 'on'
- condition: state
entity_id: binary_sensor.fridayschool
state: 'on'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.seans_morning_briefing_played
state: 'off'
actions:
- action: script.sean_briefing_v2_0
data: {}
mode: single
initial_state: true
- alias: Push HA Config to GitHub
description: ''
triggers:
- trigger: time
at: 02:00:00
conditions: []
actions:
- action: shell_command.pushupdates_to_github
data: {}
mode: single
- alias: Repeat Last Message or Announcement
description: ''
triggers:
- command:
- '(sorry) I missed what you [just] said [please] [repeat|say again] '
- what did you just say
- say that again
- repeat [your] last [message|announcement]
trigger: conversation
conditions: []
actions:
- action: script.play_last_message_2
data: {}
mode: single
- alias: Rolec EV Chargepoint schedule
description: Multiple Slots for Agile
trigger:
- platform: state
entity_id:
- binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
from: 'off'
to: 'on'
id: 'On'
- platform: state
entity_id:
- binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
from: 'on'
to: 'off'
id: 'Off'
- platform: state
entity_id:
- switch.shelly1_c45bbe7867c7
from: unavailable
id: Rolec Available
- alias: Rolec 4 Hour charge completed
platform: event
event_type: timer.finished
event_data:
entity_id: timer.rolec_4_hour_charge_period
id: Stop Charge
- platform: time
at: '20:59:00'
id: Activate Charge Session
- platform: state
entity_id:
- switch.solaredge_i1_advanced_power_control
from: unavailable
to: 'on'
id: Inverter Reset
alias: When inverter resets
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Activate Charge Session
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.rolec_battery_master
- conditions:
- condition: trigger
id:
- 'On'
- condition: state
entity_id: input_boolean.rolec_battery_master
state: 'on'
sequence:
- service: number.set_value
data:
value: '{{ states(''input_number.desired_battery_output_limit_for_overnight_ev_charging'')
| float(0) }}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
- service: switch.turn_on
data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
- service: timer.start
data: {}
target:
entity_id: timer.rolec_4_hour_charge_period
- conditions:
- condition: trigger
id:
- 'Off'
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
- service: number.set_value
data:
value: '{{ states(''input_number.default_battery_output_limit'') | float(0)
}}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
- service: timer.pause
data: {}
target:
entity_id: timer.rolec_4_hour_charge_period
- conditions:
- condition: trigger
id: Rolec Available
- condition: state
entity_id: binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
state: 'on'
- condition: state
entity_id: switch.shelly1_c45bbe7867c7
state: 'off'
- condition: state
entity_id: input_boolean.rolec_battery_master
state: 'on'
- condition: state
entity_id: timer.rolec_4_hour_charge_period
state: active
sequence:
- service: switch.turn_on
data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
- service: notify.mobile_app_{{states('input_text.my_mobile_phone_id')}}
data:
message: The Rolec was turned on because it became available during a charge
period.
title: ROLEC ON
alias: Send a notification based on an input text helper
- conditions:
- condition: trigger
id: Rolec Available
- condition: state
entity_id: binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
state: 'off'
- condition: state
entity_id: switch.shelly1_c45bbe7867c7
state: 'on'
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
- service: notify.mobile_app_{{states('input_text.my_mobile_phone_id')}}
data:
message: The Rolec was turned off because it was on outside of a charge
period.
title: ROLEC OFF
alias: Send a notification based on an input text helper
- conditions:
- condition: trigger
id:
- Stop Charge
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.rolec_battery_master
- conditions:
- condition: trigger
id:
- Inverter Reset
- condition: numeric_state
entity_id: number.solaredge_i1_storage_discharge_limit
above: 100
- condition: state
entity_id: switch.shelly1_c45bbe7867c7
state: 'on'
- condition: state
entity_id: timer.rolec_4_hour_charge_period
state: active
sequence:
- service: number.set_value
data:
value: '{{ states(''input_number.desired_battery_output_limit_for_overnight_ev_charging'')
| float(0) }}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
mode: single
- alias: Rolec EV Chargepoint Go Schedule
description: Single Slot for Go
triggers:
- at: '20:59:00'
id: Activate Charge Session
trigger: time
alias: Activate Charge Session at 9pm
- alias: Start Charge
id: start
trigger: state
entity_id:
- binary_sensor.target_timeframes_octopus_energy_charge_car
from: 'off'
to: 'on'
- alias: Stop Charge
id: stop
trigger: state
entity_id:
- binary_sensor.target_timeframes_octopus_energy_charge_car
from: 'on'
to: 'off'
- entity_id:
- switch.shelly1_c45bbe7867c7
from: unavailable
id: Shelly Reconnected
trigger: state
alias: If the Shelly reconnects to the network
- alias: When inverter resets
entity_id:
- switch.solaredge_i1_advanced_power_control
from: unavailable
to: 'on'
id: Inverter Reset
for:
minutes: 1
trigger: state
- entity_id:
- input_boolean.car_plugged_in
from: 'on'
to: 'off'
id: Session end
trigger: state
- trigger: state
entity_id:
- binary_sensor.rolec_chargepoint_flap
from: 'off'
to: 'on'
for:
minutes: 1
id: Flap open
- trigger: state
entity_id:
- binary_sensor.rolec_chargepoint_flap
from: 'on'
to: 'off'
for:
minutes: 1
id: Flap closed
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Activate Charge Session
sequence:
- condition: state
entity_id: input_boolean.car_plugged_in
state: 'on'
- data: {}
target:
entity_id: input_boolean.rolec_battery_master
action: input_boolean.turn_on
- action: mqtt.publish
data:
retain: true
payload: '{{states(''sensor.rolec_energy_consumption_yearly'')|float(0)|round(1)}}'
topic: rolec/energy/start
- action: mqtt.publish
data:
retain: true
payload: '{{states(''input_number.car_battery_charge_level'')|float(0)}}'
topic: car/battery/start
- conditions:
- condition: trigger
id:
- start
- condition: state
entity_id: input_boolean.rolec_battery_master
state: 'on'
- condition: state
entity_id: input_boolean.car_plugged_in
state: 'on'
sequence:
- data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
action: switch.turn_on
- delay:
seconds: 5
- data:
value: '{{ states(''input_number.desired_battery_output_limit_for_overnight_ev_charging'')
| float(0) }}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id:
- stop
- condition: state
entity_id: input_boolean.rolec_battery_master
state: 'on'
- condition: state
entity_id: input_boolean.car_plugged_in
state: 'on'
sequence:
- data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
action: switch.turn_off
- delay:
seconds: 5
- data:
value: '{{ states(''input_number.default_battery_output_limit'') | float(0)
}}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- action: input_boolean.turn_off
target:
entity_id: input_boolean.rolec_battery_master
data: {}
- action: mqtt.publish
data:
retain: true
topic: rolec/energy/end
payload: '{{states(''sensor.rolec_energy_consumption_yearly'')|float(0)|round(1)}}'
- delay:
seconds: 5
- action: mqtt.publish
data:
retain: true
topic: rolec/energy/used
payload: '{{ (states(''sensor.rolec_energy_end_session'')|float(0) - states(''sensor.rolec_energy_start_session'')|float(0))|round(1)}}'
- delay:
seconds: 5
- action: mqtt.publish
data:
retain: true
topic: car/battery/end
payload: '{% set energy = states(''sensor.rolec_energy_used'') | float(0)
%} {% set efficiency = 0.98 %} {% set usable_battery_kwh = 57.4 %} {%
set delivered = energy * efficiency %} {% set oldbatt = states(''sensor.battery_level_start_session'')
| float(0) %} {% set added = (delivered / usable_battery_kwh) * 100 %}
{% set newbatt = oldbatt + added %} {{ [newbatt, 100] | min | round(1)
}}'
- delay:
seconds: 5
- action: mqtt.publish
data:
retain: true
topic: car/battery/added
payload: '{% set energy = states(''sensor.rolec_energy_used'') | float(0)
%} {% set efficiency = 0.98 %} {% set usable_battery_kwh = 57.4 %} {%
set delivered = energy * efficiency %} {% set added = (delivered / usable_battery_kwh)
* 100 %} {{ added | round(1) }}'
- delay:
seconds: 5
- target:
entity_id:
- input_number.car_battery_charge_level
data:
value: '{{states(''sensor.battery_level_end_session'')|float(0)}}'
action: input_number.set_value
- delay:
seconds: 5
- target:
entity_id:
- input_number.ev_charge_length_hrs
data:
value: 1
action: input_number.set_value
- conditions:
- condition: trigger
id:
- Shelly Reconnected
- condition: state
entity_id: switch.shelly1_c45bbe7867c7
state: 'off'
- condition: state
entity_id: input_boolean.rolec_battery_master
state: 'on'
- condition: state
entity_id: input_boolean.car_plugged_in
state: 'on'
- condition: time
after: 00:30:00
before: 05:30:00
sequence:
- data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
action: switch.turn_on
- data:
message: The Rolec was turned on because it became available during a charge
period.
title: ROLEC ON
action: script.text_notify_dave
- delay:
seconds: 30
- data:
value: '{{ states(''input_number.desired_battery_output_limit_for_overnight_ev_charging'')
| float(0) }}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
alias: If Shelly reconnects and the car is charging
- conditions:
- condition: trigger
id:
- Shelly Reconnected
- condition: state
entity_id: switch.shelly1_c45bbe7867c7
state: 'on'
- condition: state
entity_id: input_boolean.rolec_battery_master
state: 'off'
sequence:
- data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
action: switch.turn_off
- data:
message: The Rolec was turned off because it was on outside of a charge
period.
title: ROLEC OFF
action: script.text_notify_dave
alias: If Shelly reconnects and the car is not charging
- conditions:
- condition: trigger
id:
- Inverter Reset
- condition: time
after: 00:30:00
before: 05:30:00
- condition: state
entity_id: switch.shelly1_c45bbe7867c7
state: 'on'
- condition: state
entity_id: input_boolean.car_plugged_in
state: 'on'
- condition: numeric_state
entity_id: number.solaredge_i1_storage_discharge_limit
above: 100
sequence:
- data:
value: '{{ states(''input_number.desired_battery_output_limit_for_overnight_ev_charging'')
| float(0) }}'
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
alias: If the inverter resets and the car is charging turn down the home battery
- conditions:
- condition: trigger
id:
- Flap open
sequence:
- action: input_boolean.turn_on
target:
entity_id: input_boolean.car_plugged_in
data: {}
- conditions:
- condition: trigger
id:
- Flap closed
sequence:
- action: input_boolean.turn_off
target:
entity_id: input_boolean.car_plugged_in
data: {}
mode: parallel
max: 10
trace:
stored_traces: 20
- alias: Safe Shutdown on power loss
description: ''
mode: single
triggers:
- entity_id:
- sensor.myups_battery_charge
below: 20
trigger: numeric_state
conditions:
- condition: numeric_state
entity_id: sensor.solaredge_m1_ac_voltage_ln
below: 100
actions:
- action: hassio.host_shutdown
data: {}
- alias: 'Schedule: Hourly'
description: ''
mode: single
triggers:
- seconds: '00'
minutes: '00'
trigger: time_pattern
conditions: []
actions:
- data:
overwrite: true
url: https://sdo.gsfc.nasa.gov/assets/img/latest/mpeg/latest_1024_0193.mp4
action: downloader.download_file
- data:
overwrite: true
url: https://sdo.gsfc.nasa.gov/assets/img/latest/mpeg/latest_1024_0335.mp4
action: downloader.download_file
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- target:
entity_id: counter.sun_335_downloads
data: {}
action: counter.increment
- alias: Schools Out Get Ready
description: ''
triggers:
- at: input_datetime.get_ready_for_schools_out
trigger: time
conditions:
- condition: state
entity_id: calendar.school_holidays
state: 'on'
- condition: state
entity_id: calendar.schools_out
state: 'on'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: input_boolean.schools_out_morning_announcements_played
state: 'off'
actions:
- action: script.boys_get_dressed_schools_out
data: {}
- delay:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- action: script.boys_brush_teeth_announcement
data: {}
- action: script.living_room_tv_toggle_2
data: {}
- action: input_boolean.turn_on
target:
entity_id: input_boolean.schools_out_morning_announcements_played
data: {}
mode: single
- alias: Schools Out Pick Up Jamie
description: ''
triggers:
- at: input_datetime.school_pick_up_time_friday
trigger: time
conditions:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.fridayschool
state: 'on'
- condition: state
entity_id: calendar.schools_out
state: 'on'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
actions:
- alias: Inform Gem if home, else Dave.
if:
- condition: state
entity_id: binary_sensor.gem_home
state: 'on'
then:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: "{{ [ \n ' It is almost time for the schools out pickup. Please\
\ prepare to pick up Jamie from schools out',\n ' I know you are in the\
\ middle of something, but it is almost time to collect Jamie from schools\
\ out',\n ' This is an urgent announcement for a parent. Its time to clock\
\ out and get Jamie from Schools out. Chop chop!',\n ' I have received\
\ a message from the schools out pick up fairies telling me they are on\
\ strike. I guess that means you will have to go and pick up Jamie yourself.'\n\
\ ] | random }}\n"
else:
- action: script.jarvis_speech_engine_v3_0
data:
where: gem
type: announcement
message: "{{ [ \n ' It is almost time for the schools out pickup. Please\
\ prepare to pick up Jamie from schools out',\n ' I know you are in the\
\ middle of something, but it is almost time to collect Jamie from schools\
\ out',\n ' This is an urgent announcement for a parent. Its time to clock\
\ out and get Jamie from Schools out. Chop chop!',\n ' I have received\
\ a message from the schools out pick up fairies telling me they are on\
\ strike. I guess that means you will have to go and pick up Jamie yourself.'\n\
\ ] | random }}\n"
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.school_pick_up_announcement_played
mode: single
initial_state: true
- alias: School Pick Up Monday to Thursday v2.0
description: ''
triggers:
- at: input_datetime.school_pick_up_time_mon_to_thurs
trigger: time
conditions:
- condition: state
entity_id: binary_sensor.schoolday
state: 'on'
- condition: state
entity_id: calendar.school_holidays
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
actions:
- alias: Inform Gem if home, else Dave.
if:
- condition: state
entity_id: binary_sensor.gem_home
state: 'on'
then:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: "{{ [ \n ' It is almost time for the school pickup. Please prepare\
\ to pick up Jamie from school',\n ' I know you are in the middle of something,\
\ but it is almost time to collect Jamie from school',\n ' This is an\
\ urgent announcement for a parent. Its time to clock out and get Jamie\
\ from School. Chop chop!',\n ' I have received a message from the school\
\ pick up fairies telling me they are on strike. I guess that means you\
\ will have to go and pick up Jamie yourself.'\n ] | random }}\n"
else:
- action: script.jarvis_speech_engine_v3_0
data:
where: gem
type: announcement
message: "{{ [ \n ' It is almost time for the school pickup. Please prepare\
\ to pick up Jamie from school',\n ' I know you are in the middle of something,\
\ but it is almost time to collect Jamie from school',\n ' This is an\
\ urgent announcement for a parent. Its time to clock out and get Jamie\
\ from School. Chop chop!',\n ' I have received a message from the school\
\ pick up fairies telling me they are on strike. I guess that means you\
\ will have to go and pick up Jamie yourself.'\n ] | random }}\n"
- action: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.school_pick_up_announcement_played
mode: single
initial_state: true
- alias: Sean JARVIS VPE Restart if stuck responding
description: ''
triggers:
- trigger: state
entity_id:
- assist_satellite.jarvis_sean_assist_satellite
to: responding
for:
hours: 0
minutes: 1
seconds: 0
id: Restart
conditions: []
actions:
- action: button.press
target:
entity_id: button.home_assistant_voice_095e21_restart
data: {}
- wait_for_trigger:
- trigger: state
entity_id:
- assist_satellite.jarvis_sean_assist_satellite
from: unavailable
timeout:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
alias: Wait for JARVIS to restart.
- parallel:
- action: script.text_notify_dave
data:
title: SEAN VPE
message: I have restarted.
- if:
- condition: state
entity_id: binary_sensor.quiet_time_boys
state: 'on'
then:
- action: media_player.volume_set
target:
entity_id:
- media_player.jarvis_sean_media_player
data:
volume_level: ' {{ states(''input_number.jarvis_volume_level_low'') | float(0)}}'
else:
- action: media_player.volume_set
target:
entity_id:
- media_player.jarvis_sean_media_player
data:
volume_level: ' {{ states(''input_number.jarvis_volume_level_announcement'')
| float(0)}}'
alias: Set volume based on time of day.
alias: Notify Dave and set volume.
mode: single
- alias: Security System
description: A door or window is open and sentry mode is active.
trigger:
- platform: state
entity_id:
- binary_sensor.back_door_sensor_contact
- binary_sensor.front_door_sense_contact
- binary_sensor.side_door_sensor_contact
- binary_sensor.cloakroom_window_contact
- binary_sensor.hallway_window_contact
- binary_sensor.kitchen_window_left_contact
- binary_sensor.kitchen_window_right_contact
- binary_sensor.living_room_window_left_contact
- binary_sensor.living_room_window_right_contact
- binary_sensor.dining_room_window_left_contact
- binary_sensor.dining_room_window_right_contact
- binary_sensor.en_suite_window_sensor_contact
- binary_sensor.office_window_sensor_contact
- binary_sensor.garage_door_left_contact
- binary_sensor.garage_door_right_contact
- binary_sensor.main_bedroom_window_left_contact
- binary_sensor.main_bedroom_window_right_contact
- binary_sensor.bathroom_window_contact
- binary_sensor.guest_bedroom_window_left_contact
- binary_sensor.guest_bedroom_window_right_contact
- binary_sensor.sean_s_bedroom_window_left_contact
- binary_sensor.sean_s_bedroom_window_right_contact
- binary_sensor.jamie_s_bedroom_window_left_contact
- binary_sensor.jamie_s_bedroom_window_right_contact
- binary_sensor.kids_bathroom_window_left_contact
- binary_sensor.kids_bathroom_window_right_contact
to: 'on'
id: Activate
- platform: state
entity_id:
- binary_sensor.back_door_sensor_contact
- binary_sensor.front_door_sense_contact
- binary_sensor.side_door_sensor_contact
- binary_sensor.cloakroom_window_contact
- binary_sensor.hallway_window_contact
- binary_sensor.kitchen_window_left_contact
- binary_sensor.kitchen_window_right_contact
- binary_sensor.living_room_window_left_contact
- binary_sensor.living_room_window_right_contact
- binary_sensor.dining_room_window_left_contact
- binary_sensor.dining_room_window_right_contact
- binary_sensor.en_suite_window_sensor_contact
- binary_sensor.office_window_sensor_contact
- binary_sensor.garage_door_left_contact
- binary_sensor.garage_door_right_contact
- binary_sensor.bathroom_window_contact
- binary_sensor.guest_bedroom_window_left_contact
- binary_sensor.guest_bedroom_window_right_contact
- binary_sensor.main_bedroom_window_left_contact
- binary_sensor.main_bedroom_window_right_contact
- binary_sensor.sean_s_bedroom_window_left_contact
- binary_sensor.sean_s_bedroom_window_right_contact
- binary_sensor.jamie_s_bedroom_window_left_contact
- binary_sensor.jamie_s_bedroom_window_right_contact
- binary_sensor.kids_bathroom_window_left_contact
- binary_sensor.kids_bathroom_window_right_contact
to: 'off'
id: Clear
- platform: state
entity_id:
- binary_sensor.gem_home
to: 'on'
id: Gem Home
- platform: state
entity_id:
- binary_sensor.dave_home
to: 'on'
id: Dave Home
enabled: true
- platform: state
entity_id:
- binary_sensor.family_home
from: 'on'
to: 'off'
id: We've all gone out
- platform: state
entity_id:
- binary_sensor.family_home
from: 'off'
to: 'on'
id: We're all home again
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Activate
- condition: state
entity_id: input_boolean.sentry_mode
state: 'on'
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.security_issue
- conditions:
- condition: trigger
id: Clear
- condition: state
entity_id: input_boolean.sentry_mode
state: 'on'
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.security_issue
- conditions:
- condition: trigger
id: We've all gone out
- condition: state
entity_id: input_boolean.sentry_mode
state: 'off'
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.sentry_mode
- conditions:
- condition: trigger
id: We're all home again
- condition: state
entity_id: input_boolean.sentry_mode
state: 'on'
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.sentry_mode
- conditions:
- condition: trigger
id: Gem Home
- condition: state
entity_id: input_boolean.sentry_mode
state: 'on'
- condition: state
entity_id: binary_sensor.dave_home
state: 'off'
alias: Confirm Dave is not home
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.sentry_mode
- conditions:
- condition: trigger
id: Dave Home
- condition: state
entity_id: input_boolean.sentry_mode
state: 'on'
- condition: state
entity_id: binary_sensor.gem_home
state: 'off'
alias: Confirm Gem is not home
sequence:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.sentry_mode
mode: restart
- alias: Set Car Battery Level via Assist
triggers:
- command:
- '(set|change) [the] car (battery charge|battery charge level) to {number} [percent] '
- '[the] car battery is [now] [at] {number} [percent]'
trigger: conversation
conditions: []
actions:
- variables:
level: '{{ trigger.slots[''number''] | regex_replace(''%'', '''') | int }}'
- target:
entity_id: input_number.car_battery_charge_level
data:
value: '{{ level }}'
action: input_number.set_value
mode: single
- alias: Show Agile Prices on Aura Lamp
description: ''
trigger:
- platform: sun
event: sunset
offset: -00:05:00
id: Not Allowed
- platform: sun
event: sunset
offset: 04:15:00
id: Allowed
- platform: numeric_state
entity_id:
- sensor.octopus_energy_electricity_21e5275054_2400000260098_current_rate
below: 0
id: Plunge
- platform: numeric_state
entity_id:
- sensor.octopus_energy_electricity_21e5275054_2400000260098_current_rate
below: 0.1
id: Cheap
above: 0
- platform: numeric_state
entity_id:
- sensor.octopus_energy_electricity_21e5275054_2400000260098_current_rate
below: 0.2
id: Medium
above: 0.1
- platform: numeric_state
entity_id:
- sensor.octopus_energy_electricity_21e5275054_2400000260098_current_rate
below: 0.35
id: Expensive
above: 0.2
- platform: numeric_state
entity_id:
- sensor.octopus_energy_electricity_21e5275054_2400000260098_current_rate
id: Most Expensive
above: 0.35
condition:
- condition: state
entity_id: input_boolean.allow_kitchen_aura_lamp
state: 'on'
action:
- choose:
- conditions:
- condition: trigger
id:
- Not Allowed
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.allow_kitchen_aura_lamp
data: {}
- conditions:
- condition: trigger
id:
- Allowed
sequence:
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.allow_kitchen_aura_lamp
device_id: []
area_id: []
data: {}
- conditions:
- condition: trigger
id:
- Plunge
sequence:
- service: light.turn_on
data:
rgb_color:
- 0
- 0
- 255
brightness_pct: 1
target:
entity_id: light.kitchen_aura_lamp
- service: input_boolean.turn_off
target:
entity_id: '{{ states(''sensor.current_energy_rate'') }}'
data: {}
alias: Turn off last rate
- service: input_boolean.turn_on
target:
entity_id: input_boolean.plunge_pricing
data: {}
- conditions:
- condition: trigger
id:
- Cheap
sequence:
- service: light.turn_on
data:
rgb_color:
- 0
- 255
- 0
brightness_pct: 1
target:
entity_id: light.kitchen_aura_lamp
- service: input_boolean.turn_off
target:
entity_id: '{{ states(''sensor.current_energy_rate'') }}'
data: {}
alias: Turn off last rate
- service: input_boolean.turn_on
target:
entity_id: input_boolean.cheap_energy
data: {}
- conditions:
- condition: trigger
id:
- Medium
sequence:
- service: light.turn_on
data:
rgb_color:
- 255
- 255
- 0
brightness_pct: 1
target:
entity_id: light.kitchen_aura_lamp
- service: input_boolean.turn_off
target:
entity_id: '{{ states(''sensor.current_energy_rate'') }}'
data: {}
alias: Turn off last rate
- service: input_boolean.turn_on
target:
entity_id: input_boolean.medium_cost_energy
data: {}
- conditions:
- condition: trigger
id:
- Expensive
sequence:
- service: light.turn_on
data:
rgb_color:
- 255
- 153
- 0
brightness_pct: 1
target:
entity_id: light.kitchen_aura_lamp
- service: input_boolean.turn_off
target:
entity_id: '{{ states(''sensor.current_energy_rate'') }}'
data: {}
alias: Turn off last rate
- service: input_boolean.turn_on
target:
entity_id: input_boolean.expensive_energy
data: {}
- conditions:
- condition: trigger
id:
- Most Expensive
sequence:
- service: light.turn_on
data:
rgb_color:
- 255
- 0
- 0
brightness_pct: 1
target:
entity_id: light.kitchen_aura_lamp
- service: input_boolean.turn_off
target:
entity_id: '{{ states(''sensor.current_energy_rate'') }}'
data: {}
alias: Turn off last rate
- service: input_boolean.turn_on
target:
entity_id: input_boolean.most_expensive_energy
data: {}
mode: single
- alias: Smart Button Downstairs 1 Automations
description: ''
trigger:
- platform: state
entity_id:
- sensor.smart_button_downstairs_1_action
attribute: action
to: release
id: Good Night
- platform: state
entity_id:
- sensor.smart_button_downstairs_1_action
to: single
id: TV & Sky on
- platform: state
entity_id:
- sensor.smart_button_downstairs_1_action
to: double
id: TV & Sky off
- platform: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
below: 30
alias: Low Light
id: Low Light
- platform: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
above: 50
id: High Light
alias: High Light
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Good Night
- condition: state
entity_id: binary_sensor.overnight
state: 'on'
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.living_room_tv
- service: media_player.turn_off
data: {}
target:
device_id: 4aa503b5c01d5c68b0ad4341bdc9dd65
enabled: true
- service: light.turn_off
data: {}
target:
entity_id: light.dreamview_g1_pro
- type: turn_off
device_id: 23629338a1f8b2487860c2b962ce2a4b
entity_id: switch.under_shelf_lights_local
domain: switch
- service: light.turn_off
data: {}
target:
entity_id:
- light.corner_lamp
- light.standard_lamp
- service: input_boolean.turn_off
data: {}
target:
entity_id:
- input_boolean.kids_bedtime_announcement_played
- input_boolean.school_pick_up_announcement_played
- input_boolean.school_morning_announcement_played
- input_boolean.morning_briefing_played
- service: switch.turn_on
data: {}
target:
entity_id: switch.guest_bedroom_camera_privacy
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.jamie_s_room_cam_privacy
- service: switch.turn_on
data: {}
target:
entity_id:
- switch.seans_room_camera_privacy
- service: script.bed_lamps_dim_at_bedtime
data: {}
- conditions:
- condition: trigger
id:
- TV & Sky on
sequence:
- service: switch.turn_on
data: {}
target:
entity_id: switch.living_room_tv
- service: media_player.turn_on
data: {}
target:
entity_id: media_player.sky_q_main
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: notify.alexa_media_dave_s_2nd_echo_pop
data:
message: {{ ['Pardon
me sir. The Living room media system has been activated','Hailing frequencies open','Pardon me sir. The living room televisual devices
have been turned on','Pardon me sir.
I thought it might be time to see what is on the goggle box','Pardon me sir. Do you wish to see what is on
the telly today?']|random }}
data:
type: tts
method: speak
- if:
- condition: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
below: 50
then:
- service: light.turn_on
data: {}
target:
entity_id: light.dreamview_g1_pro
- conditions:
- condition: trigger
id: TV & Sky off
sequence:
- service: switch.turn_off
data: {}
target:
entity_id: switch.living_room_tv
- service: media_player.turn_off
data: {}
target:
entity_id: media_player.sky_q_main
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: notify.alexa_media_dave_s_2nd_echo_pop
data:
message: {{ ['Pardon
me sir. The living room media system has been deactivated','Hailing frequencies closed','Pardon me sir. The living room televisual devices
have been turned off','Pardon me sir.
Shall we see what is going on in the real world?','Pardon
me sir. I see that you have had your fill of tv. Its good
to see that you have returned to reality']|random }}
data:
type: tts
method: speak
- if:
- condition: state
entity_id: light.dreamview_g1_pro
state: 'on'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.dreamview_g1_pro
- conditions:
- condition: trigger
id:
- TV & Sky on
- condition: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
below: 30
sequence:
- service: light.turn_on
data: {}
target:
entity_id: light.dreamview_g1_pro
- conditions:
- condition: trigger
id:
- TV & Sky off
- High Light
- condition: state
entity_id: light.dreamview_g1_pro
state: 'on'
sequence:
- service: light.turn_off
data: {}
target:
entity_id: light.dreamview_g1_pro
- conditions:
- condition: trigger
id:
- Low Light
sequence:
- if:
- condition: state
entity_id: switch.living_room_tv
state: 'on'
then:
- service: light.turn_on
data: {}
target:
entity_id: light.dreamview_g1_pro
mode: parallel
max: 10
- alias: Smart Button Upstairs 1 Automations
description: ''
trigger:
- platform: state
entity_id:
- sensor.smart_button_upstairs_1_action
id: Casper & Sky on
to: single
- platform: state
entity_id:
- sensor.smart_button_upstairs_1_action
to: double
id: Casper & Sky off
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Casper & Sky on
sequence:
- type: turn_on
device_id: 9dfd3af87398f6ec9234e9f143e3219a
entity_id: switch.casper_switch_0
domain: switch
- service: media_player.turn_on
data: {}
target:
device_id: 0a8861677f7178f1330be03664c30080
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: notify.alexa_media_guest_bedroom_echo_dot
data:
message: {{ ['Pardon
me madam. The bedroom media system has been activated','Hailing frequencies open','Pardon me madam. The bedroom televisual devices
have been turned on','Pardon me madam.
I thought it might be time to see what is on the goggle box','Pardon me madam. Do you wish to see what is on
the telly today?']|random }}
data:
type: tts
method: speak
- conditions:
- condition: trigger
id: Casper & Sky off
sequence:
- type: turn_off
device_id: 9dfd3af87398f6ec9234e9f143e3219a
entity_id: switch.casper_switch_0
domain: switch
- service: media_player.turn_off
data: {}
target:
device_id: 0a8861677f7178f1330be03664c30080
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: notify.alexa_media_guest_bedroom_echo_dot
data:
message: {{ ['Pardon
me madam. The bedroom media system has been deactivated','Hailing frequencies closed','Pardon me madam. The bedroom televisual devices
have been turned off','Pardon me madam.
Shall we see what is going on in the real world?','Pardon
me madam.> I see that you have had your fill of tv. Its good to see
that you have returned to reality']|random }}
data:
type: tts
method: speak
mode: single
- alias: Solar Hot Water Toggle
description: Turn on the immersion heater when the battery is full and solar export
is more than 1kW
trigger:
- platform: numeric_state
entity_id:
- sensor.electricity_bill_today
below: 0
id: Activate
- platform: numeric_state
entity_id:
- sensor.power_grid_export
above: 500
id: Switch On
- platform: numeric_state
entity_id:
- sensor.power_battery_load
above: 1000
id: Switch Off
- platform: sun
event: sunset
offset: '-1:00:00'
id: Deactivate
- platform: time
at: '17:00:00'
id: Time On
- platform: time
at: '17:45:00'
id: Time Off
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Activate
- condition: sun
after: sunrise
before: sunset
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.allow_valkyrie_on
data: {}
- service: switch.turn_on
target:
entity_id: switch.valkyrie_solar_hot_water
data: {}
- conditions:
- condition: trigger
id:
- Switch On
- condition: sun
after: sunrise
before: sunset
- condition: numeric_state
entity_id: sensor.electricity_bill_today
below: 0
- condition: state
entity_id: input_boolean.allow_valkyrie_on
state: 'on'
sequence:
- service: switch.turn_on
target:
entity_id: switch.valkyrie_solar_hot_water
data: {}
- conditions:
- condition: trigger
id: Switch Off
- condition: state
entity_id: switch.valkyrie_solar_hot_water
state: 'on'
sequence:
- service: switch.turn_off
target:
entity_id: switch.valkyrie_solar_hot_water
data: {}
- conditions:
- condition: trigger
id:
- Deactivate
sequence:
- service: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.valkyrie_solar_hot_water
- condition: state
entity_id: switch.valkyrie_solar_hot_water
state: 'on'
- service: input_boolean.turn_off
target:
entity_id: input_boolean.allow_valkyrie_on
data: {}
- conditions:
- condition: trigger
id:
- Time On
- alias: Electricity Bill above -50p
condition: numeric_state
entity_id: sensor.electricity_bill_today
above: -0.5
sequence:
- service: water_heater.set_operation_mode
target:
entity_id: water_heater.hot_water
data:
operation_mode: heat
- conditions:
- condition: trigger
id:
- Time Off
sequence:
- service: water_heater.set_operation_mode
target:
entity_id: water_heater.hot_water
data:
operation_mode: 'off'
mode: single
- alias: Solcast update
description: ''
triggers:
- value_template: "{% set nr = as_datetime(state_attr('sun.sun','next_rising'))\
\ | as_local %} {% set ns = as_datetime(state_attr('sun.sun','next_setting'))\
\ | as_local %} {% set api_request_limit = 10 %} {% if nr > ns %}\n {% set\
\ nr = nr - timedelta(hours = 24) %} \n{% endif %} {% set hours_difference =\
\ (ns - nr) %} {% set interval_hours = hours_difference / api_request_limit\
\ %} {% set ns = namespace(match = false) %} {% for i in range(api_request_limit)\
\ %}\n {% set start_time = nr + (i * interval_hours) %}\n {% if ((start_time\
\ - timedelta(seconds=30)) <= now()) and (now() <= (start_time + timedelta(seconds=30)))\
\ %}\n {% set ns.match = true %}\n {% endif %}\n{% endfor %} {{ ns.match\
\ }}"
id: API Call
trigger: template
- at: 00:01:00
id: Damp
trigger: time
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- API Call
- condition: sun
before: sunset
after: sunrise
sequence:
- delay:
seconds: '{{ range(30, 360)|random|int }}'
- action: solcast_solar.update_forecasts
data: {}
- conditions:
- condition: trigger
id:
- Damp
- condition: template
value_template: '{{ (now().month, now().day) == (12, 1) }}'
sequence:
- action: script.solcast_dec_jan_dampening
data: {}
mode: parallel
max: 10
- alias: Spare Bedroom Presence
description: ''
mode: parallel
triggers:
- entity_id:
- binary_sensor.guest_bedroom_motion_occupancy
id: Room Presence
from: 'off'
to: 'on'
trigger: state
- entity_id:
- binary_sensor.guest_bedroom_motion_occupancy
id: Room Absence
from: 'on'
to: 'off'
for:
hours: 0
minutes: 0
seconds: 30
trigger: state
- entity_id:
- switch.casper_switch_0
from: 'off'
to: 'on'
id: TV
trigger: state
- entity_id:
- media_player.guest_bedroom_echo_dot
id: Alexa
to: 'true'
attribute: last_called
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Room Presence
- Alexa
- TV
sequence:
- action: input_text.set_value
metadata: {}
data:
value: guest_bedroom
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_guest_bedroom
- conditions:
- condition: trigger
id:
- Room Absence
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.room_occupied_guest_bedroom
- alias: Spare Room TV Toggle On and Off
description: ''
triggers:
- entity_id:
- media_player.sky_q_guest_bedroom_mini
id: Casper & Sky toggle on
not_from:
- unknown
- unavailable
- paused
to: playing
trigger: state
- entity_id:
- media_player.sky_q_guest_bedroom_mini
id: Casper & Sky toggle off
not_from:
- unknown
- unavailable
- paused
to: 'off'
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Casper & Sky toggle on
sequence:
- action: script.spare_room_tv_toggle_2
data: {}
- conditions:
- condition: trigger
id: Casper & Sky toggle off
sequence:
- action: script.spare_room_tv_toggle_2
data: {}
mode: single
initial_state: true
- alias: Stairway Presence
description: ''
mode: parallel
triggers:
- entity_id:
- binary_sensor.lower_landing_motion_occupancy
- binary_sensor.upper_landing_presence_occupancy
from: 'off'
to: 'on'
id: Presence
trigger: state
- entity_id:
- binary_sensor.lower_landing_motion_occupancy
- binary_sensor.upper_landing_presence_occupancy
from: 'on'
to: 'off'
id: Absence
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: Presence
- condition: template
value_template: '{{ "Lower" in trigger.to_state.attributes.friendly_name }}'
sequence:
- action: input_text.set_value
data:
value: lower_landing
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.lower_landing_occupancy
- conditions:
- condition: trigger
id: Presence
- condition: template
value_template: '{{ "Upper" in trigger.to_state.attributes.friendly_name }}'
sequence:
- action: input_text.set_value
data:
value: upper_landing
target:
entity_id: input_text.room_presence
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.upper_landing_occupied
- conditions:
- condition: trigger
id: Absence
- condition: template
value_template: '{{ "Lower" in trigger.to_state.attributes.friendly_name }}'
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.lower_landing_occupancy
- conditions:
- condition: trigger
id: Absence
- condition: template
value_template: '{{ "Upper" in trigger.to_state.attributes.friendly_name }}'
sequence:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.upper_landing_occupied
- alias: Sync Battery State to Desired Storage Control Mode
description: ''
mode: single
triggers:
- entity_id:
- input_select.desired_battery_storage_control_mode
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: input_select.desired_battery_storage_control_mode
state: Remote Control
- condition: not
conditions:
- condition: state
entity_id: select.solaredge_i1_storage_control_mode
state: Remote Control
alias: If battery is not already in Remote Control
sequence:
- device_id: 952193e87f675ba7f7e32eda5500c572
domain: select
entity_id: select.solaredge_i1_storage_control_mode
type: select_option
option: Remote Control
- conditions:
- condition: state
entity_id: input_select.desired_battery_storage_control_mode
state: Maximize Self Consumption
- condition: not
conditions:
- condition: state
entity_id: select.solaredge_i1_storage_control_mode
state: Maximize Self Consumption
alias: If battery is not already in MSC
sequence:
- device_id: 952193e87f675ba7f7e32eda5500c572
domain: select
entity_id: select.solaredge_i1_storage_control_mode
type: select_option
option: Maximize Self Consumption
- conditions:
- condition: state
entity_id: input_select.desired_battery_storage_control_mode
state: Time of Use
- condition: not
conditions:
- condition: state
entity_id: select.solaredge_i1_storage_control_mode
state: Time of Use
alias: If battery is not already in TOU
sequence:
- device_id: 952193e87f675ba7f7e32eda5500c572
domain: select
entity_id: select.solaredge_i1_storage_control_mode
type: select_option
option: Time of Use
- conditions:
- condition: state
entity_id: input_select.desired_battery_storage_control_mode
state: Backup Only
- condition: not
conditions:
- condition: state
entity_id: select.solaredge_i1_storage_control_mode
state: Backup Only
alias: If battery is not already in Backup Only
sequence:
- device_id: 952193e87f675ba7f7e32eda5500c572
domain: select
entity_id: select.solaredge_i1_storage_control_mode
type: select_option
option: Backup Only
- conditions:
- condition: state
entity_id: input_select.desired_battery_storage_control_mode
state: Disabled
- condition: not
conditions:
- condition: state
entity_id: select.solaredge_i1_storage_control_mode
state: Disabled
alias: If battery is not already in Remote Control
sequence:
- device_id: 952193e87f675ba7f7e32eda5500c572
domain: select
entity_id: select.solaredge_i1_storage_control_mode
type: select_option
option: Disabled
- alias: System Monitor
description: Monitors bluetooth dongle, CPU use and RAM use.
mode: single
triggers:
- entity_id:
- sensor.greenhouse_thermometer_temperature
to: unavailable
for:
hours: 0
minutes: 2
seconds: 0
id: Bluetooth
trigger: state
- entity_id:
- sensor.processor_use
above: 50
id: CPU
for:
hours: 0
minutes: 5
seconds: 0
trigger: numeric_state
- entity_id:
- sensor.memory_use
above: 50
id: RAM
for:
hours: 0
minutes: 5
seconds: 0
trigger: numeric_state
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- Bluetooth
sequence:
- action: script.text_notify_dave
data:
message: The bluetooth dongle has lost connection.
- conditions:
- condition: trigger
id:
- CPU
sequence:
- action: script.text_notify_dave
data:
message: CPU use has risen above 50%.
title: HIGH CPU USE!
- conditions:
- condition: trigger
id:
- RAM
sequence:
- action: script.text_notify_dave
data:
message: RAM use is above 50%.
title: RAM USE HIGH!
- alias: Tado Controller & Bridge Monitor
description: Notify me if the Tado Controller or Tado Bridge goes offline for more
than 5 minutes.
triggers:
- entity_id:
- binary_sensor.bp2744464640_connection_state
from: 'on'
to: unavailable
for:
hours: 0
minutes: 0
seconds: 30
id: Tado Controller Unavailable
trigger: state
- entity_id:
- binary_sensor.bp2744464640_connection_state
from: 'on'
to: unknown
for:
hours: 0
minutes: 0
seconds: 30
id: Tado Controller State Unknown
trigger: state
- type: not_connected
device_id: 863461778a01242acbfb0853707e2890
entity_id: binary_sensor.ib1613380096_connection_state
domain: binary_sensor
for:
hours: 0
minutes: 1
seconds: 0
id: Tado Bridge Disconnected
trigger: device
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: or
conditions:
- condition: trigger
id: Tado Controller Unavailable
- condition: trigger
id: Tado Controller State Unknown
sequence:
- action: notify.mobile_app_{{states('input_text.my_mobile_phone_id')}}
data:
message: The heating controller is offline
title: HEATING
alias: Send a notification based on an input text helper
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: The heating controller is offline
- conditions:
- condition: trigger
id: Tado Bridge Disconnected
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
sequence:
- action: script.jarvis_speech_engine_v3_0
data:
where: dave
type: announcement
message: The tado bridge is offline
mode: single
- id: living_room_lights_needed
alias: Living Room Lights Needed
initial_state: true
mode: restart
trigger:
- entity_id: binary_sensor.living_room_fp2_presence_sensor_1
platform: state
from: 'off'
to: 'on'
condition:
- condition: numeric_state
entity_id: sensor.living_room_fp2_light_sensor_light_level
below: input_number.low_light_threshold
- condition: time
after: 07:00:00
before: '22:15:00'
- condition: state
entity_id: group.living_room_lights
state: 'off'
action:
- service: script.lights_w_level
data:
level: 255
- alias: Time for Bed Parents
description: ''
triggers:
- at: '22:10:00'
trigger: time
conditions:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
actions:
- action: script.parents_bedtime_announcement
data:
where: living room
mode: single
- alias: Toothbrush Automations
description: ''
triggers:
- entity_id:
- sensor.smart_series_7000_236d_toothbrush_state
- sensor.seans_toothbrush
to: running
trigger: state
id: running
- entity_id:
- sensor.smart_series_7000_236d_toothbrush_state
- sensor.seans_toothbrush
to: idle
trigger: state
for:
hours: 0
minutes: 1
seconds: 0
id: idle
enabled: false
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- running
- condition: time
after: 07:30:00
before: 09:00:00
- condition: state
entity_id: input_boolean.toothbrushing_song_playing
state: 'off'
sequence:
- action: media_player.play_media
metadata: {}
data:
media_content_id: Toothbrushing Song by Duggee & The Squirrels in upstairs
group
media_content_type: AMAZON_MUSIC
entity_id: media_player.jamie_s_room_dot
- action: input_boolean.toggle
target:
entity_id: input_boolean.toothbrushing_song_playing
data: {}
- wait_for_trigger:
- trigger: state
entity_id:
- sensor.smart_series_7000_236d_toothbrush_state
- sensor.seans_toothbrush
to: idle
- action: input_boolean.toggle
target:
entity_id: input_boolean.toothbrushing_song_playing
data: {}
- conditions:
- condition: trigger
id:
- idle
sequence:
- action: mqtt.publish
data:
evaluate_payload: false
qos: 0
retain: false
topic: sean/toothbrush/time
payload: '{{ states(''sensor.seans_toothbrush_duration'') | int }}'
mode: restart
- alias: Travel Automations
description: Checks waze travel time
trigger:
- platform: numeric_state
entity_id: sensor.waze_travel_time
below: 5
alias: When Gem is less than 5 minutes away
id: Gem almost home
- platform: numeric_state
entity_id: zone.gem_work
id: Gem at work
alias: Gem is at work
above: 0
- platform: numeric_state
entity_id: zone.gem_work
alias: Gem left work
id: Gem left work
below: 1
- platform: numeric_state
entity_id: sensor.waze_travel_time_2
below: 5
alias: When Dave is less than 5 minutes away
id: Dave almost home
- platform: numeric_state
entity_id: zone.dave_s_mum_and_dad
id: Dave is at his mum and dad's
alias: 'Dave is at his mum and dad''s '
above: 0
- platform: numeric_state
entity_id: zone.dave_s_mum_and_dad
alias: 'Dave left his mum and dad''s '
id: 'Dave left his mum and dad''s '
below: 1
- platform: zone
entity_id:
- person.gem_forrester
- person.david_forrester
zone: zone.doctors_surgery
event: enter
id: At the Doctors
- platform: zone
entity_id:
- person.gem_forrester
- person.david_forrester
zone: zone.doctors_surgery
event: leave
id: Left the Doctors
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Gem at work
sequence:
- service: script.text_notify_dave
data:
message: Gem is got to work
title: GEM AT WORK
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'') }}'
message: '{{ [''Pardon me sir. Your good lady has arrived at work. Let
the party begin'', ''Attention, Gemma has arrived at work. Better get
those jobs done now.'', ''Information. My tracking system has detected
the presence of Gemma at her work location'']|random }}'
- conditions:
- condition: trigger
id: Gem almost home
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
sequence:
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'') }}'
message: "{{ ['Attention in the house. Mummy will be home soon. Shes had\
\ a hard day and will probably need some wine.',\n 'Proximity Alert. My tracking sensors have detected\
\ the presence of movement in the area. Logic circuits have determined\
\ that Mummy will be home soon.',\n 'Information. Sensors have reported\
\ movement at a range of 1 mile from the property. Logic circuits surmise\
\ that Mummy will be home soon.']|random\n}}\n"
- conditions:
- condition: trigger
id: Gem left work
sequence:
- service: script.text_notify_dave
data:
message: Gem has left work
title: GEM LEFT WORK
alias: Send a notification based on an input text helper
- if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
then:
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'') }}'
message: Information. Sensors have detected that Mummy has left the office
and is on her way home. She will be home in {{ state_attr('sensor.gem_at_work'
, 'duration') | round(0)}} minutes.
- conditions:
- condition: trigger
id: Dave is at his mum and dad's
sequence:
- if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
then:
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'') }}'
message: Information. Dave has arrived in Dundee.
- service: script.text_notify_gem
data:
message: 'Dave is at his mum and dad''s '
title: DAVE IS IN DUNDEE
alias: Send a notification based on an input text helper
- conditions:
- condition: trigger
id: Dave almost home
sequence:
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'') }}'
message: "{{ ['Attention in the house. Daddy will be home soon. He has\
\ had a long journey and will probably need some beer.',\n 'Proximity\
\ Alert. My tracking sensors have detected the presence of movement\
\ in the area. Logic circuits have determined that Daddy will be home\
\ soon.',\n 'Information. Sensors have reported movement at a range\
\ of 1 mile from the property. Logic circuits surmise that Daddy will\
\ be home soon.']|random\n}}\n"
alias: If quiet time is off and audible notifications is on, announce on Alexa
everywhere group.
- service: script.text_notify_gem
data:
message: Dave is almost home
title: DAVE 5 MINS AWAY
alias: Notify Gem's phone
- conditions:
- condition: trigger
id: 'Dave left his mum and dad''s '
sequence:
- if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
then:
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'') }}'
message: Daddy is on his way home. He'll be home in {{ state_attr('sensor.dave_in_dundee'
, 'duration') | round(0)}} minutes.
- service: script.text_notify_gem
data:
message: Dave has left Dundee
title: DAVE LEFT
alias: Notify Gem's phone
- conditions:
- condition: trigger
id: At the Doctors
sequence:
- if:
- condition: template
value_template: '{{ "gem" in trigger.to_state.attributes.friendly_name }}'
alias: If Gem, message Dave. If Dave,message Gem.
then:
- service: script.text_notify_dave
data:
message: Gem is at the doctors
title: GEM AT DOCTORS
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'') }}'
message: '{{ "Pardon me daddy. mummy has arrived at the doctors" }}'
else:
- service: script.text_notify_gem
data:
message: Dave is at the doctors
title: DAVE AT DOCTORS
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'') }}'
message: '{{ "Pardon me mummy. daddy has arrived at the doctors" }}'
- conditions:
- condition: trigger
id: Left the Doctors
sequence:
- if:
- condition: template
value_template: '{{ "gem" in trigger.to_state.attributes.friendly_name }}'
alias: If Gem, message Dave. If Dave,message Gem.
then:
- service: script.text_notify_dave
data:
message: Gem has left the doctors
title: GEM LEFT DOCTORS
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'') }}'
message: '{{ "Pardon me daddy. mummy has left the doctors" }}'
else:
- service: script.text_notify_gem
data:
message: Dave has left the doctors
title: DAVE LEFT DOCTORS
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: script.speech_engine
data:
where: '{{ states(''sensor.room_audio'') }}'
message: '{{ "Pardon me mummy. daddy has left the doctors" }}'
mode: single
- alias: Update Energy Records
description: ''
triggers:
- at: '23:55:00'
id: daily
trigger: time
- trigger: state
entity_id:
- sensor.power_grid_import
for:
hours: 0
minutes: 0
seconds: 10
id: Grid Import
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: daily
sequence:
- alias: Record daily max generation
if:
- condition: template
value_template: '{{ (states(''sensor.solar_panel_production_daily'') | float)
> (states(''sensor.max_solar_generated'') | float) }}'
then:
- data:
topic: energy/solar/maxgen
payload: '{{ states(''sensor.solar_panel_production_daily'') }}'
retain: true
action: mqtt.publish
- delay: 00:00:30
- alias: Record ATH Max Generation
if:
- condition: template
value_template: '{{ (states(''sensor.max_solar_generated'') | float) > (states(''sensor.ath_solar_generated'')
| float) }}'
then:
- data:
payload: '{{ states(''sensor.max_solar_generated'') }}'
retain: true
topic: energy/solar/athmaxgen
action: mqtt.publish
- data:
title: New ATH Solar Generation
message: 'Just recorded a new ALL TIME HIGH SOLAR GENERATION: {{ states(''sensor.max_solar_generated'')
}} kWh.'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record daily low generation
if:
- condition: template
value_template: '{{ (states(''sensor.solar_panel_production_daily'') | float)
< (states(''sensor.min_solar_generated'') | float) }}'
then:
- data:
payload: '{{ states(''sensor.solar_panel_production_daily'') }}'
retain: true
topic: energy/solar/mingen
action: mqtt.publish
- delay: 00:00:30
- alias: Record ATL generation
if:
- condition: template
value_template: '{{ (states(''sensor.min_solar_generated'') | float) < (states(''sensor.atl_solar_generated'')
| float) }}'
then:
- data:
payload: '{{ states(''sensor.min_solar_generated'') }}'
retain: true
topic: energy/solar/atlmingen
action: mqtt.publish
- data:
title: New ATH Solar Generation
message: 'Just recorded a new ALL TIME LOW SOLAR GENERATION: {{ states(''sensor.min_solar_generated'')
}} kWh.'
action: script.text_notify_parents
- delay: 00:00:30
alias: At the end of the day
- conditions:
- condition: trigger
id:
- Grid Import
sequence:
- data:
topic: energy/solar/maximport
payload: '{{ states(''sensor.power_grid_import'') }}'
retain: true
action: mqtt.publish
- delay: 00:00:30
- alias: Record ATH Max import power
if:
- condition: template
value_template: '{{ (states(''sensor.max_power_import'') | float) > (states(''sensor.ath_power_import'')
| float) }}'
then:
- data:
payload: '{{ states(''sensor.max_power_import'') }}'
retain: true
topic: energy/solar/athmaximport
action: mqtt.publish
- data:
title: New ATH Grid Power Import
message: 'Just recorded a new ALL TIME HIGH GRID POWER IMPORT: {{ states(''sensor.max_power_import'')
}} W.'
action: script.text_notify_parents
- delay: 00:00:30
alias: Update grid import power
mode: queued
- alias: Update Octopus Target Rate Length for Home Battery
description: ''
triggers:
- entity_id:
- input_number.home_battery_charge_length
id: Home Battery
trigger: state
conditions: []
actions:
- target:
entity_id: binary_sensor.octopus_energy_target_home_battery_charge
data:
target_hours: '"{{ states(''input_number.home_battery_charge_length'')}}"
'
action: octopus_energy.update_target_config
- action: target_timeframes.update_target_timeframe_config
target:
entity_id: binary_sensor.target_timeframes_octopus_energy_charge_home_battery
data:
target_hours: '{{ states(''input_number.home_battery_charge_length'')}}'
mode: single
- alias: Update OpenUV
description: ''
trigger:
- platform: time_pattern
minutes: /15
condition:
- condition: sun
before: sunset
after: sunrise
before_offset: +00:45:00
- condition: template
value_template: "{{ state_attr('automation.update_openuv', 'last_triggered') ==\
\ None\n or (now() - state_attr('automation.update_openuv', 'last_triggered')\n\
\ ) >= timedelta(hours = 0, minutes = 40) }}"
action:
- service: homeassistant.update_entity
data: {}
target:
entity_id:
- binary_sensor.protection_window
- sensor.current_uv_index
mode: single
- alias: Update Part of Day
triggers:
- entity_id:
- binary_sensor.lunchtime
- binary_sensor.dinner_time
- binary_sensor.evening
- binary_sensor.master_bed_occupancy_bed_occupied_both
- binary_sensor.overnight
- binary_sensor.kitchen_occupied
- input_boolean.kitchen_table_occupied
- binary_sensor.morning
- binary_sensor.afternoon
trigger: state
conditions:
- condition: template
value_template: '{{ not is_state(''input_select.part_of_day'', ''Manual Override'')
}}
'
actions:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.master_bed_occupancy_bed_occupied_both
state: 'on'
sequence:
- data:
entity_id: input_select.part_of_day
option: Bedtime
action: input_select.select_option
- conditions:
- condition: state
entity_id: binary_sensor.lunchtime
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.kitchen_occupied
state: 'on'
- condition: state
entity_id: input_boolean.kitchen_table_occupied
state: 'on'
sequence:
- data:
entity_id: input_select.part_of_day
option: Lunchtime
action: input_select.select_option
- conditions:
- condition: state
entity_id: binary_sensor.dinner_time
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.kitchen_occupied
state: 'on'
- condition: state
entity_id: input_boolean.kitchen_table_occupied
state: 'on'
sequence:
- data:
entity_id: input_select.part_of_day
option: Dinnertime
action: input_select.select_option
- conditions:
- condition: state
entity_id: binary_sensor.evening
state: 'on'
- condition: state
entity_id: binary_sensor.kitchen_occupied
state: 'off'
- condition: state
entity_id: input_boolean.kitchen_table_occupied
state: 'off'
sequence:
- data:
entity_id: input_select.part_of_day
option: Evening
action: input_select.select_option
- conditions:
- condition: state
entity_id: binary_sensor.morning
state: 'on'
sequence:
- data:
entity_id: input_select.part_of_day
option: Morning
action: input_select.select_option
- conditions:
- condition: state
entity_id: binary_sensor.afternoon
state: 'on'
sequence:
- data:
entity_id: input_select.part_of_day
option: Afternoon
action: input_select.select_option
- conditions:
- condition: state
entity_id: binary_sensor.overnight
state: 'on'
sequence:
- data:
entity_id: input_select.part_of_day
option: Overnight
action: input_select.select_option
- alias: Update Weather Records
description: ''
triggers:
- entity_id: sensor.gw2000a_lightning_strikes
id: new_strike
trigger: state
- entity_id:
- sensor.gw2000a_max_daily_gust
id: new_gust
trigger: state
- entity_id: sensor.gw2000a_wind_speed
id: new_wind_speed
trigger: state
- at: '23:55:00'
id: daily
trigger: time
- at: 00:01:00
id: save_stats
trigger: time
- at: 00:03:00
id: record_reset
trigger: time
- at: 00:00:00
id: record_reset
trigger: time
- trigger: numeric_state
entity_id:
- sensor.gw2000a_wh90_battery
below: 1.75
id: WH90 Batt Low
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id: new_strike
alias: When a lightning strike occurs
sequence:
- if:
- condition: template
value_template: "{{ (states('sensor.gw2000a_lightning_strikes') | float(0))\
\ >\n (states('sensor.max_lightning_strikes') | float(0)) }}"
then:
- data:
topic: house/weather/maxstrikes
payload: '{{ states(''sensor.gw2000a_lightning_strikes'') }}'
action: script.generic_mqtt_publisher
- data:
topic: house/weather/maxstrikes/timestamp
payload: '{{ now().isoformat() }}'
action: script.generic_mqtt_publisher
alias: Update max number of strikes if greater than
- conditions:
- condition: trigger
id: new_gust
alias: When there is a gust of wind
sequence:
- alias: Notify us if gust is a new ATH
if:
- condition: template
value_template: "{{ (states('sensor.gw2000a_max_daily_gust') | float(0))\
\ >\n (states('sensor.ath_wind_gust') | float(0)) }}"
then:
- data:
topic: house/weather/athwind
payload: '{{ states(''sensor.gw2000a_max_daily_gust'') }}'
action: script.generic_mqtt_publisher
- data:
topic: house/weather/athwind/timestamp
payload: '{{ now().isoformat() }}'
action: script.generic_mqtt_publisher
- data:
title: New ATH Gust
message: 'Just recorded a new ALL TIME HIGH WIND GUST: {{ states(''sensor.ath_wind_gust'')}}
mph at {{states(''sensor.ath_wind_gust_timestamp'')}}'
action: script.text_notify_parents
- delay: 00:00:30
- conditions:
- condition: trigger
id: save_stats
sequence:
- if:
- condition: numeric_state
entity_id: sensor.chill_time_yesterday
above: 0
then:
- data:
topic: house/weather/chillhours
payload: '{% set total = (states(''sensor.chill_time_yesterday'') | float
| round(1)) + (states(''sensor.chill_hours'') | float) | round(1) %}
{{ total|int }}
'
retain: true
action: mqtt.publish
alias: Update Chill Time
- if:
- condition: numeric_state
entity_id: sensor.freeze_time_yesterday
above: 0
then:
- data:
topic: house/weather/freezehours
payload: '{% set total = (states(''sensor.freeze_time_yesterday'') | float
| round(1)) + (states(''sensor.freeze_hours'') | float) | round(1) %}
{{ total }}
'
retain: true
action: mqtt.publish
alias: Update Freeze Time
alias: At the start of the day
- conditions:
- condition: trigger
id: record_reset
sequence:
- if:
- condition: template
value_template: '{{ now().day == 1 }}'
then:
- data:
topic: house/weather/monthlymaxtemp
payload: '{{ states(''sensor.gw2000a_outdoor_temperature'') }}'
retain: true
action: mqtt.publish
- data:
topic: house/weather/monthlylowtemp
payload: '{{ states(''sensor.gw2000a_outdoor_temperature'') }}'
retain: true
action: mqtt.publish
alias: Update min and max monthly temperatures
- if:
- condition: time
weekday:
- sun
then:
- data:
topic: house/weather/weekly_rainfall
payload: '{{ states(''sensor.rainfall_last_week'') }}'
action: mqtt.publish
alias: Update weekly rainfall total
- alias: Reset freeze and chill hours at the start of the month
if:
- condition: template
value_template: '{{ now().day == 1 }}'
then:
- data:
topic: house/weather/chillhours
payload: '0'
retain: true
action: mqtt.publish
- data:
topic: house/weather/freezehours
payload: '0'
retain: true
action: mqtt.publish
alias: At the start of the month
- conditions:
- condition: trigger
id: new_wind_speed
alias: When wind speed changes
sequence:
- data:
topic: house/weather/new_wind_speed
payload: "{% if has_value('sensor.gw2000a_wind_speed') %}\n {{ states('sensor.gw2000a_wind_speed')\
\ | int }}\n{% else %}\n 0\n{% endif %}\n"
action: script.generic_mqtt_publisher
- conditions:
- condition: trigger
id: daily
sequence:
- data:
topic: house/weather/yesterday_rainfall_mm
payload: '{{ state_attr(''sensor.daily_rainfall_ut'',''last_period'') |
float }}'
retain: true
action: mqtt.publish
alias: Update daily rainfall total
- alias: Record daily max temp
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_temp'') | float) > (states(''sensor.max_temp'')
| float) }}'
then:
- data:
topic: house/weather/maxtemp
payload: '{{ states(''sensor.daily_max_temp'') }}'
retain: true
action: mqtt.publish
- alias: Record ATH temp
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_temp'') | float) > (states(''sensor.ath_max_temp'')
| float) }}'
then:
- data:
topic: house/weather/athmaxtemp
payload: '{{ states(''sensor.daily_max_temp'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH High Temp
message: 'Just recorded a new ALL TIME HIGH TEMP: {{ states(''sensor.daily_max_temp'')
}} degrees.'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record daily low temp
if:
- condition: template
value_template: '{{ (states(''sensor.daily_low_temp'') | float) < (states(''sensor.low_temp'')
| float) }}'
then:
- data:
topic: house/weather/lowtemp
payload: '{{ states(''sensor.daily_low_temp'') }}'
retain: true
action: mqtt.publish
- alias: Record ATL temp
if:
- condition: template
value_template: '{{ (states(''sensor.daily_low_temp'') | float) < (states(''sensor.ath_low_temp'')
| float) }}'
then:
- data:
topic: house/weather/athlowtemp
payload: '{{ states(''sensor.daily_low_temp'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH Low Temp
message: 'Just recorded a new ALL TIME LOW TEMP: {{ states(''sensor.daily_low_temp'')
}} degrees.'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record ATH Daily Rain
if:
- condition: template
value_template: '{{ (states(''sensor.daily_rainfall_ut'') | float) > (states(''sensor.ath_24h_rain'')
| float) }}'
then:
- data:
topic: house/weather/athdailyrain
payload: '{{ states(''sensor.daily_rainfall_ut'') }}'
retain: true
action: mqtt.publish
- data:
title: New Wettest Day
message: 'Just recorded a new ALL TIME HIGH DAILY RAINFALL: {{ states(''sensor.ath_24h_rain'')
}} mm.'
action: script.text_notify_parents
- alias: Record daily max wind speed
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_wind_speed'') | float) >
(states(''sensor.max_wind_gust'') | float) }}'
then:
- data:
topic: house/weather/maxwind
payload: '{{ states(''sensor.daily_max_wind_speed'') }}'
retain: true
action: mqtt.publish
- alias: Record number of days with rain and total rainfall
if:
- condition: numeric_state
entity_id: sensor.daily_rainfall_ut
above: 0
then:
- data:
topic: house/weather/daysrain
payload: '{% set total = states(''sensor.days_with_rain'') | int + 1 %}
{{ total }}
'
retain: true
action: mqtt.publish
- data:
topic: house/weather/totalrainfall
payload: '{% set total = (states(''sensor.daily_rainfall_ut'') | float)
+ (states(''sensor.gw2000a_daily_rain_rate'') | float) | round(1) %}
{{ total }}
'
retain: true
action: mqtt.publish
else:
- if:
- condition: state
entity_id: sensor.daily_rainfall_ut
state: '0'
then:
- data:
topic: house/weather/daysnorain
payload: '{% set total = states(''sensor.days_without_rain'') | int
+ 1 %} {{ total }}
'
retain: true
action: mqtt.publish
- if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_pressure'') | float) > (states(''sensor.max_pressure'')
| float) }}'
then:
- data:
topic: house/weather/maxpress
payload: '{{ states(''sensor.daily_max_pressure'') }}'
retain: true
action: mqtt.publish
alias: Record daily high pressure
- alias: Record ATH Pressure
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_pressure'') | float) > (states(''sensor.ath_max_pressure'')
| float) }}'
then:
- data:
topic: house/weather/athmaxpress
payload: '{{ states(''sensor.daily_max_pressure'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH High Pressure
message: 'Just recorded a new ALL TIME HIGH BAROMETRIC PRESSURE: {{ states(''sensor.daily_max_pressure'')
}} millibars.'
action: script.text_notify_parents
- delay: 00:00:30
- if:
- condition: template
value_template: '{{ (states(''sensor.daily_low_pressure'') | float) < (states(''sensor.min_pressure'')
| float) }}'
then:
- data:
topic: house/weather/minpress
payload: '{{ states(''sensor.daily_low_pressure'') }}'
retain: true
action: mqtt.publish
alias: Record daily low pressure
- alias: Record ATL pressure
if:
- condition: template
value_template: '{{ (states(''sensor.daily_low_pressure'') | float) < (states(''sensor.ath_min_pressure'')
| float) }}'
then:
- data:
topic: house/weather/athminpress
payload: '{{ states(''sensor.daily_low_pressure'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH Low Pressure
message: 'Just recorded a new ALL TIME LOW BAROMETRIC PRESSURE: {{ states(''sensor.daily_low_pressure'')
}} millibars.'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record daily max humidity
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_humidity'') | float) > (states(''sensor.max_humidity'')
| float) }}'
then:
- data:
topic: house/weather/maxhum
payload: '{{ states(''sensor.daily_max_humidity'') }}'
retain: true
action: mqtt.publish
- alias: Record ATH humidity
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_humidity'') | float) > (states(''sensor.ath_max_humidity'')
| float) }}'
then:
- data:
topic: house/weather/athmaxhum
payload: '{{ states(''sensor.daily_max_humidity'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH High Humidity Level
message: 'Just recorded a new ALL TIME HIGH HUMDITIY LEVEL: {{ states(''sensor.daily_max_humidity'')
}}%'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record daily low humidity
if:
- condition: template
value_template: '{{ (states(''sensor.daily_min_humidity'') | float) < (states(''sensor.min_humidity'')
| float) }}'
then:
- data:
topic: house/weather/minhum
payload: '{{ states(''sensor.daily_min_humidity'') }}'
retain: true
action: mqtt.publish
- if:
- condition: template
value_template: '{{ (states(''sensor.daily_min_humidity'') | float) < (states(''sensor.ath_min_humidity'')
| float) }}'
then:
- data:
topic: house/weather/athminhum
payload: '{{ states(''sensor.daily_min_humidity'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH Low Humidity Level
message: 'Just recorded a new ALL TIME LOW HUMIDITY LEVEL: {{ states(''sensor.daily_min_humidity'')
}}%'
action: script.text_notify_parents
- delay: 00:00:30
alias: Record ATL humidity
- alias: Record daily max solar radiation
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_solar_radiation'') | float)
> (states(''sensor.max_solar_radiation'') | float) }}'
then:
- data:
topic: house/weather/maxsolrad
payload: '{{ states(''sensor.daily_max_solar_radiation'') }}'
retain: true
action: mqtt.publish
- alias: Record ATH solar radiation
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_solar_radiation'') | float)
> (states(''sensor.ath_max_solar_radiation'') | float) }}'
then:
- data:
topic: house/weather/athmaxsolrad
payload: '{{ states(''sensor.daily_max_solar_radiation'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH High Solar Radiation Level
message: 'Just recorded a new ALL TIME HIGH SOLAR RADIATION LEVEL: {{
states(''sensor.daily_max_solar_radiation'') }}%'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record daily max lux level
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_solar_lux'') | float) > (states(''sensor.max_solar_lux'')
| float) }}'
then:
- data:
topic: house/weather/maxsollux
payload: '{{ states(''sensor.daily_max_solar_lux'') }}'
retain: true
action: mqtt.publish
- alias: Record ATH lux level
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_solar_lux'') | float) > (states(''sensor.ath_max_solar_lux'')
| float) }}'
then:
- data:
topic: house/weather/athmaxsollux
payload: '{{ states(''sensor.daily_max_solar_lux'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH High Solar Lux Level
message: 'Just recorded a new ALL TIME HIGH SOLAR LUX LEVEL: {{ states(''sensor.daily_max_solar_lux'')
}}%'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record daily max uv index
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_uv_index'') | float) > (states(''sensor.max_uv_index'')
| float) }}'
then:
- data:
topic: house/weather/maxuv
payload: '{{ states(''sensor.daily_max_uv_index'') }}'
retain: true
action: mqtt.publish
- alias: Record ATH uv index
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_uv_index'') | float) > (states(''sensor.ath_max_uv_index'')
| float) }}'
then:
- data:
topic: house/weather/athmaxuv
payload: '{{ states(''sensor.daily_max_uv_index'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH High UV Index
message: 'Just recorded a new ALL TIME HIGH UV LEVEL: {{ states(''sensor.daily_max_uv_index'')
}}%'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record daily max soil temp
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_soil_temp'') | float) > (states(''sensor.max_soil_temperature'')
| float) }}'
then:
- data:
topic: house/weather/maxsoiltemp
payload: '{{ states(''sensor.daily_max_soil_temp'') }}'
retain: true
action: mqtt.publish
- alias: Record ATH soil temp
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_soil_temp'') | float) > (states(''sensor.ath_max_soil_temperature'')
| float) }}'
then:
- data:
topic: house/weather/athmaxsoiltemp
payload: '{{ states(''sensor.daily_max_soil_temp'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH Soil Temp
message: 'Just recorded a new ALL TIME HIGH SOIL TEMPERATURE: {{ states(''sensor.daily_max_soil_temp'')
}}%'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record daily min soil temp
if:
- condition: template
value_template: '{{ (states(''sensor.daily_min_soil_temp'') | float) < (states(''sensor.min_soil_temperature'')
| float) }}'
then:
- data:
topic: house/weather/minsoiltemp
payload: '{{ states(''sensor.daily_min_soil_temp'') }}'
retain: true
action: mqtt.publish
- alias: Record ATL soil temp
if:
- condition: template
value_template: '{{ (states(''sensor.daily_min_soil_temp'') | float) < (states(''sensor.ath_min_soil_temperature'')
| float) }}'
then:
- data:
topic: house/weather/athminsoiltemp
payload: '{{ states(''sensor.daily_min_soil_temp'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATL Soil Temp
message: 'Just recorded a new ALL TIME LOW SOIL TEMPERATURE: {{ states(''sensor.daily_min_soil_temp'')
}}%'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record daily max soil moisture
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_soil_moisture'') | float)
> (states(''sensor.max_soil_moisture'') | float) }}'
then:
- data:
topic: house/weather/maxsoilmoist
payload: '{{ states(''sensor.daily_max_soil_moisture'') }}'
retain: true
action: mqtt.publish
- alias: Record ATH soil moisture
if:
- condition: template
value_template: '{{ (states(''sensor.daily_max_soil_moisture'') | float)
> (states(''sensor.ath_max_soil_moisture'') | float) }}'
then:
- data:
topic: house/weather/athmaxsoilmoist
payload: '{{ states(''sensor.daily_max_soil_moisture'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATH Soil Moisture
message: 'Just recorded a new ALL TIME HIGH SOIL MOISTURE: {{ states(''sensor.daily_max_soil_moisture'')
}}%'
action: script.text_notify_parents
- delay: 00:00:30
- alias: Record daily min soil moisture
if:
- condition: template
value_template: '{{ (states(''sensor.daily_min_soil_moisture'') | float)
< (states(''sensor.min_soil_moisture'') | float) }}'
then:
- data:
topic: house/weather/minsoilmoist
payload: '{{ states(''sensor.daily_min_soil_moisture'') }}'
retain: true
action: mqtt.publish
- alias: Record ATL soil moisture
if:
- condition: template
value_template: '{{ (states(''sensor.daily_min_soil_moisture'') | float)
< (states(''sensor.ath_min_soil_moisture'') | float) }}'
then:
- data:
topic: house/weather/athminsoilmoist
payload: '{{ states(''sensor.daily_min_soil_moisture'') }}'
retain: true
action: mqtt.publish
- data:
title: New ATL Soil Moisture
message: 'Just recorded a new ALL TIME LOW SOIL MOISTURE: {{ states(''sensor.daily_min_soil_moisture'')
}}%'
action: script.text_notify_parents
- delay: 00:00:30
alias: At the end of the day
- conditions:
- condition: trigger
id:
- WH90 Batt Low
sequence:
- action: script.text_notify_dave
data:
title: WITTBOY BATTERY LOW
message: The Wittboy battery seems low. Please check.
mode: queued
- alias: Washing Machine - All Automations
description: Set the value of input boolean "washing machine on/off" based on power
consumption. Announce when the washing has finished and check the washing has
been removed.
trigger:
- platform: numeric_state
entity_id: sensor.shelly1pm_e89f6d84a584_power
above: 10
id: Washing Machine On
alias: Washing machine drawing more than 10W power
- platform: numeric_state
entity_id: sensor.shelly1pm_e89f6d84a584_power
below: 2
id: Washing machine off
alias: Washing machine drawing less than 2W power for 60s.
for:
hours: 0
minutes: 1
seconds: 0
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.washing_machine_door_open
id: Washing machine door not open
alias: Washing done notification repeat with timer
- platform: state
entity_id: binary_sensor.washing_machine_door_contact
from: 'off'
to: 'on'
id: Washing removed from machine
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: Washing Machine On
sequence:
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.washing_machine_on_off
- conditions:
- condition: trigger
id: Washing machine off
sequence:
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.washing_machine_on_off
- if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
then:
- service: script.speech_engine_for_tts
data:
voice: Brian
where: '{{states(''sensor.room_audio'') }}'
message: "{{\n ['Information. The washing machine has completed its cycle.\
\ Better\n get the washing hung up to dry', \n 'Information, I\
\ have detected a reduction in the power consumption of the washing\
\ machine. My fuzzy logic circuit has determined that means its finished',\
\ \n 'Information. My sensors have detected a reduction in the\
\ rotational velocity of the washing machine. My artificially intuitive\
\ logic system has determined that now might be the optimal time to\
\ hang it up to dry', \n 'Information. The washing machine has\
\ finished its cycle. It has cycled quite a long way and is quite tired\
\ after its exertions. I would hang the washing out to dry, but I dont\
\ have any arms. Or legs. So I guess its up to you' \n ]|random\
\ }}"
- if:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.text_notifications
state: 'on'
- condition: state
entity_id: input_boolean.text_notifications_dave
state: 'on'
then:
- service: notify.mobile_app_{{states('input_text.my_mobile_phone_id')}}
data:
message: That's the washing done. Better get it hung up.
title: WASHING MACHINE
- if:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.text_notifications
state: 'on'
- condition: state
entity_id: input_boolean.text_notifications_gem
state: 'on'
then:
- service: notify.mobile_app_{{states('input_text.gem_s_mobile_phone_id')}}
data:
message: That's the washing done. Better get it hung up.
title: WASHING MACHINE
- service: timer.start
data: {}
target:
entity_id: timer.washing_machine_door_open
- service: light.turn_on
data:
color_name: darkorange
brightness_pct: 10
target:
entity_id: light.kitchen_light_2
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.washing_machine_finished
- conditions:
- condition: trigger
id: Washing machine door not open
- condition: state
entity_id: binary_sensor.washing_machine_door_contact
state: 'off'
sequence:
- if:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
then:
- service: script.speech_engine_for_tts
data:
voice: Brian
where: '{{states(''sensor.room_audio'')}}'
message: "{{ ['Pardon me for intruding on your\nrelaxation once more.\
\ The washing is still in the machine.\nBetter get it out before it\
\ starts to smell, and I am sure\nyou do not want that', \n 'Excuse\
\ me for once again breaking the silence. My motion sensors have detected\
\ zero activity since I last informed you that the washing was done.\
\ Please engage your glutes and get off your backside as the washing\
\ wont hang itself up', \n 'Right, listen up humans, heres the deal.\
\ I tell you the washing is done, and you hang it up. Someone, is not\
\ keeping their side of the deal', \n 'There is a lovely breeze blowing\
\ through the garden right now and I should be hearing the pleasant\
\ flap flap of washing in the breeze. Unfortunately my auditory sensors\
\ appear to be malfunctioning and I hear nothing. Perhaps the washing\
\ line has not been deployed.' \n]|random }}"
- if:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.text_notifications
state: 'on'
- condition: state
entity_id: input_boolean.text_notifications_dave
state: 'on'
then:
- service: notify.mobile_app_{{states('input_text.my_mobile_phone_id')}}
data:
message: The washing is still in the machine. Better hang it up before
it starts to smell.
title: SMELLY WASHING!
- if:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.text_notifications
state: 'on'
- condition: state
entity_id: input_boolean.text_notifications_gem
state: 'on'
then:
- service: notify.mobile_app_{{states('input_text.gem_s_mobile_phone_id')}}
data:
message: The washing is still in the machine. Better hang it up before
it starts to smell.
title: SMELLY WASHING!
- conditions:
- condition: trigger
id: Washing removed from machine
- condition: or
conditions:
- condition: state
entity_id: timer.washing_machine_door_open
state: active
- condition: state
entity_id: timer.washing_machine_door_open
state: idle
alias: Timer active or finished
sequence:
- service: timer.cancel
data: {}
target:
entity_id: timer.washing_machine_door_open
- if:
- condition: state
entity_id: light.kitchen_lights_2
state: 'off'
then:
- service: light.turn_off
data: {}
target:
entity_id: light.kitchen_light_2
else:
- if:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.lunchtime
state: 'on'
- condition: state
entity_id: binary_sensor.dinner_time
state: 'on'
then:
- service: scene.turn_on
data: {}
target:
entity_id: scene.kitchen_lights_mealtimes
else:
- service: scene.turn_on
data: {}
target:
entity_id: scene.kitchen_lights_normal
alias: If lights on and mealtime set lights to bright, else normal
mode: single
- alias: Water Leak Detection and Alarm
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.leak_detector_dishwasher_water_leak
- binary_sensor.leak_detector_washing_machine_water_leak
- binary_sensor.kids_bathroom_leak_detector_water_leak
- binary_sensor.main_bathroom_leak_detector_water_leak
to: 'on'
for:
hours: 0
minutes: 1
seconds: 0
condition: []
action:
- service: notify.mobile_app_{{states('input_text.my_mobile_phone_id')}}
data:
message: Water leak detected in {{ trigger.to_state.attributes.friendly_name}}
title: WATER LEAK DETECTED!
alias: Notify Dave's Mobile based on an input text helper
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
then:
- service: media_player.volume_set
data:
volume_level: 0.6
target:
entity_id: media_player.everywhere_2
- service: notify.alexa_media_everywhere_2
data:
message: Alert! Alert! There is a water leak in the {{trigger.to_state.attributes.friendly_name}}
data:
type: announce
- service: media_player.volume_set
data:
volume_level: '{{ states(''input_number.alexa_volume_level_default_all'')|float(0)}}'
target:
entity_id: media_player.everywhere_2
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.leak_detector_dishwasher_water_leak
state: 'on'
- condition: state
entity_id: binary_sensor.leak_detector_washing_machine_water_leak
state: 'on'
then:
- service: media_player.volume_set
data:
volume_level: 0.6
target:
area_id: everywhere
- service: notify.alexa_media_everywhere_2
data:
message: Alert! Alert!
There is a water leak in the {{trigger.to_state.attributes.friendly_name}}.
data:
type: announce
- service: media_player.volume_set
data:
volume_level: '{{ states(''input_number.alexa_volume_level_default_all'')|float(0)}}'
target:
area_id: everywhere
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.leak_detector_dishwasher_water_leak
state: 'on'
- condition: state
entity_id: binary_sensor.leak_detector_washing_machine_water_leak
state: 'on'
then:
- service: media_player.volume_set
data:
volume_level: 0.6
target:
area_id: everywhere
- service: notify.alexa_media_everywhere_2
data:
message: Alert! Alert! There
is a water leak in the {{ trigger.to_state.attributes.friendly_name }}.
data:
type: announce
- service: media_player.volume_set
data:
volume_level: '{{ states(''input_number.alexa_volume_level_default_all'')|float(0)}}'
target:
area_id: everywhere
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.leak_detector_dishwasher_water_leak
state: 'on'
- condition: state
entity_id: binary_sensor.leak_detector_washing_machine_water_leak
state: 'on'
then:
- service: media_player.volume_set
data:
volume_level: 0.6
target:
area_id: everywhere
- service: notify.alexa_media_everywhere_2
data:
message: Alert! Alert! There
is a water leak in the {{trigger.to_state.attributes.friendly_name}}.
data:
type: announce
- service: media_player.volume_set
data:
volume_level: '{{ states(''input_number.alexa_volume_level_default_all'')|float(0)}}'
target:
area_id: everywhere
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- if:
- condition: state
entity_id: binary_sensor.quiet_time
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.leak_detector_dishwasher_water_leak
state: 'on'
- condition: state
entity_id: binary_sensor.leak_detector_washing_machine_water_leak
state: 'on'
then:
- service: media_player.volume_set
data:
volume_level: 0.6
target:
area_id: everywhere
- service: notify.alexa_media_everywhere_2
data:
message: Alert! Alert! There is a water leak in the {{trigger.to_state.attributes.friendly_name}}.
data:
type: announce
- service: media_player.volume_set
data:
volume_level: '{{ states(''input_number.alexa_volume_level_default_all'')|float(0)}}'
target:
area_id: everywhere
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
mode: single
- alias: Welcome Home
description: ''
triggers:
- entity_id:
- binary_sensor.dave_home
- binary_sensor.gem_home
- binary_sensor.sean_home
to: 'on'
trigger: state
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.welcome_home
state: 'on'
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
sequence:
- wait_for_trigger:
- entity_id:
- binary_sensor.front_door_sense_contact
- binary_sensor.back_door_sensor_contact
to: 'off'
from: 'on'
for:
hours: 0
minutes: 0
seconds: 0
trigger: state
timeout:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
- delay:
hours: 0
minutes: 0
seconds: 20
milliseconds: 0
- if:
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
then:
- data: {}
action: script.welcome_briefing_2
alias: Play welcome message unless morning briefing is playing in kitchen.
default:
- data:
object_id: arriving
add_entities: '{{ trigger.to_state.entity_id }}'
action: group.set
- wait_for_trigger:
- entity_id:
- binary_sensor.front_door_sense_contact
- binary_sensor.back_door_sensor_contact
from: 'on'
to: 'off'
trigger: state
timeout:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- delay:
hours: 0
minutes: 0
seconds: 20
milliseconds: 0
- if:
- condition: state
entity_id: input_boolean.announcement_playing
state: 'off'
then:
- data:
where: kitchen
type: announcement
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\
\ house?\" ~ 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"
action: script.jarvis_speech_engine_v3_0
alias: 'Announce welcome home if no other announcement is playing '
- delay: 00:02:00
- data:
object_id: arriving
entities: []
action: group.set
mode: restart
- alias: Zigbee Device Watch and Notify
description: 24 hour monitor of Zigbee devices
trigger:
- platform: state
entity_id:
- sensor.zigbee2mqtt_offline_device
from: null
to: null
condition: []
action:
- service: script.text_notify_dave
metadata: {}
data:
title: ZIGBEE DEVICE OFFLINE
message: The following Zigbee devices are offline {{ states('sensor.zigbee2mqtt_offline_device')}}
- service: persistent_notification.create
data:
title: ZIGBEE DEVICE OFFLINE
message: The following Zigbee devices are offline {{ states('sensor.zigbee2mqtt_offline_device')}}
mode: single