AutomationDataset/shortbloke/shortbloke_automations.yaml

1228 lines
31 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- id: '1615638107644'
alias: 'Alert: Low salt level'
description: ''
trigger:
- type: distance
platform: device
device_id: f93fcb10f5467ec5d73867e8e7bfb88c
entity_id: baeb3502f118115b51c15bb0da8962e3
domain: sensor
above: 43
for:
hours: 1
minutes: 0
seconds: 0
condition: []
action:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.low_salt
data: {}
- device_id: c63b36e2a50cd3ffd1880f0aae89cf06
domain: mobile_app
type: notify
message: Check Salt Level
title: Water Softner
mode: single
- id: '1615638220241'
alias: 'State Change: Reset Salt Level Input Boolean'
description: ''
trigger:
- type: value
platform: device
device_id: f93fcb10f5467ec5d73867e8e7bfb88c
entity_id: sensor.garage_monitor_salt_level
domain: sensor
below: 20
for:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
condition: []
action:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.low_salt
data: {}
mode: single
- id: '1615640713545'
alias: 'Action: Turn on Loft Fan above 30'
description: ''
trigger:
- type: temperature
platform: device
device_id: 11f3b2cca347d360c859eb46718cc34c
entity_id: sensor.loft_fan_temperature
domain: sensor
above: 30
for:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
condition: []
action:
- type: turn_on
device_id: 11f3b2cca347d360c859eb46718cc34c
entity_id: switch.sonoff_loft_fan
domain: switch
mode: single
- id: '1615640737825'
alias: 'Action: Turn off Loft Fan below 30'
description: ''
trigger:
- type: temperature
platform: device
device_id: 11f3b2cca347d360c859eb46718cc34c
entity_id: sensor.loft_fan_temperature
domain: sensor
below: 30
for:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
condition: []
action:
- type: turn_off
device_id: 11f3b2cca347d360c859eb46718cc34c
entity_id: switch.sonoff_loft_fan
domain: switch
mode: single
- id: '1615646609604'
alias: 'Schedule: Turn on in the morning and sunset'
description: ''
trigger:
- platform: time
at: 06:30:00
- platform: sun
event: sunset
offset: -01:00:00
condition: []
action:
- type: turn_on
device_id: 0b953119e29d4d2cb3c99048226eefd9
entity_id: switch.lwrf_hall_socket_2
domain: switch
mode: single
- id: '1615646860464'
alias: 'Action: Turn off twig lights after sunrise'
description: ''
trigger:
- platform: numeric_state
entity_id: sun.sun
attribute: elevation
above: '10'
condition: []
action:
- type: turn_off
device_id: 0b953119e29d4d2cb3c99048226eefd9
entity_id: switch.lwrf_hall_socket_2
domain: switch
mode: single
- id: '1615647990496'
alias: 'Action & Alert: Frasers TV tuned on after curfew'
description: ''
trigger:
- platform: state
entity_id: binary_sensor.frasers_tv
to: 'on'
for: 00:06:00
condition:
- condition: time
after: '23:00'
before: 06:59
action:
- service: notify.mobile_app_martin_iphone12
data:
message: Turning off Frasers TV Power
data:
actions:
- action: PLAY_LATE_TV_MESSAGE
title: Play Message?
activationMode: background
authenticationRequired: false
destructive: false
behavior: default
- service: homeassistant.turn_off
target:
entity_id: switch.lwrf_loft_fraser_tv
mode: single
- id: '1615648232369'
alias: 'Notify: Late TV message (TTS)'
description: ''
trigger:
- platform: event
event_data:
action: PLAY_LATE_TV_MESSAGE
event_type: mobile_app_notification_action
condition: []
action:
- service: script.sonos_say
data:
sonos_entity: media_player.play_1
volume: 0.5
message: Turn off your TV and go to sleep
delay: 00:00:05
mode: single
- id: '1615648465209'
alias: 'Action & Alert: Turn off power to Frasers TV if on 30mins after curfew'
description: ''
trigger:
- platform: time
at: '23:30'
condition:
- condition: state
entity_id: binary_sensor.frasers_tv
state: 'on'
action:
- service: notify.mobile_app_martin_iphone12
data:
message: Cutting power to Fraser's TV
data:
actions:
- action: PLAY_LATE_TV_MESSAGE
title: Play Message?
activationMode: background
authenticationRequired: false
destructive: false
behavior: default
- service: homeassistant.turn_off
target:
entity_id: switch.lwrf_loft_fraser_tv
mode: single
- id: '1615648558972'
alias: 'Schedule: Restore power to Frasers TV'
description: ''
trigger:
- platform: time
at: 07:00:00
condition: []
action:
- service: homeassistant.turn_on
target:
entity_id: switch.lwrf_loft_fraser_tv
mode: single
- id: '1615649323516'
alias: 'Alert: HASS Low Disk Space'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.disk_use_percent
above: '90'
condition: []
action:
- service: notify.martin
data:
message: Low disk space > 90% used
title: HASS Low Resource Alert
mode: single
- id: '1615649356820'
alias: 'Alert: HASS Low Memory'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.memory_use_percent
above: '90'
condition: []
action:
- service: notify.martin
data:
message: Low memory > 90% used
title: HASS Low Resource Alert
mode: single
- id: '1615649413577'
alias: 'Alert: HASS High Load'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.load_5m
above: '2.8'
condition: []
action:
- service: notify.martin
data:
message: System Load 5m Load Average > 2.8
title: HASS Low Resource Alert
mode: single
- id: '1615651874014'
alias: 'State Change: Set washing machine active when power detected'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_current_consumption
above: '5'
condition:
- condition: or
conditions:
- condition: state
entity_id: input_select.washing_machine_status
state: idle
- condition: state
entity_id: input_select.washing_machine_status
state: finished
action:
- service: input_select.select_option
data:
option: running
target:
entity_id: input_select.washing_machine_status
mode: single
- id: '1615652115472'
alias: 'State Change: Set washing machine to finished when power drops'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.washing_machine_current_consumption
below: '5'
for: 00:02:00
condition:
- condition: state
entity_id: input_select.washing_machine_status
state: running
action:
- service: input_select.select_option
data:
option: finished
target:
entity_id: input_select.washing_machine_status
- service: notify.michelle
data:
title: Washing Machine
message: Finished!
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: input_select.select_option
data:
option: idle
target:
entity_id: input_select.washing_machine_status
mode: single
- id: '1615653075229'
alias: 'State Change: Set dryer active when power detected'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.tumble_dryer_current_consumption
above: '800'
condition:
- condition: or
conditions:
- condition: state
entity_id: input_select.dryer_status
state: idle
- condition: state
entity_id: input_select.dryer_status
state: finished
action:
- service: input_select.select_option
data:
option: running
target:
entity_id: input_select.dryer_status
mode: single
- id: '1615653218617'
alias: 'State Change: Set dryer to finished when power drops'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.tumble_dryer_current_consumption
below: '100'
for: 00:03:00
condition:
- condition: state
entity_id: input_select.dryer_status
state: running
action:
- service: input_select.select_option
data:
option: finished
target:
entity_id: input_select.dryer_status
- service: notify.michelle
data:
title: Tumble Dryer
message: Finished!
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: input_select.select_option
data:
option: idle
target:
entity_id: input_select.dryer_status
mode: single
- id: '1615653304715'
alias: 'State Change: Set dishwasher active when power detected'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.dishwasher_current_consumption
above: '100'
condition:
- condition: or
conditions:
- condition: state
entity_id: input_select.dishwasher_status
state: idle
- condition: state
entity_id: input_select.dishwasher_status
state: finished
action:
- service: input_select.select_option
data:
option: running
target:
entity_id: input_select.dishwasher_status
mode: single
- id: '1615653473188'
alias: 'State Change: Set dishwasher to finished when power drops'
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.dishwasher_current_consumption
below: '1'
for: 00:02:00
condition:
- condition: state
entity_id: input_select.dishwasher_status
state: running
action:
- service: input_select.select_option
data:
option: finished
target:
entity_id: input_select.dishwasher_status
- service: notify.adults
data:
message: Finished!
title: Dishwasher
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 0
- service: input_select.select_option
data:
option: idle
target:
entity_id: input_select.dishwasher_status
mode: single
- id: '1615653930854'
alias: Ironing room motion detected
description: ''
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_ironing_room
to: 'on'
condition: []
action:
- service: input_select.select_option
data:
option: motion
target:
entity_id: input_select.ironing_room_motion_status
mode: single
- id: '1615654076969'
alias: Set ironing room to idle after 30mins of no motion
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.motion_sensor_ironing_room
to: 'off'
for:
hours: 0
minutes: 30
seconds: 0
condition: []
action:
- service: input_select.select_option
data:
option: idle
target:
entity_id: input_select.ironing_room_motion_status
mode: single
- id: '1615654485950'
alias: Turn off ironing table - no motion
description: ''
trigger:
- platform: numeric_state
entity_id:
- sensor.ironing_room_ironing_table_current_consumption
for:
hours: 0
minutes: 0
seconds: 10
above: 10
condition:
- condition: state
entity_id: input_select.ironing_room_motion_status
state: idle
action:
- service: notify.michelle
data:
title: Ironing Room Alert!
message: No Motion Detected - Turning off Ironing Table
- service: switch.turn_off
metadata: {}
data: {}
target:
device_id: 14afeceb9ed9aa8dcba55863c159ee66
mode: single
- id: '1615656237892'
alias: 'State Change: Door Open - Turn on heating eco mode'
description: ''
triggers:
- entity_id:
- binary_sensor.lumi_lumi_sensor_backdoor
to: 'on'
for:
hours: 0
minutes: 2
seconds: 0
trigger: state
conditions: []
actions:
- type: turn_on
device_id: cb39ce88b9c64146eb49e0f878612b5b
entity_id: 39a4ee7ea774d541089cca677b5327b5
domain: switch
mode: single
- id: '1615656264115'
alias: 'State Change: Door Closed - Turn off heating eco mode'
description: ''
triggers:
- entity_id:
- binary_sensor.lumi_lumi_sensor_backdoor
to: 'off'
trigger: state
conditions: []
actions:
- type: turn_off
device_id: cb39ce88b9c64146eb49e0f878612b5b
entity_id: 39a4ee7ea774d541089cca677b5327b5
domain: switch
mode: single
- id: '1615662841415'
alias: 'State Change: House occupied'
description: ''
trigger:
- platform: state
entity_id: group.anyone_home
to: home
condition:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: climate.set_preset_mode
data:
preset_mode: none
target:
entity_id: climate.hallway_house
mode: single
- id: '1615662905589'
alias: 'State Change: House unoccupied'
description: ''
trigger:
- platform: state
entity_id: group.anyone_home
from: home
condition:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: climate.set_preset_mode
data:
preset_mode: eco
target:
entity_id: climate.hallway_house
- service: script.turn_on
target:
entity_id: script.everyone_away
mode: single
- id: '1615662965997'
alias: 'State Change: Morgan presence changed from home'
description: ''
trigger:
- platform: state
entity_id: person.morgan
from: home
condition:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: script.turn_on
target:
entity_id: script.morgan_away
mode: single
- id: '1615663102226'
alias: 'Alert: Morgan away window open'
description: ''
trigger:
- platform: state
entity_id: person.morgan
from: home
condition:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
- condition: state
entity_id: binary_sensor.lumi_lumi_sensor_magnet_993d0303_on_off
state: 'on'
action:
- service: notify.morgan
data:
title: 'Home Assistant: ALERT!'
message: Bedroom Window Left Open
- service: notify.michelle
data:
title: 'Home Assistant: ALERT!'
message: Morgan's window has been left open
mode: single
- id: '1615663191504'
alias: 'State Change: Fraser presence changed from home'
description: ''
trigger:
- platform: state
entity_id: person.fraser
from: home
condition:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
action:
- service: script.turn_on
target:
entity_id: script.fraser_away
mode: single
- id: '1615663371546'
alias: 'Alert: House unoccupied things left open'
description: ''
trigger:
- platform: state
entity_id: group.anyone_home
from: home
condition:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.lumi_lumi_frasers_window_right
state: 'on'
- condition: state
entity_id: binary_sensor.lumi_lumi_sensor_frasers_window_left
state: 'on'
- condition: state
entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_bc705302_on_off
state: 'on'
- condition: state
entity_id: binary_sensor.lumi_lumi_sensor_frontdoor
state: 'on'
- condition: state
entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_10327502_on_off
state: 'on'
- condition: state
entity_id: binary_sensor.lumi_lumi_sensor_backdoor
state: 'on'
- condition: state
entity_id: binary_sensor.lumi_lumi_morgans_window
state: 'on'
action:
- service: notify.adults
data:
title: House Unoccupied - Left open
message: '{%if is_state(''binary_sensor.lumi_lumi_frasers_window_right'', ''on'')%}{{state_attr(''binary_sensor.lumi_lumi_frasers_window_right'',''friendly_name'')}}{%endif%}
{%if is_state(''binary_sensor.lumi_lumi_sensor_frasers_window_left'', ''on'')%}{{state_attr(''binary_sensor.lumi_lumi_sensor_frasers_window_left'',''friendly_name'')}}{%endif%}
{%if is_state(''binary_sensor.lumi_lumi_sensor_magnet_aq2_bc705302_on_off'',
''on'')%}{{state_attr(''binary_sensor.lumi_lumi_sensor_magnet_aq2_bc705302_on_off'',''friendly_name'')}}{%endif%}
{%if is_state(''binary_sensor.lumi_lumi_sensor_frontdoor'', ''on'')%}{{state_attr(''binary_sensor.lumi_lumi_sensor_frontdoor'',''friendly_name'')}}{%endif%}
{%if is_state(''binary_sensor.lumi_lumi_sensor_magnet_aq2_10327502_on_off'',
''on'')%}{{state_attr(''binary_sensor.lumi_lumi_sensor_magnet_aq2_10327502_on_off'',''friendly_name'')}}{%endif%}
{%if is_state(''binary_sensor.lumi_lumi_sensor_backdoor'', ''on'')%}{{state_attr(''binary_sensor.lumi_lumi_sensor_backdoor'',''friendly_name'')}}{%endif%}
{%if is_state(''binary_sensor.lumi_lumi_morgans_window'', ''on'')%}{{state_attr(''binary_sensor.lumi_lumi_morgans_window'',''friendly_name'')}}{%endif%}'
mode: single
- id: '1621091408356'
alias: 'Action: Shutdown PC - Tera if Fraser not home for 5 mins'
description: ''
trigger:
- platform: state
entity_id: person.fraser
from: home
for: 0:05:00
condition:
- condition: state
entity_id: sensor.tera_powered_on
state: 'True'
action:
- service: notify.martin
data:
message: Fraser no longer at home but PC On. Turn off?
title: PC Shutdown
data:
actions:
- action: FRASER_PC_SHUTDOWN
title: Shutdown Frasers PC?
activationMode: background
authenticationRequired: false
destructive: false
behavior: default
- type: toggle
device_id: 15f9831aec887ee4621e1c7124d77a47
entity_id: e95db23038c032115f4f94295c75bbd5
domain: switch
mode: single
- id: '1628523215496'
alias: 'Notify: Shutdown Frasers PC'
description: ''
trigger:
- platform: event
event_data:
action: FRASER_PC_SHUTDOWN
event_type: mobile_app_notification_action
condition: []
action:
- service: homeassistant.turn_on
target:
entity_id: switch.shutdown
mode: single
- id: '1636214471227'
alias: 'Action: Turn off outside socket'
description: ''
triggers:
- at: 00:00:00
trigger: time
conditions: []
actions:
- device_id: caa90b0edf23497cb73f5e5362b092b1
domain: rfxtrx
type: send_command
subtype: 'Off'
mode: single
- id: '1636214504954'
alias: 'Action: Turn on outside socket'
description: ''
triggers:
- at: '16:00:00'
trigger: time
conditions: []
actions:
- device_id: caa90b0edf23497cb73f5e5362b092b1
domain: rfxtrx
type: send_command
subtype: 'On'
mode: single
- id: '1675235683724'
alias: Keep Hot Water above 30
description: ''
trigger:
- platform: state
entity_id:
- sensor.garage_monitor_water_temperature
condition:
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.garage_monitor_water_temperature
below: 30
- condition: state
entity_id: switch.downstairs_thermostat_hot_water
state: 'off'
- condition: time
after: 06:00:00
before: '23:00:00'
action:
- service: homeassistant.turn_on
data: {}
target:
entity_id: switch.downstairs_thermostat_hot_water
mode: single
- id: '1697876540698'
alias: 'Action: Shutdown PC - Tera idle for over 2 hours'
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.tera_pc_idle
to: 'on'
for:
hours: 2
minutes: 0
seconds: 0
condition: []
action:
- type: toggle
device_id: 15f9831aec887ee4621e1c7124d77a47
entity_id: e95db23038c032115f4f94295c75bbd5
domain: switch
enabled: true
mode: single
- id: '1712419138586'
alias: Device offline watchdog
description: ''
triggers:
- device_id: 86cdb8ce35fb4cbe9a07a87523b5fc18
domain: zha
type: device_offline
subtype: device_offline
trigger: device
- entity_id:
- switch.ironing_room_left
- switch.ironing_room_right
- switch.ironing_room_ironing_table
- switch.ironing_room_magpie
to: unavailable
for:
hours: 0
minutes: 5
seconds: 0
trigger: state
- entity_id:
- button.gas_meter_sensor_identify_3
for:
hours: 0
minutes: 5
seconds: 0
to: unavailable
trigger: state
conditions: []
actions:
- data:
title: Watchdog
message: Device {{ trigger.from_state.name }} is {{ trigger.to_state.state }}
action: notify.martin
mode: single
- id: '1712427494133'
alias: Turn off magpie iron - no motion
description: ''
trigger:
- platform: numeric_state
entity_id:
- sensor.ironing_room_magpie_current_consumption
for:
hours: 0
minutes: 0
seconds: 10
above: 10
condition:
- condition: state
entity_id: input_select.ironing_room_motion_status
state: idle
action:
- service: notify.michelle
data:
title: Ironing Room Alert!
message: No Motion Detected - Turning off Magpie Iron
- service: switch.turn_off
metadata: {}
data: {}
target:
device_id: 470ad9c5b6b7072c0a5242574bd5cd9b
mode: single
- id: '1712427569780'
alias: Turn off irons left - no motion
description: ''
trigger:
- platform: numeric_state
entity_id:
- sensor.ironing_room_left_current_consumption
for:
hours: 0
minutes: 0
seconds: 10
above: 10
condition:
- condition: state
entity_id: input_select.ironing_room_motion_status
state: idle
action:
- service: notify.michelle
data:
title: Ironing Room Alert!
message: No Motion Detected - Turning off Irons (Left)
- service: switch.turn_off
metadata: {}
data: {}
target:
device_id: 22221819a3f597cc0fb30e68142919f0
mode: single
- id: '1712427655992'
alias: Turn off irons right - no motion
description: ''
trigger:
- platform: numeric_state
entity_id:
- sensor.ironing_room_right_current_consumption
for:
hours: 0
minutes: 0
seconds: 10
above: 10
condition:
- condition: state
entity_id: input_select.ironing_room_motion_status
state: idle
action:
- service: notify.michelle
data:
title: Ironing Room Alert!
message: No Motion Detected - Turning off Irons (Right)
- service: switch.turn_off
metadata: {}
data: {}
target:
device_id: 42c2ee13a1fe93fe8f0122b894a1ea74
mode: single
- id: '1714148432236'
alias: Turn off conservatory Heater when warm
description: ''
triggers:
- type: temperature
device_id: 1464525c67b978b454de6a6b35724dbd
entity_id: 6b23f364cf47b36a714a15d256f70949
domain: sensor
trigger: device
above: 21
for:
hours: 0
minutes: 0
seconds: 0
conditions: []
actions:
- type: turn_off
device_id: 690c237894576165879d1fb21a2aa627
entity_id: 3333f53a468f9108927bc5e6fc9bb161
domain: switch
mode: single
- id: '1714314533892'
alias: Turn on 3D Printer Light
description: Turns on 3D Printer light when 3D printer is turned on
trigger:
- platform: numeric_state
entity_id:
- sensor.3d_printer_current_consumption
for:
hours: 0
minutes: 0
seconds: 5
above: 2
condition: []
action:
- service: switch.turn_on
metadata: {}
data: {}
target:
device_id: 92e4838c6495a1d38dcfd55c46d31afe
mode: single
- id: '1714314593069'
alias: Turn off 3D Printer light
description: Turns off 3D Printer light when 3D printer is turned off
trigger:
- platform: numeric_state
entity_id:
- sensor.3d_printer_current_consumption
for:
hours: 0
minutes: 0
seconds: 5
below: 2
condition: []
action:
- service: switch.turn_off
target:
device_id:
- 92e4838c6495a1d38dcfd55c46d31afe
data: {}
mode: single
- id: '1714340821923'
alias: Turn off conservatory heater during the night
description: ''
triggers:
- type: temperature
device_id: 1464525c67b978b454de6a6b35724dbd
entity_id: 6b23f364cf47b36a714a15d256f70949
domain: sensor
trigger: device
above: 18
for:
hours: 0
minutes: 0
seconds: 0
- at: '23:00:00'
trigger: time
conditions:
- condition: time
after: '23:00:00'
before: 06:30:00
actions:
- type: turn_off
device_id: 690c237894576165879d1fb21a2aa627
entity_id: 3333f53a468f9108927bc5e6fc9bb161
domain: switch
mode: single
- id: '1714370785072'
alias: Turn on conservatory heater when cold
description: ''
triggers:
- trigger: time_pattern
minutes: '15'
conditions:
- type: is_not_open
condition: device
device_id: 49bce74c821c42fd980c192606b57418
entity_id: 319f694734396d89e5a6f6fa6ee17a56
domain: binary_sensor
- condition: time
after: 06:00:00
before: '23:00:00'
- condition: numeric_state
entity_id: sensor.conservatory_th_sensor_lcd_temperature
below: 18
actions:
- type: turn_on
device_id: 690c237894576165879d1fb21a2aa627
entity_id: 3333f53a468f9108927bc5e6fc9bb161
domain: switch
mode: single
- id: '1748977016554'
alias: Kitchen Sink Water Leak Notification
description: ''
triggers:
- type: moist
device_id: d126aca79aab093013c364369011e804
entity_id: 2d6664ac9e985b9adea50e7a520e1d3b
domain: binary_sensor
trigger: device
for:
hours: 0
minutes: 0
seconds: 10
conditions: []
actions:
- action: notify.adults
metadata: {}
data:
message: Water detected under Kitchen sink
title: Water Leak
enabled: true
- action: notify.martin
metadata: {}
data:
message: Water detected under Kitcken Sink
title: Water Leak
enabled: false
- action: tts.voicerss_say
metadata: {}
data:
cache: false
entity_id: media_player.kitchen
message: Water leak detected under kitchen sink
mode: single
- id: '1754253696584'
alias: Tesla Charging - Charging
description: ''
triggers:
- entity_id:
- sensor.tesla_charger_current_consumption
above: '100'
trigger: numeric_state
for:
hours: 0
minutes: 0
seconds: 10
conditions: []
actions:
- data:
option: charging
action: input_select.select_option
target:
entity_id: input_select.tesla_charging_status
mode: single
- id: '1754254191874'
alias: Tesla Charging - Finished
description: ''
triggers:
- entity_id:
- sensor.tesla_charger_current_consumption
trigger: numeric_state
for:
hours: 0
minutes: 5
seconds: 0
below: 100
conditions:
- condition: state
entity_id: input_select.tesla_charging_status
state: charging
actions:
- data:
option: finished
action: input_select.select_option
target:
entity_id: input_select.tesla_charging_status
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- data:
option: idle
action: input_select.select_option
target:
entity_id: input_select.tesla_charging_status
- action: notify.martin
metadata: {}
data:
message: Charging completed
title: Tesla
enabled: false
mode: single
- id: '1756499601267'
alias: Dynamic Tesla Solar Charging
description: Adjust Tesla charging current based on solar excess with 200W grid
import tolerance
triggers:
- entity_id:
- sensor.owl_solar_generating
- sensor.owl_electricity_power
- sensor.tesla_ble_charge_level
- sensor.tesla_ble_charge_limit
trigger: state
conditions:
- condition: state
entity_id: binary_sensor.tesla_ble_charge_flap
state: 'on'
actions:
- data:
name: Tesla Solar Charging
message: 'Solar={{ solar }}W, House={{ house }}W, CarPower={{ car_power }}W,
Excess={{ excess_power }}W, Available={{ available_power }}W, SOC={{ soc }}%,
Limit={{ soc_limit }}%, CurrentSetting={{ current_setting }}A, ChargerOn={{
charger_on }} → Target={{ target_amps }}A
'
action: logbook.log
- choose:
- conditions:
- condition: template
value_template: '{{ target_amps == 0 }}'
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ current_setting != 10 }}'
sequence:
- target:
entity_id: number.tesla_ble_charging_amps
data:
value: 10
action: number.set_value
- choose:
- conditions:
- condition: template
value_template: '{{ charger_on }}'
sequence:
- target:
entity_id: switch.tesla_ble_charger
action: switch.turn_off
data: {}
- data:
name: Tesla Solar Charging
message: Stopping charging Import too high or SOC limit reached.
action: logbook.log
- conditions:
- condition: template
value_template: '{{ target_amps > 0 and target_amps < 5 }}'
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ current_setting != target_amps }}'
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ current_setting != 5 }}'
sequence:
- target:
entity_id: number.tesla_ble_charging_amps
data:
value: 5
action: number.set_value
- delay: 00:00:20
- target:
entity_id: number.tesla_ble_charging_amps
data:
value: '{{ target_amps }}'
action: number.set_value
- choose:
- conditions:
- condition: template
value_template: '{{ not charger_on }}'
sequence:
- target:
entity_id: switch.tesla_ble_charger
action: switch.turn_on
data: {}
- conditions:
- condition: template
value_template: '{{ target_amps >= 5 }}'
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ current_setting != target_amps }}'
sequence:
- target:
entity_id: number.tesla_ble_charging_amps
data:
value: '{{ target_amps }}'
action: number.set_value
- choose:
- conditions:
- condition: template
value_template: '{{ not charger_on }}'
sequence:
- target:
entity_id: switch.tesla_ble_charger
action: switch.turn_on
data: {}
- delay: 00:01:00
mode: single
variables:
solar: '{{ states(''sensor.owl_solar_generating'') | float(0) }}'
house: '{{ states(''sensor.owl_electricity_power'') | float(0) }}'
voltage: '{{ states(''sensor.tesla_charger_voltage'') | float(230) }}'
soc: '{{ states(''sensor.tesla_ble_charge_level'') | float(0) }}'
soc_limit: '{{ states(''sensor.tesla_ble_charge_limit'') | float(100) }}'
current_setting: '{{ states(''number.tesla_ble_charging_amps'') | float(0) }}'
charger_on: '{{ is_state(''switch.tesla_ble_charger'',''on'') }}'
car_power: '{{ (voltage * current_setting) if charger_on else 0 }}'
excess_power: '{{ solar - (house - car_power) }}'
allowed_import: 200
available_power: '{{ excess_power + allowed_import }}'
target_amps: "{% if soc >= soc_limit %}\n 0\n{% else %}\n {% set amps = (available_power\
\ / voltage) | int %}\n {% if amps < 2 %} 0\n {% elif amps > 10 %} 10\n {%\
\ else %} {{ amps }}\n {% endif %}\n{% endif %}\n"