#429 - Updated automations to notify when grid goes up or down.

This commit is contained in:
ccostan 2018-11-14 13:17:28 -05:00
parent 1329c19cad
commit 2c0cdf4bec
1 changed files with 14 additions and 4 deletions

View File

@ -8,6 +8,7 @@
group:
Power:
entities:
- sensor.grid_status
- sensor.powerwall_battery_capacity
- sensor.powerwall_battery_now
- sensor.grid_now
@ -17,7 +18,6 @@ group:
#-------------------------------------------
sensor:
- platform: rest
resource: https://192.168.10.90/api/system_status/grid_status
verify_ssl: false
@ -67,7 +67,17 @@ sensor:
unit_of_measurement: W
#-------------------------------------------
#
# automation:
# Located in the Grafana package. Tweets out Solar Production Daily!
#
automation:
- alias: Notify if Grid is down
hide_entity: True
trigger:
- platform: state
entity_id: sensor.grid_status
action:
- service: script.notify_engine
data_template:
value1: "The electrical grid is reporting to be {{ (trigger.to_state.state)|replace('true', 'up')|replace('false', 'down') }}. Please verify with Tesla App."
who: 'parents'