forked from IrishTLR/bruces_homeassistant_config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
automation_powerwall_powercut_actions.yaml
47 lines (43 loc) · 1.35 KB
/
automation_powerwall_powercut_actions.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
automation:
- id: powerwall_powercut_actions
alias: 'Powerwall: Turn off high loads and announce powercut'
mode: single
description: >
Powercut handling
trigger:
- platform: state
id: 'grid_off'
entity_id: binary_sensor.grid_status
to: 'off'
- platform: state
id: 'supply_off'
entity_id: binary_sensor.electricity_supply
to: 'off'
action:
- service: logbook.log
data:
name: Powercut !
entity_id: binary_sensor.grid_status
message: Powercut !
- service: telegram_bot.send_message
data:
target: !secret telegram_chat_id_bruce_and_sarah
title: There is a powercut!
message: "HotTub and Car Chargers switched off. Powerwall capacity is {{ states('sensor.powerwall_charge_corrected') }}%"
- service: script.zappi_mode_paddy
data:
mode: 'Stopped'
- service: script.zappi_mode_jyggy
data:
mode: 'Stopped'
- service: logbook.log
data:
domain: switch
entity_id: climate.spa_climate
name: "Hot Tub"
message: "Heating off for power cut"
- service: climate.set_temperature
target:
entity_id: climate.spa_climate
data:
temperature: 28