Mzezman
Executive Member
- Joined
- Nov 13, 2021
- Messages
- 6,040
- Reaction score
- 3,980
I dont have one for 1hr but i do have a 45min oneFinally got round to loading this automation this weekend. Needed a few changes for Alex rather than Google Assistant.
Thanks for this.
Just thought about it, do you perhaps have one for the 1 hour notification as well? (i.e. 1 hour until LoadShedding like ESP)
YAML:
alias: "[Notification] Load shedding (45min warning)"
description: ""
trigger:
- platform: template
value_template: >-
{{
timedelta(minutes=(state_attr("sensor.load_shedding_area_tshwane_3_garsfonteinext3",
"starts_in"))) == timedelta(minutes=45) }}
condition:
- condition: and
conditions:
- condition: time
after: "06:00:00"
before: "21:00:00"
weekday:
- sat
- fri
- thu
- wed
- tue
- mon
- sun
- condition: not
conditions:
- condition: state
entity_id: sensor.load_shedding_stage_eskom
state: Unknown
- condition: state
entity_id: sensor.load_shedding_stage_eskom
state: No Load Shedding
action:
- service: media_player.volume_set
data:
volume_level: 0.18
target:
entity_id: media_player.whole_home
- service: tts.google_translate_say
data:
entity_id: media_player.whole_home
message: Load Shedding starts in 45 minutes.
cache: true
- service: notify.lg_webos_tv_nano75vpa
data:
message: Loadshedding starts in 45 minutes
mode: single

