Compare commits
18 Commits
2026.3.1
...
temp_fixes
| Author | SHA1 | Date | |
|---|---|---|---|
|
65309bfa39
|
|||
|
8ea1d4ca2b
|
|||
|
9f6f35c848
|
|||
|
25fe4bef13
|
|||
|
ea1985cf91
|
|||
|
cdfbb6023b
|
|||
|
6157abce18
|
|||
|
379de46d05
|
|||
|
f6c2f99b11
|
|||
|
f4e809317b
|
|||
|
71c4affd3c
|
|||
|
eef92467de
|
|||
|
eab0a507b7
|
|||
|
979e253ff0
|
|||
|
3aa5a1a462
|
|||
|
fc9bcc9db6
|
|||
|
57023115f1
|
|||
|
faeeb64696
|
@@ -1 +1 @@
|
|||||||
2026.3.1
|
2026.4.0
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -23,6 +23,7 @@
|
|||||||
/lightwand/
|
/lightwand/
|
||||||
/bubble/Scratchpad/
|
/bubble/Scratchpad/
|
||||||
/custom_icons
|
/custom_icons
|
||||||
|
/bubble_card
|
||||||
|
|
||||||
# ignore any of these files no matter where they are using double *
|
# ignore any of these files no matter where they are using double *
|
||||||
**.DS_Store
|
**.DS_Store
|
||||||
|
|||||||
325
automations.yaml
325
automations.yaml
@@ -1,33 +1,35 @@
|
|||||||
- id: '1640833273099'
|
- id: '1640833273099'
|
||||||
alias: NWS Announce Weather Alert for Tornado
|
alias: NWS Announce Weather Alert for Tornado
|
||||||
description: ''
|
description: ''
|
||||||
trigger:
|
triggers:
|
||||||
- platform: numeric_state
|
- trigger: state
|
||||||
entity_id: sensor.weatheralerts_active_alerts
|
entity_id:
|
||||||
attribute: tornado_warning_count
|
- binary_sensor.tornado_warning
|
||||||
above: '0'
|
from:
|
||||||
condition:
|
- 'off'
|
||||||
|
to:
|
||||||
|
- 'on'
|
||||||
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
action:
|
actions:
|
||||||
- service: input_boolean.turn_on
|
- data: {}
|
||||||
data: {}
|
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.tornado_alarm
|
entity_id: input_boolean.tornado_alarm
|
||||||
- service: input_boolean.turn_off
|
action: input_boolean.turn_on
|
||||||
data: {}
|
- data: {}
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.white_noise_kallen_bedroom
|
- input_boolean.white_noise_kallen_bedroom
|
||||||
- input_boolean.white_noise_basement
|
- input_boolean.white_noise_basement
|
||||||
- input_boolean.white_noise_emma_bedroom
|
- input_boolean.white_noise_emma_bedroom
|
||||||
alias: Turn off white noise
|
alias: Turn off white noise
|
||||||
- service: script.turn_on
|
action: input_boolean.turn_off
|
||||||
target:
|
- target:
|
||||||
entity_id: script.max_brightness
|
entity_id: script.max_brightness
|
||||||
- service: script.text_notify
|
action: script.turn_on
|
||||||
data:
|
- data:
|
||||||
type: critical
|
type: critical
|
||||||
title: Tornado Warning - TAKE COVER!
|
title: Tornado Warning - TAKE COVER!
|
||||||
message: The National Weather Service has issued a Tornado Warning for our area.
|
message: The National Weather Service has issued a Tornado Warning for our area.
|
||||||
@@ -35,34 +37,35 @@
|
|||||||
who: all
|
who: all
|
||||||
tag: tornado-warning
|
tag: tornado-warning
|
||||||
alias: CRITICAL PHONE ALERT
|
alias: CRITICAL PHONE ALERT
|
||||||
- service: script.tv_notify
|
action: script.text_notify
|
||||||
data:
|
- data:
|
||||||
who: all
|
who: all
|
||||||
title: Tornado Warning - TAKE COVER!
|
title: Tornado Warning - TAKE COVER!
|
||||||
message: The National Weather Service has issued a Tornado Warning for our area.
|
message: The National Weather Service has issued a Tornado Warning for our area.
|
||||||
Take Cover NOW!!!!
|
Take Cover NOW!!!!
|
||||||
alias: TV Alert
|
alias: TV Alert
|
||||||
- service: script.speech_engine
|
action: script.tv_notify
|
||||||
data:
|
- data:
|
||||||
who: everywhere
|
who: everywhere
|
||||||
message: A tornado warning has been issued, please take cover immediately! A
|
message: A tornado warning has been issued, please take cover immediately! A
|
||||||
tornado warning has been issued, please take cover immediately! A tornado
|
tornado warning has been issued, please take cover immediately! A tornado
|
||||||
warning has been issued, please take cover immediately!
|
warning has been issued, please take cover immediately!
|
||||||
type: alert
|
type: alert
|
||||||
alias: Elevated TTS alert
|
alias: Elevated TTS alert
|
||||||
|
action: script.speech_engine
|
||||||
- delay:
|
- delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 1
|
minutes: 1
|
||||||
seconds: 0
|
seconds: 0
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
- service: script.speech_engine
|
- data:
|
||||||
data:
|
|
||||||
who: everywhere
|
who: everywhere
|
||||||
message: A tornado warning has been issued, please take cover immediately! A
|
message: A tornado warning has been issued, please take cover immediately! A
|
||||||
tornado warning has been issued, please take cover immediately! A tornado
|
tornado warning has been issued, please take cover immediately! A tornado
|
||||||
warning has been issued, please take cover immediately!
|
warning has been issued, please take cover immediately!
|
||||||
type: critical
|
type: critical
|
||||||
alias: CRITICAL TTS ALERT
|
alias: CRITICAL TTS ALERT
|
||||||
|
action: script.speech_engine
|
||||||
- delay:
|
- delay:
|
||||||
hours: 0
|
hours: 0
|
||||||
minutes: 1
|
minutes: 1
|
||||||
@@ -314,6 +317,12 @@
|
|||||||
minutes: 1
|
minutes: 1
|
||||||
seconds: 0
|
seconds: 0
|
||||||
milliseconds: 0
|
milliseconds: 0
|
||||||
|
- action: input_boolean.turn_on
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.recorder
|
||||||
|
data: {}
|
||||||
|
alias: Turn on Recorder
|
||||||
- data: {}
|
- data: {}
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
@@ -431,52 +440,55 @@
|
|||||||
- id: '1655493590791'
|
- id: '1655493590791'
|
||||||
alias: NWS Announce Weather Alert for Tornado (CLEAR)
|
alias: NWS Announce Weather Alert for Tornado (CLEAR)
|
||||||
description: ''
|
description: ''
|
||||||
trigger:
|
triggers:
|
||||||
- platform: numeric_state
|
- trigger: state
|
||||||
entity_id: sensor.weatheralerts_active_alerts
|
entity_id:
|
||||||
attribute: tornado_warning_count
|
- binary_sensor.tornado_warning
|
||||||
below: '1'
|
from:
|
||||||
condition:
|
- 'on'
|
||||||
|
to:
|
||||||
|
- 'off'
|
||||||
|
conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.tornado_alarm
|
entity_id: input_boolean.tornado_alarm
|
||||||
state: 'on'
|
state: 'on'
|
||||||
action:
|
actions:
|
||||||
- service: script.text_notify
|
- data:
|
||||||
data:
|
|
||||||
type: alert
|
type: alert
|
||||||
who: all
|
who: all
|
||||||
message: clear_notification
|
message: clear_notification
|
||||||
tag: tornado-warning
|
tag: tornado-warning
|
||||||
alias: Clear critical notification
|
alias: Clear critical notification
|
||||||
- service: input_boolean.turn_off
|
action: script.text_notify
|
||||||
data: {}
|
- data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.tornado_alarm
|
entity_id: input_boolean.tornado_alarm
|
||||||
- service: script.volume_reset
|
action: input_boolean.turn_off
|
||||||
data: {}
|
- data: {}
|
||||||
- service: script.max_brightness_cleanup
|
action: script.volume_reset
|
||||||
data: {}
|
- data: {}
|
||||||
- service: script.text_notify
|
action: script.max_brightness_cleanup
|
||||||
data:
|
- data:
|
||||||
title: Tornado Warning is cleared
|
title: Tornado Warning is cleared
|
||||||
message: Check your surroundings and make sure it is safe to leave cover
|
message: Check your surroundings and make sure it is safe to leave cover
|
||||||
who: all
|
who: all
|
||||||
type: alert
|
type: alert
|
||||||
tag: tornado-cleared
|
tag: tornado-cleared
|
||||||
- service: script.tv_notify
|
action: script.text_notify
|
||||||
data:
|
- data:
|
||||||
title: Tornado Warning is cleared
|
title: Tornado Warning is cleared
|
||||||
message: Check your surroundings and make sure it is safe to leave cover
|
message: Check your surroundings and make sure it is safe to leave cover
|
||||||
who: all
|
who: all
|
||||||
- service: script.speech_engine
|
action: script.tv_notify
|
||||||
data:
|
- data:
|
||||||
who: everywhere
|
who: everywhere
|
||||||
message: Tornado warning has been cleared. Check your surroundings and make
|
message: Tornado warning has been cleared. Check your surroundings and make
|
||||||
sure it is safe to leave cover.
|
sure it is safe to leave cover.
|
||||||
type: alert
|
type: alert
|
||||||
|
action: script.speech_engine
|
||||||
- wait_template: '{{ is_state(''input_boolean.tornado_alarm'',''on'') }}'
|
- wait_template: '{{ is_state(''input_boolean.tornado_alarm'',''on'') }}'
|
||||||
continue_on_timeout: true
|
continue_on_timeout: true
|
||||||
timeout: 00:05:00
|
timeout: 00:05:00
|
||||||
@@ -497,15 +509,15 @@
|
|||||||
alias: After audible notifications off
|
alias: After audible notifications off
|
||||||
alias: Should audible notifications be off
|
alias: Should audible notifications be off
|
||||||
then:
|
then:
|
||||||
- service: input_boolean.turn_off
|
- data: {}
|
||||||
data: {}
|
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.audible_notifications
|
entity_id: input_boolean.audible_notifications
|
||||||
|
action: input_boolean.turn_off
|
||||||
else:
|
else:
|
||||||
- service: input_boolean.turn_on
|
- data: {}
|
||||||
data: {}
|
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.audible_notifications
|
entity_id: input_boolean.audible_notifications
|
||||||
|
action: input_boolean.turn_on
|
||||||
else:
|
else:
|
||||||
- stop: Tornado alert re-activated
|
- stop: Tornado alert re-activated
|
||||||
mode: single
|
mode: single
|
||||||
@@ -979,38 +991,44 @@
|
|||||||
alias: Tornado Watch Handling
|
alias: Tornado Watch Handling
|
||||||
description: Controls the input boolean for tornado watches, for use in briefings
|
description: Controls the input boolean for tornado watches, for use in briefings
|
||||||
or automations
|
or automations
|
||||||
trigger:
|
triggers:
|
||||||
- platform: numeric_state
|
- alias: Watch Issued
|
||||||
entity_id: sensor.weatheralerts_active_alerts
|
entity_id:
|
||||||
attribute: tornado_watch_count
|
- binary_sensor.tornado_watch
|
||||||
above: 0
|
|
||||||
id: watch_issued
|
id: watch_issued
|
||||||
alias: Watch Issued
|
trigger: state
|
||||||
- platform: numeric_state
|
from:
|
||||||
entity_id: sensor.weatheralerts_active_alerts
|
- 'off'
|
||||||
attribute: tornado_watch_count
|
to:
|
||||||
below: 1
|
- 'on'
|
||||||
id: watch_cleared
|
- alias: Watch Issued
|
||||||
alias: Watch Cleared
|
entity_id:
|
||||||
condition: []
|
- binary_sensor.tornado_watch
|
||||||
action:
|
id: watch_issued
|
||||||
|
trigger: state
|
||||||
|
from:
|
||||||
|
- 'on'
|
||||||
|
to:
|
||||||
|
- 'off'
|
||||||
|
conditions: []
|
||||||
|
actions:
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: watch_issued
|
id: watch_issued
|
||||||
sequence:
|
sequence:
|
||||||
- service: input_boolean.turn_on
|
- data: {}
|
||||||
data: {}
|
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.tornado_watch
|
entity_id: input_boolean.tornado_watch
|
||||||
|
action: input_boolean.turn_on
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: watch_cleared
|
id: watch_cleared
|
||||||
sequence:
|
sequence:
|
||||||
- service: input_boolean.turn_off
|
- data: {}
|
||||||
data: {}
|
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.tornado_watch
|
entity_id: input_boolean.tornado_watch
|
||||||
|
action: input_boolean.turn_off
|
||||||
alias: Control input boolean
|
alias: Control input boolean
|
||||||
mode: restart
|
mode: restart
|
||||||
- id: '1679104710155'
|
- id: '1679104710155'
|
||||||
@@ -6405,3 +6423,182 @@
|
|||||||
data: {}
|
data: {}
|
||||||
alias: Disable Recorder
|
alias: Disable Recorder
|
||||||
mode: restart
|
mode: restart
|
||||||
|
- id: '1773604271398'
|
||||||
|
alias: Emma Bedroom Climate Interlock
|
||||||
|
description: Makes sure only one climate device can be enabled at one time, to protect
|
||||||
|
from blowing a breaker
|
||||||
|
triggers:
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.emma_bedroom_aircon_installed
|
||||||
|
from:
|
||||||
|
- 'off'
|
||||||
|
to:
|
||||||
|
- 'on'
|
||||||
|
id: aircon
|
||||||
|
alias: Aircon Installed
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.emma_bedroom_heater_installed
|
||||||
|
from:
|
||||||
|
- 'off'
|
||||||
|
to:
|
||||||
|
- 'on'
|
||||||
|
id: heater
|
||||||
|
alias: Heater Installed
|
||||||
|
conditions: []
|
||||||
|
actions:
|
||||||
|
- alias: Routing
|
||||||
|
choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- aircon
|
||||||
|
alias: Aircon Installed
|
||||||
|
sequence:
|
||||||
|
- action: climate.turn_off
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: climate.emma_bedroom_vtherm
|
||||||
|
data: {}
|
||||||
|
alias: Turn off heater thermostat
|
||||||
|
- action: input_boolean.turn_off
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.emma_bedroom_heater_installed
|
||||||
|
data: {}
|
||||||
|
alias: Remove heater
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- heater
|
||||||
|
alias: Heater Installed
|
||||||
|
sequence:
|
||||||
|
- action: climate.turn_off
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: climate.emma_bedroom_aircon
|
||||||
|
data: {}
|
||||||
|
alias: Turn off aircon
|
||||||
|
- action: input_boolean.turn_off
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.emma_bedroom_aircon_installed
|
||||||
|
data: {}
|
||||||
|
alias: Remove aircon
|
||||||
|
mode: restart
|
||||||
|
- id: '1773964427974'
|
||||||
|
alias: Temperature Window Alert
|
||||||
|
description: Alert when the temperature outside gets too cold or too hot for having
|
||||||
|
windows open
|
||||||
|
triggers:
|
||||||
|
- trigger: numeric_state
|
||||||
|
entity_id:
|
||||||
|
- weather.iron_nerd_weather_station
|
||||||
|
attribute: temperature
|
||||||
|
below: 50
|
||||||
|
id: cold
|
||||||
|
alias: Cold
|
||||||
|
- trigger: numeric_state
|
||||||
|
entity_id:
|
||||||
|
- weather.iron_nerd_weather_station
|
||||||
|
attribute: temperature
|
||||||
|
above: 80
|
||||||
|
id: hot
|
||||||
|
alias: Hot
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.windows
|
||||||
|
state:
|
||||||
|
- 'on'
|
||||||
|
actions:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- cold
|
||||||
|
alias: Cold
|
||||||
|
sequence:
|
||||||
|
- action: script.speech_engine
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
who: everywhere
|
||||||
|
message: It has gotten a bit chilly outside, and there are windows open.
|
||||||
|
Please consider closing them!
|
||||||
|
type: weather
|
||||||
|
alias: Play announcement for cold
|
||||||
|
- conditions:
|
||||||
|
- alias: Hot
|
||||||
|
condition: trigger
|
||||||
|
id:
|
||||||
|
- hot
|
||||||
|
sequence:
|
||||||
|
- alias: Play announcement for hot
|
||||||
|
action: script.speech_engine
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
who: everywhere
|
||||||
|
message: It has gotten pretty hot outside, and there are windows open. Please
|
||||||
|
consider closing them!
|
||||||
|
type: weather
|
||||||
|
alias: Routing
|
||||||
|
mode: restart
|
||||||
|
- id: '1774435563540'
|
||||||
|
alias: Emma Bedtime Reminder
|
||||||
|
description: We keep losing track of time and putting Emma to bed later than we
|
||||||
|
mean to. This aims to remedy that.
|
||||||
|
triggers:
|
||||||
|
- trigger: time
|
||||||
|
at:
|
||||||
|
entity_id: input_datetime.emma_bedtime
|
||||||
|
offset: -00:30:00
|
||||||
|
id: prewarn
|
||||||
|
alias: Pre-warning
|
||||||
|
- alias: Bedtime
|
||||||
|
trigger: time
|
||||||
|
at: input_datetime.emma_bedtime
|
||||||
|
id: bedtime
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.emma_sleeping
|
||||||
|
state:
|
||||||
|
- 'off'
|
||||||
|
actions:
|
||||||
|
- alias: Routing
|
||||||
|
choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- prewarn
|
||||||
|
alias: Prewarn
|
||||||
|
sequence:
|
||||||
|
- action: script.speech_engine
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
who: living_room
|
||||||
|
message: Hey, it is getting close to Emma's bedtime. Just making sure you
|
||||||
|
don't lose track of time.
|
||||||
|
type: alert
|
||||||
|
alias: Play pre-warning announcement
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- bedtime
|
||||||
|
alias: Bedtime
|
||||||
|
sequence:
|
||||||
|
- alias: Play bedtime announcement
|
||||||
|
action: script.speech_engine
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
who: living_room
|
||||||
|
message: Hey, it is Emma's bedtime. You should probably start getting her
|
||||||
|
ready if you haven't already.
|
||||||
|
type: alert
|
||||||
|
mode: restart
|
||||||
|
- id: '1775084267580'
|
||||||
|
alias: WeatherAlerts Persistent Notification - Defiance
|
||||||
|
description: ''
|
||||||
|
use_blueprint:
|
||||||
|
path: github.com/weatheralerts_persistent_notification_original.yaml
|
||||||
|
input:
|
||||||
|
sensor: sensor.weatheralerts_defiance_ohz004_ohc039
|
||||||
|
|||||||
@@ -0,0 +1,156 @@
|
|||||||
|
blueprint:
|
||||||
|
name: WeatherAlerts – Persistent Notification and Cleanup
|
||||||
|
description: 'Persistent notification for Weather Alerts from a weatheralerts integration sensor,
|
||||||
|
plus automatic cleanup when no active alerts remain for 30 minutes. New alerts
|
||||||
|
and alerts less than 30 minutes old will display as a full alert message in the
|
||||||
|
psrsistent notification. Alerts older than 30 minutes will only display as a
|
||||||
|
short alert event title in the persistent notification.
|
||||||
|
|
||||||
|
'
|
||||||
|
domain: automation
|
||||||
|
input:
|
||||||
|
sensor:
|
||||||
|
name: WeatherAlerts Sensor
|
||||||
|
description: The weatheralerts sensor to monitor
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
domain:
|
||||||
|
- sensor
|
||||||
|
integration: weatheralerts
|
||||||
|
multiple: false
|
||||||
|
reorder: false
|
||||||
|
source_url: https://github.com/custom-components/weatheralerts/raw/refs/heads/master/blueprints/weatheralerts_persistent_notification_original.yaml
|
||||||
|
trigger:
|
||||||
|
- platform: homeassistant
|
||||||
|
event: start
|
||||||
|
- platform: event
|
||||||
|
event_type: component reload
|
||||||
|
event_data:
|
||||||
|
domain: weatheralerts
|
||||||
|
- platform: state
|
||||||
|
entity_id: !input sensor
|
||||||
|
attribute: alert_tracking
|
||||||
|
variables:
|
||||||
|
sensor: !input sensor
|
||||||
|
integration: '{{ state_attr(sensor, ''integration'') or ''weatheralerts'' }}'
|
||||||
|
zone: '{{ state_attr(sensor, ''zone'') or ''unknown'' }}'
|
||||||
|
zone_name: '{{ state_attr(sensor, ''zone_name'') or ''unknown'' }}'
|
||||||
|
notif_id: '{{ integration }}_{{ zone | replace('','',''_'') | lower }}'
|
||||||
|
alert_ids: '{{ state_attr(sensor, ''alert_tracking'') or [] }}'
|
||||||
|
alerts: '{{ state_attr(sensor, ''alerts'') or [] }}'
|
||||||
|
now_ts: '{{ now().timestamp() | float }}'
|
||||||
|
action:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{% set new_ids = alert_ids | selectattr('status','eq','new')
|
||||||
|
| map(attribute='id') | list %} {% set new_alerts_full = alerts | selectattr('id','in',
|
||||||
|
new_ids) | list %} {% set ids = namespace(valid=[]) %} {% for item in alert_ids
|
||||||
|
%}\n {% if item.status == 'old'\n and item.sent is defined and item.sent
|
||||||
|
not in ['null','',none]\n and item.expires is defined and item.expires
|
||||||
|
not in ['null','',none] %}\n {% set sent_ts = as_timestamp(item.sent, default=0)
|
||||||
|
%}\n {% set exp_ts = as_timestamp(item.expires, default=0) %}\n {% if
|
||||||
|
exp_ts > now().timestamp() and (now().timestamp() - sent_ts) < 1800 %}\n {%
|
||||||
|
set ids.valid = ids.valid + [item.id] %}\n {% endif %}\n {% endif %}\n{%
|
||||||
|
endfor %} {% set old_alerts_full = alerts | selectattr('id','in', ids.valid)
|
||||||
|
| list %} {% set ids2 = namespace(valid=[]) %} {% for item in alert_ids %}\n
|
||||||
|
\ {% if item.status == 'old'\n and item.sent is defined and item.sent
|
||||||
|
not in ['null','',none]\n and item.expires is defined and item.expires
|
||||||
|
not in ['null','',none] %}\n {% set sent_ts = as_timestamp(item.sent, default=0)
|
||||||
|
%}\n {% set exp_ts = as_timestamp(item.expires, default=0) %}\n {% if
|
||||||
|
exp_ts > now().timestamp() and (now().timestamp() - sent_ts) >= 1800 %}\n
|
||||||
|
\ {% set ids2.valid = ids2.valid + [item.id] %}\n {% endif %}\n {%
|
||||||
|
endif %}\n{% endfor %} {% set old_alerts_title = alerts | selectattr('id','in',
|
||||||
|
ids2.valid) | list %} {{ new_alerts_full | length > 0 or old_alerts_full |
|
||||||
|
length > 0 or old_alerts_title | length > 0 }}"
|
||||||
|
sequence:
|
||||||
|
- service: persistent_notification.create
|
||||||
|
data:
|
||||||
|
notification_id: '{{ notif_id }}'
|
||||||
|
title: Weather Alerts for {{ zone_name }}
|
||||||
|
message: "{% set new_ids = alert_ids | selectattr('status','eq','new') | map(attribute='id')
|
||||||
|
| list %}\n{% set new_alerts_full = alerts | selectattr('id','in', new_ids)
|
||||||
|
| list %}\n{% set ids = namespace(valid=[]) %}\n{% for item in alert_ids
|
||||||
|
%}\n {% if item.status == 'old'\n and item.sent is defined and item.sent
|
||||||
|
not in ['null','',none]\n and item.expires is defined and item.expires
|
||||||
|
not in ['null','',none] %}\n {% set sent_ts = as_timestamp(item.sent,
|
||||||
|
default=0) %}\n {% set exp_ts = as_timestamp(item.expires, default=0)
|
||||||
|
%}\n {% if exp_ts > now().timestamp() and (now().timestamp() - sent_ts)
|
||||||
|
< 1800 %}\n {% set ids.valid = ids.valid + [item.id] %}\n {% endif
|
||||||
|
%}\n {% endif %}\n{% endfor %}\n{% set old_alerts_full = alerts | selectattr('id','in',
|
||||||
|
ids.valid) | list %}\n{% set ids2 = namespace(valid=[]) %}\n{% for item
|
||||||
|
in alert_ids %}\n {% if item.status == 'old'\n and item.sent is defined
|
||||||
|
and item.sent not in ['null','',none]\n and item.expires is defined
|
||||||
|
and item.expires not in ['null','',none] %}\n {% set sent_ts = as_timestamp(item.sent,
|
||||||
|
default=0) %}\n {% set exp_ts = as_timestamp(item.expires, default=0)
|
||||||
|
%}\n {% if exp_ts > now().timestamp() and (now().timestamp() - sent_ts)
|
||||||
|
>= 1800 %}\n {% set ids2.valid = ids2.valid + [item.id] %}\n {%
|
||||||
|
endif %}\n {% endif %}\n{% endfor %}\n{% set old_alerts_title = alerts
|
||||||
|
| selectattr('id','in', ids2.valid) | list %}\n{% for alert in new_alerts_full
|
||||||
|
%}\n{# — Clean up title — #}\n{% set clean_title = alert.title\n | replace('\\n\\n','<br>')\n
|
||||||
|
\ | replace('\\n',' ')\n | trim %}\n{# — Clean up headline — #}\n{% if
|
||||||
|
alert.NWSheadline and alert.NWSheadline != 'null' %}\n {% set clean_headline
|
||||||
|
= alert.NWSheadline\n | replace('\\n\\n','<br>')\n | replace('\\n','
|
||||||
|
')\n | trim %}\n{% else %}\n {% set clean_headline = \"\" %}\n{% endif
|
||||||
|
%}\n{# — Clean up description — #}\n{% set clean_description = alert.description\n
|
||||||
|
\ | replace('\\n\\n','<br>')\n | replace('\\n',' ')\n | replace('<br>','<br>\\n')\n
|
||||||
|
\ | regex_replace('([A-Z ]+?\\\\.\\\\.\\\\.)', '* <strong>\\\\1</strong>')\n
|
||||||
|
\ | replace('**','*')\n | trim %}\n{# — Optional instruction — #}\n{%
|
||||||
|
if alert.instruction and alert.instruction != 'null' %}\n {% set clean_instruction
|
||||||
|
= alert.instruction\n | replace('\\n\\n','<br>')\n | replace('\\n','
|
||||||
|
')\n | trim %}\n{% else %}\n {% set clean_instruction = \"\" %}\n{%
|
||||||
|
endif %}\n{# — Area — #}\n{% set clean_area = alert.area\n | replace('\\n\\n','<br>')\n
|
||||||
|
\ | replace('\\n',' ')\n | trim %}\n<font color=\"orange\">\n <ha-icon
|
||||||
|
icon=\"{{ alert.icon }}\"></ha-icon>\n</font>\n<strong>\n <font color=\"red\">{{
|
||||||
|
clean_title }}</font>\n</strong><br>\n{% if clean_headline and clean_headline
|
||||||
|
!= 'null' %}\n {{ clean_headline }}<br>\n{% endif %}\n{{ clean_description
|
||||||
|
}}<br>\n* <strong> AREA…</strong> {{ clean_area }}<br><br>\n{% if clean_instruction
|
||||||
|
and clean_instruction != 'null' %}\n{{ clean_instruction }}<br><br>\n{%
|
||||||
|
endif %}\n{% if alert.sent and alert.sent != 'null' %}\n<strong>Alert Sent:</strong>
|
||||||
|
{{ alert.sent }}<br>\n{% endif %}\n{% if alert.effective and alert.effective
|
||||||
|
!= 'null' %}\n<strong>Effective:</strong> {{ alert.effective }}<br>\n{%
|
||||||
|
endif %}\n{% if alert.expires and alert.expires != 'null' %}\n<strong>Expires:</strong>
|
||||||
|
{{ alert.expires }}<br>\n{% endif %}\n{% if alert.onset and alert.onset
|
||||||
|
!= 'null' %}\n<strong>Onset:</strong> {{ alert.onset }}<br>\n{% endif %}\n{%
|
||||||
|
if alert.ends and alert.ends != 'null' %}\n<strong>Ends:</strong> {{ alert.ends
|
||||||
|
}}<br>\n{% endif %}\n{% if not loop.last %}\n <hr>\n{% endif %}\n{% endfor
|
||||||
|
%}\n\n{% if old_alerts_full %}\n <hr>\n{% for alert in old_alerts_full
|
||||||
|
%}\n{# — Clean up title — #}\n{% set clean_title = alert.title\n | replace('\\n\\n','<br>')\n
|
||||||
|
\ | replace('\\n',' ')\n | trim %}\n{# — Clean up headline — #}\n{% if
|
||||||
|
alert.NWSheadline and alert.NWSheadline != 'null' %}\n {% set clean_headline
|
||||||
|
= alert.NWSheadline\n | replace('\\n\\n','<br>')\n | replace('\\n','
|
||||||
|
')\n | trim %}\n{% else %}\n {% set clean_headline = \"\" %}\n{% endif
|
||||||
|
%}\n{# — Clean up description — #}\n{% set clean_description = alert.description\n
|
||||||
|
\ | replace('\\n\\n','<br>')\n | replace('\\n',' ')\n | replace('<br>','<br>\\n')\n
|
||||||
|
\ | regex_replace('([A-Z ]+?\\\\.\\\\.\\\\.)', '* <strong>\\\\1</strong>')\n
|
||||||
|
\ | replace('**','*')\n | trim %}\n{# — Optional instruction — #}\n{%
|
||||||
|
if alert.instruction and alert.instruction != 'null' %}\n {% set clean_instruction
|
||||||
|
= alert.instruction\n | replace('\\n\\n','<br>')\n | replace('\\n','
|
||||||
|
')\n | trim %}\n{% else %}\n {% set clean_instruction = \"\" %}\n{%
|
||||||
|
endif %}\n{# — Area — #}\n{% set clean_area = alert.area\n | replace('\\n\\n','<br>')\n
|
||||||
|
\ | replace('\\n',' ')\n | trim %}\n<font color=\"orange\">\n <ha-icon
|
||||||
|
icon=\"{{ alert.icon }}\"></ha-icon>\n</font>\n<strong>\n <font color=\"red\">{{
|
||||||
|
clean_title }}</font>\n</strong><br>\n{% if clean_headline and clean_headline
|
||||||
|
!= 'null' %}\n {{ clean_headline }}<br>\n{% endif %}\n{{ clean_description
|
||||||
|
}}<br>\n* <strong>AREA…</strong> {{ clean_area }}<br>\n{% if clean_instruction
|
||||||
|
and clean_instruction != 'null' %}\n{{ clean_instruction }}<br>\n{% endif
|
||||||
|
%}\n{% if alert.sent and alert.sent != 'null' %}\n<strong>Alert Sent:</strong>
|
||||||
|
{{ alert.sent }}<br>\n{% endif %}\n{% if alert.effective and alert.effective
|
||||||
|
!= 'null' %}\n<strong>Effective:</strong> {{ alert.effective }}<br>\n{%
|
||||||
|
endif %}\n{% if alert.expires and alert.expires != 'null' %}\n<strong>Expires:</strong>
|
||||||
|
{{ alert.expires }}<br>\n{% endif %}\n{% if alert.onset and alert.onset
|
||||||
|
!= 'null' %}\n<strong>Onset:</strong> {{ alert.onset }}<br>\n{% endif %}\n{%
|
||||||
|
if alert.ends and alert.ends != 'null' %}\n<strong>Ends:</strong> {{ alert.ends
|
||||||
|
}}<br>\n{% endif %}\n{% if not loop.last %}\n <hr>\n{% endif %}\n{% endfor
|
||||||
|
%}\n{% endif %}\n\n{% if old_alerts_title %}\n<hr>\n{% if new_alerts_full
|
||||||
|
%}\n<strong>Other Active Alerts:</strong><br>\n{% else %}\n<strong>Active
|
||||||
|
Alerts:</strong><br>\n{% endif %}\n{% for alert in old_alerts_title %}\n*
|
||||||
|
<font color=\"orange\">\n <ha-icon icon=\"{{ alert.icon }}\"></ha-icon>\n
|
||||||
|
\ </font>\n <strong>{{ alert.title }}<strong><br>\n{% endfor %}\n{% endif
|
||||||
|
%}\n"
|
||||||
|
default:
|
||||||
|
- delay: 00:30:00
|
||||||
|
- service: persistent_notification.dismiss
|
||||||
|
data:
|
||||||
|
notification_id: '{{ notif_id }}'
|
||||||
|
mode: restart
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
const cold = hass?.states[this.config?.main_button_floors?.cold_entity]?.state || '';
|
const cold = hass?.states[this.config?.main_button_floors?.cold_entity]?.state || '';
|
||||||
|
|
||||||
let bg_color = 'var(--bubble-main-background-color)';
|
let bg_color = 'var(--bubble-main-background-color)';
|
||||||
let occupied_color = 'var(--accent-color)';
|
let occupied_color = 'var(--bubble-accent-color)';
|
||||||
let hot_color = 'var(--error-color)';
|
let hot_color = 'var(--error-color)';
|
||||||
let cold_color = 'var(--purple-color)';
|
let cold_color = 'var(--purple-color)';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
main_button_floors:
|
main_button_floors:
|
||||||
name: Main Button Floors
|
name: Main Button Floors
|
||||||
version: '1.1'
|
version: '1.2.1'
|
||||||
creator: Tony Stork
|
creator: Tony Stork
|
||||||
supported:
|
supported:
|
||||||
- button
|
- button
|
||||||
@@ -12,7 +12,7 @@ main_button_floors:
|
|||||||
const cold = hass?.states[this.config?.main_button_floors?.cold_entity]?.state || '';
|
const cold = hass?.states[this.config?.main_button_floors?.cold_entity]?.state || '';
|
||||||
|
|
||||||
let bg_color = 'var(--bubble-main-background-color)';
|
let bg_color = 'var(--bubble-main-background-color)';
|
||||||
let occupied_color = 'var(--accent-color)';
|
let occupied_color = 'var(--bubble-accent-color)';
|
||||||
let hot_color = 'var(--error-color)';
|
let hot_color = 'var(--error-color)';
|
||||||
let cold_color = 'var(--purple-color)';
|
let cold_color = 'var(--purple-color)';
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
const occupancy = hass?.states[this.config?.main_button_outdoors?.occupancy_entity]?.state || '';
|
const occupancy = hass?.states[this.config?.main_button_outdoors?.occupancy_entity]?.state || '';
|
||||||
|
|
||||||
let bg_color = 'var(--bubble-main-background-color)';
|
let bg_color = 'var(--bubble-main-background-color)';
|
||||||
let occupied_color = 'var(--accent-color)';
|
let occupied_color = 'var(--bubble-accent-color)';
|
||||||
|
|
||||||
// Main button background
|
// Main button background
|
||||||
const mainButton = card?.querySelector('.bubble-button-background');
|
const mainButton = card?.querySelector('.bubble-button-background');
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
main_button_outdoors:
|
main_button_outdoors:
|
||||||
name: Main Button Outdoors
|
name: Main Button Outdoors
|
||||||
version: '1.1'
|
version: '1.2.1'
|
||||||
creator: Tony Stork
|
creator: Tony Stork
|
||||||
supported:
|
supported:
|
||||||
- button
|
- button
|
||||||
@@ -10,7 +10,7 @@ main_button_outdoors:
|
|||||||
const occupancy = hass?.states[this.config?.main_button_outdoors?.occupancy_entity]?.state || '';
|
const occupancy = hass?.states[this.config?.main_button_outdoors?.occupancy_entity]?.state || '';
|
||||||
|
|
||||||
let bg_color = 'var(--bubble-main-background-color)';
|
let bg_color = 'var(--bubble-main-background-color)';
|
||||||
let occupied_color = 'var(--accent-color)';
|
let occupied_color = 'var(--bubble-accent-color)';
|
||||||
|
|
||||||
// Main button background
|
// Main button background
|
||||||
const mainButton = card?.querySelector('.bubble-button-background');
|
const mainButton = card?.querySelector('.bubble-button-background');
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
const state = hass?.states[this.config?.entity]?.state || '';
|
const state = hass?.states[this.config?.entity]?.state || '';
|
||||||
|
|
||||||
let bg_color = 'var(--background-color-2)';
|
let bg_color = 'var(--background-color-2)';
|
||||||
let accent_color = 'var(--accent-color)';
|
let accent_color = 'var(--bubble-accent-color)';
|
||||||
|
|
||||||
// Main button background
|
// Main button background
|
||||||
const mainButton = card?.querySelector('.bubble-button-background');
|
const mainButton = card?.querySelector('.bubble-button-background');
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
popup_accent_color_button:
|
popup_accent_color_button:
|
||||||
name: Popup Accent Color Button
|
name: Popup Accent Color Button
|
||||||
version: '1.0'
|
version: '1.1'
|
||||||
creator: Tony Stork
|
creator: Tony Stork
|
||||||
supported:
|
supported:
|
||||||
- button
|
- button
|
||||||
@@ -10,7 +10,7 @@ popup_accent_color_button:
|
|||||||
const state = hass?.states[this.config?.entity]?.state || '';
|
const state = hass?.states[this.config?.entity]?.state || '';
|
||||||
|
|
||||||
let bg_color = 'var(--background-color-2)';
|
let bg_color = 'var(--background-color-2)';
|
||||||
let accent_color = 'var(--accent-color)';
|
let accent_color = 'var(--bubble-accent-color)';
|
||||||
|
|
||||||
// Main button background
|
// Main button background
|
||||||
const mainButton = card?.querySelector('.bubble-button-background');
|
const mainButton = card?.querySelector('.bubble-button-background');
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
// Use the configured color or default to accent color
|
// Use the configured color or default to accent color
|
||||||
let on_color = this.config?.state_color_button?.color
|
let on_color = this.config?.state_color_button?.color
|
||||||
? `var(--${this.config.state_color_button.color})`
|
? `var(--${this.config.state_color_button.color})`
|
||||||
: 'var(--accent-color)';
|
: 'var(--bubble-accent-color)';
|
||||||
|
|
||||||
// Main button background
|
// Main button background
|
||||||
const mainButton = card?.querySelector('.bubble-button-background');
|
const mainButton = card?.querySelector('.bubble-button-background');
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
state_color_button:
|
state_color_button:
|
||||||
name: State Color Button
|
name: State Color Button
|
||||||
version: 1.1.3
|
version: 1.2.0
|
||||||
creator: Tony Stork
|
creator: Tony Stork
|
||||||
supported:
|
supported:
|
||||||
- button
|
- button
|
||||||
@@ -27,7 +27,7 @@ state_color_button:
|
|||||||
// Use the configured color or default to accent color
|
// Use the configured color or default to accent color
|
||||||
let on_color = this.config?.state_color_button?.color
|
let on_color = this.config?.state_color_button?.color
|
||||||
? `var(--${this.config.state_color_button.color})`
|
? `var(--${this.config.state_color_button.color})`
|
||||||
: 'var(--accent-color)';
|
: 'var(--bubble-accent-color)';
|
||||||
|
|
||||||
// Main button background
|
// Main button background
|
||||||
const mainButton = card?.querySelector('.bubble-button-background');
|
const mainButton = card?.querySelector('.bubble-button-background');
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ influxdb:
|
|||||||
- sensor.*_status
|
- sensor.*_status
|
||||||
- sensor.adguard*
|
- sensor.adguard*
|
||||||
- sensor.*response_time*
|
- sensor.*response_time*
|
||||||
|
- sensor.weatheralerts*
|
||||||
entities:
|
entities:
|
||||||
- media_player.living_room_tv
|
- media_player.living_room_tv
|
||||||
- media_player.basement_tv
|
- media_player.basement_tv
|
||||||
@@ -341,6 +342,7 @@ influxdb:
|
|||||||
- sensor.national_tornado_warnings
|
- sensor.national_tornado_warnings
|
||||||
- sensor.national_severe_thunderstorm_warnings
|
- sensor.national_severe_thunderstorm_warnings
|
||||||
- binary_sensor.severe_thunderstorm_warning
|
- binary_sensor.severe_thunderstorm_warning
|
||||||
|
- binary_sensor.tornado_warning
|
||||||
|
|
||||||
logbook:
|
logbook:
|
||||||
include:
|
include:
|
||||||
@@ -470,6 +472,7 @@ prometheus:
|
|||||||
- sensor.*_status
|
- sensor.*_status
|
||||||
- sensor.adguard*
|
- sensor.adguard*
|
||||||
- sensor.*response_time*
|
- sensor.*response_time*
|
||||||
|
- sensor.weatheralerts*
|
||||||
include_entities:
|
include_entities:
|
||||||
- media_player.living_room_tv
|
- media_player.living_room_tv
|
||||||
- media_player.basement_tv
|
- media_player.basement_tv
|
||||||
@@ -520,3 +523,4 @@ prometheus:
|
|||||||
- sensor.national_tornado_warnings
|
- sensor.national_tornado_warnings
|
||||||
- sensor.national_severe_thunderstorm_warnings
|
- sensor.national_severe_thunderstorm_warnings
|
||||||
- binary_sensor.severe_thunderstorm_warning
|
- binary_sensor.severe_thunderstorm_warning
|
||||||
|
- binary_sensor.tornado_warning
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
{% if state_attr('binary_sensor.severe_thunderstorm_warning','considerable_destructive') == true %}
|
{% if state_attr('binary_sensor.severe_thunderstorm_warning','considerable_destructive') == true %}
|
||||||
This storm has the potential to cause considerable damage. Please take shelter and stay safe!
|
This storm has the potential to cause considerable damage. Please take shelter and stay safe!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif states('sensor.weatheralerts_active_alerts') > '0' and method != 'dashboard' %}
|
{% elif states('sensor.weatheralerts_defiance_ohz004_ohc039') > '0' and method != 'dashboard' %}
|
||||||
Current weather alerts: {{ states('sensor.weather_alert_string') }}.
|
Current weather alerts: {{ states('sensor.weather_alert_string') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if method != 'dashboard' %}
|
{% if method != 'dashboard' %}
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
{% set alertStrings = ['are','alerts','They are'] %}
|
{% set alertStrings = ['are','alerts','They are'] %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if states('sensor.weatheralerts_active_alerts') > '0' %}
|
{% if states('sensor.weatheralerts_defiance_ohz004_ohc039') > '0' %}
|
||||||
"There {{ alertStrings[0] }} {{ alerts }} weather {{ alertStrings[1] }} active. {{ alertStrings[2] }}, "
|
"There {{ alertStrings[0] }} {{ alerts }} weather {{ alertStrings[1] }} active. {{ alertStrings[2] }}, "
|
||||||
{{ states('sensor.weather_alert_string') }}.
|
{{ states('sensor.weather_alert_string') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -699,7 +699,7 @@ template:
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
- name: "Lightning Warning"
|
- name: "Lightning Warning"
|
||||||
unique_id: edaddfc4-f7f0-4d75-aada-a2c588afe029
|
unique_id: edaddfc4-f7f0-4d75-aada-a2c588afe029
|
||||||
state: "{{ states('sensor.home_tempest_cloud_sensors_lightning_strikes_last_hour') | int > 0 }}"
|
state: "{{ (states('sensor.home_tempest_cloud_sensors_lightning_strikes_last_hour') | int > 0) or is_state('binary_sensor.home_tempest_cloud_binary_sensors_is_lightning','on') }}"
|
||||||
device_class: safety
|
device_class: safety
|
||||||
attributes:
|
attributes:
|
||||||
current_strikes: "{{ states('sensor.home_tempest_cloud_sensors_lightning_strikes_last_hour') | int }}"
|
current_strikes: "{{ states('sensor.home_tempest_cloud_sensors_lightning_strikes_last_hour') | int }}"
|
||||||
@@ -1442,7 +1442,7 @@ template:
|
|||||||
# previous_rainfall:
|
# previous_rainfall:
|
||||||
# - name: "Past 48h Rainfall"
|
# - name: "Past 48h Rainfall"
|
||||||
# state: "{{ states('sensor.daily_rainfall_in') | float + state_attr('sensor.daily_rainfall_in', 'last_period') | float }}"
|
# state: "{{ states('sensor.daily_rainfall_in') | float + state_attr('sensor.daily_rainfall_in', 'last_period') | float }}"
|
||||||
- name: Weather Alert String
|
- name: Weather Alert String #! REPAIRS NEEDED
|
||||||
unique_id: 66b5f020-0b5e-48ed-92a2-740d2d708b30
|
unique_id: 66b5f020-0b5e-48ed-92a2-740d2d708b30
|
||||||
state: >
|
state: >
|
||||||
{% from 'formatting.jinja' import cleanup %}
|
{% from 'formatting.jinja' import cleanup %}
|
||||||
@@ -1468,14 +1468,14 @@ template:
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
{{ cleanup(getReport()) }}
|
{{ cleanup(getReport()) }}
|
||||||
attributes:
|
attributes:
|
||||||
active_alerts: "{{ states('sensor.weatheralerts_active_alerts') }}"
|
active_alerts: "{{ states('sensor.weatheralerts_defiance_ohz004_ohc039') }}"
|
||||||
icon: >
|
icon: >
|
||||||
{% if (states('sensor.weatheralerts_active_alerts') | int ) > 0 %}
|
{% if (states('sensor.weatheralerts_defiance_ohz004_ohc039') | int ) > 0 %}
|
||||||
mdi:alert
|
mdi:alert
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:alert-remove
|
mdi:alert-remove
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- name: 'Weather Alerts Active - Corrected'
|
- name: 'Weather Alerts Active - Corrected' #! REPAIRS NEEDED
|
||||||
unique_id: e2f51da4-2271-4719-8edf-a28f76ac1e3f
|
unique_id: e2f51da4-2271-4719-8edf-a28f76ac1e3f
|
||||||
state: >
|
state: >
|
||||||
{% from 'formatting.jinja' import cleanup %}
|
{% from 'formatting.jinja' import cleanup %}
|
||||||
@@ -1494,7 +1494,7 @@ template:
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
{{ cleanup(getReport()) }}
|
{{ cleanup(getReport()) }}
|
||||||
icon: >
|
icon: >
|
||||||
{% if (states('sensor.weatheralerts_active_alerts') | int ) > 0 %}
|
{% if (states('sensor.weatheralerts_defiance_ohz004_ohc039') | int ) > 0 %}
|
||||||
mdi:alert
|
mdi:alert
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:alert-remove
|
mdi:alert-remove
|
||||||
@@ -1613,6 +1613,9 @@ sensor:
|
|||||||
# above: 0
|
# above: 0
|
||||||
|
|
||||||
input_boolean:
|
input_boolean:
|
||||||
|
tornado_watch:
|
||||||
|
name: Tornado Watch
|
||||||
|
icon: mdi:message-alert
|
||||||
freeze_warning:
|
freeze_warning:
|
||||||
name: Freeze Warning
|
name: Freeze Warning
|
||||||
icon: mdi:snowflake-alert
|
icon: mdi:snowflake-alert
|
||||||
@@ -1677,6 +1680,185 @@ input_boolean:
|
|||||||
# - service: input_boolean.turn_off
|
# - service: input_boolean.turn_off
|
||||||
# entity_id: input_boolean.freeze_warning
|
# entity_id: input_boolean.freeze_warning
|
||||||
|
|
||||||
|
automation:
|
||||||
|
- id: 80465d92-2e06-4cf0-ba92-33376b28b9db
|
||||||
|
alias: WeatherAlerts - Notify on WeatherAlerts Error
|
||||||
|
description: ""
|
||||||
|
triggers:
|
||||||
|
- entity_id:
|
||||||
|
- sensor.weatheralerts_defiance_ohz004_ohc039
|
||||||
|
trigger: state
|
||||||
|
conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{% set errs =
|
||||||
|
state_attr('sensor.weatheralerts_defiance_ohz004_ohc039','error') %}
|
||||||
|
|
||||||
|
{% if errs is not iterable or errs is string or errs is none %}
|
||||||
|
false
|
||||||
|
{% else %}
|
||||||
|
{% set e0 = errs[0] if errs|length > 0 else none %}
|
||||||
|
{{ e0 is mapping and e0.get('type') not in ['success'] }}
|
||||||
|
{% endif %}
|
||||||
|
actions:
|
||||||
|
- data:
|
||||||
|
title: Weather Alerts Error
|
||||||
|
message: >
|
||||||
|
{% set errs =
|
||||||
|
state_attr('sensor.weatheralerts_defiance_ohz004_ohc039','error') %}
|
||||||
|
|
||||||
|
{% set e0 = errs[0] if errs|length > 0 else {} %}
|
||||||
|
|
||||||
|
**Type:** {{ e0.get('type', 'unknown') }}
|
||||||
|
|
||||||
|
**Status:** {{ e0.get('status', 'unknown') }}
|
||||||
|
|
||||||
|
**Message:** {{ e0.get('message', 'unknown') }}
|
||||||
|
|
||||||
|
**Time:** {{ e0.get('timestamp', 'unknown') }}
|
||||||
|
notification_id: weatheralerts_error_notification_defiance
|
||||||
|
action: persistent_notification.create
|
||||||
|
mode: single
|
||||||
|
|
||||||
|
- id: 3ef6edbc-b24c-4032-a423-5fd3fee64c57
|
||||||
|
alias: WeatherAlerts - Notify on Recovery
|
||||||
|
description: ""
|
||||||
|
triggers:
|
||||||
|
- entity_id: sensor.weatheralerts_defiance_ohz004_ohc039
|
||||||
|
trigger: state
|
||||||
|
conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{% set cur =
|
||||||
|
state_attr('sensor.weatheralerts_defiance_ohz004_ohc039','error')
|
||||||
|
%}
|
||||||
|
|
||||||
|
{% set prev = trigger.from_state.attributes.get('error') if
|
||||||
|
trigger.from_state else none %}
|
||||||
|
|
||||||
|
{% if cur is not iterable or cur is string or cur is none or cur|length ==
|
||||||
|
0 %}
|
||||||
|
false
|
||||||
|
{% else %}
|
||||||
|
{% set cur0 = cur[0] %}
|
||||||
|
{% set prev0 = prev[0] if prev is iterable and prev is not string and prev is not none and prev|length > 0 else none %}
|
||||||
|
{{ cur0.get('type') == 'success' and prev0.get('type') in ['http_error', 'exception'] }}
|
||||||
|
{% endif %}
|
||||||
|
actions:
|
||||||
|
- data:
|
||||||
|
title: Weather Alerts Recovered From Error
|
||||||
|
message: >
|
||||||
|
The Weather Alerts integration has successfully updated after an error.
|
||||||
|
|
||||||
|
{% set errs =
|
||||||
|
state_attr('sensor.weatheralerts_defiance_ohz004_ohc039','error') %}
|
||||||
|
|
||||||
|
{% set e0 = errs[0] if errs|length > 0 else {} %}
|
||||||
|
|
||||||
|
**Type:** {{ e0.get('type', 'unknown') }}
|
||||||
|
|
||||||
|
**Status:** {{ e0.get('status', 'unknown') }}
|
||||||
|
|
||||||
|
**Message:** {{ e0.get('message', 'unknown') }}
|
||||||
|
|
||||||
|
**Time:** {{ e0.get('timestamp', 'unknown') }}
|
||||||
|
notification_id: weatheralerts_notify_on_recovery_defiance
|
||||||
|
action: persistent_notification.create
|
||||||
|
mode: single
|
||||||
|
|
||||||
|
- id: 7b11243f-2154-45f8-bceb-71b83dac5b03
|
||||||
|
alias: WeatherAlerts - All Clear Notification
|
||||||
|
description: ""
|
||||||
|
triggers:
|
||||||
|
- entity_id: sensor.weatheralerts_defiance_ohz004_ohc039
|
||||||
|
trigger: state
|
||||||
|
conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: |-
|
||||||
|
{% set prev = trigger.from_state.state if trigger.from_state else '0' %}
|
||||||
|
{% set cur = trigger.to_state.state if trigger.to_state else '0' %}
|
||||||
|
{{ (prev | int(0)) > 0 and (cur | int(0)) == 0 }}
|
||||||
|
actions:
|
||||||
|
- data:
|
||||||
|
title: Weather alerts cleared
|
||||||
|
message: No active weather alerts remain.
|
||||||
|
notification_id: weatheralerts_all_clear_defiance
|
||||||
|
action: persistent_notification.create
|
||||||
|
mode: single
|
||||||
|
|
||||||
|
# Announce Severe Weather
|
||||||
|
- id: b1bdfbf9-d82e-436f-bc60-77c3abfb077b
|
||||||
|
alias: NWS Announce Weather Alert
|
||||||
|
trigger:
|
||||||
|
- trigger: state
|
||||||
|
entity_id: binary_sensor.severe_thunderstorm_warning
|
||||||
|
from:
|
||||||
|
- "off"
|
||||||
|
to:
|
||||||
|
- "on"
|
||||||
|
id: tstorm-warning
|
||||||
|
- trigger: state
|
||||||
|
entity_id: binary_sensor.tornado_watch
|
||||||
|
from:
|
||||||
|
- "off"
|
||||||
|
to:
|
||||||
|
- "on"
|
||||||
|
id: tornado-watch
|
||||||
|
- trigger: state
|
||||||
|
entity_id: binary_sensor.severe_thunderstorm_watch
|
||||||
|
from:
|
||||||
|
- "off"
|
||||||
|
to:
|
||||||
|
- "on"
|
||||||
|
id: tstorm-watch
|
||||||
|
# - platform: numeric_state
|
||||||
|
# entity_id: sensor.weatheralerts_defiance_ohz004_ohc039
|
||||||
|
# attribute: freeze_warning_count
|
||||||
|
# above: 0
|
||||||
|
# id: freeze-warning
|
||||||
|
action:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: tstorm-warning
|
||||||
|
sequence:
|
||||||
|
- service: script.status_annc
|
||||||
|
data:
|
||||||
|
who: everywhere
|
||||||
|
type: weather
|
||||||
|
call_interruption: 1
|
||||||
|
call_thunderstorm_warning: 1
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: tornado-watch
|
||||||
|
sequence:
|
||||||
|
- service: script.status_annc
|
||||||
|
data:
|
||||||
|
who: everywhere
|
||||||
|
type: weather
|
||||||
|
call_interruption: 1
|
||||||
|
call_tornado_watch: 1
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: tstorm-watch
|
||||||
|
sequence:
|
||||||
|
- service: script.status_annc
|
||||||
|
data:
|
||||||
|
who: everywhere
|
||||||
|
type: weather
|
||||||
|
call_interruption: 1
|
||||||
|
call_thunderstorm_watch: 1
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id: freeze-warning
|
||||||
|
sequence:
|
||||||
|
- service: script.status_annc
|
||||||
|
data:
|
||||||
|
who: everywhere
|
||||||
|
type: weather
|
||||||
|
call_interruption: 1
|
||||||
|
call_freeze_warning: 1
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|
||||||
# refresh_weather_alert_sensors:
|
# refresh_weather_alert_sensors:
|
||||||
|
|||||||
@@ -57,6 +57,6 @@ pyscript:
|
|||||||
allow_all_imports: true
|
allow_all_imports: true
|
||||||
hass_is_global: true
|
hass_is_global: true
|
||||||
|
|
||||||
animated_scenes:
|
# animated_scenes:
|
||||||
|
|
||||||
grad_vol:
|
grad_vol:
|
||||||
@@ -822,51 +822,51 @@ template:
|
|||||||
mdi:lightbulb
|
mdi:lightbulb
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
switch:
|
# switch:
|
||||||
- platform: animated_scenes
|
# - platform: animated_scenes
|
||||||
name: Christmas
|
# name: Christmas
|
||||||
restore: False
|
# restore: False
|
||||||
restore_power: False
|
# restore_power: False
|
||||||
ignore_off: False
|
# ignore_off: False
|
||||||
lights:
|
# lights:
|
||||||
- light.front_porch_light
|
# - light.front_porch_light
|
||||||
colors:
|
# colors:
|
||||||
- color_type: rgb_color
|
# - color_type: rgb_color
|
||||||
color: [255,0,0]
|
# color: [255,0,0]
|
||||||
brightness: 255
|
# brightness: 255
|
||||||
- color_type: rgb_color
|
# - color_type: rgb_color
|
||||||
color: [0,255,0]
|
# color: [0,255,0]
|
||||||
brightness: 255
|
# brightness: 255
|
||||||
transition: 10
|
# transition: 10
|
||||||
change_frequency: 60
|
# change_frequency: 60
|
||||||
change_amount: all
|
# change_amount: all
|
||||||
change_sequence: True
|
# change_sequence: True
|
||||||
animate_brightness: True
|
# animate_brightness: True
|
||||||
animate_color: True
|
# animate_color: True
|
||||||
- platform: animated_scenes
|
# - platform: animated_scenes
|
||||||
name: Christmas Day
|
# name: Christmas Day
|
||||||
restore: False
|
# restore: False
|
||||||
restore_power: False
|
# restore_power: False
|
||||||
ignore_off: False
|
# ignore_off: False
|
||||||
lights:
|
# lights:
|
||||||
- light.living_room_color_1
|
# - light.living_room_color_1
|
||||||
- light.living_room_color_2
|
# - light.living_room_color_2
|
||||||
- light.living_room_color_3
|
# - light.living_room_color_3
|
||||||
- light.tina_lamp_top
|
# - light.tina_lamp_top
|
||||||
- light.tina_lamp_side
|
# - light.tina_lamp_side
|
||||||
colors:
|
# colors:
|
||||||
- color_type: rgb_color
|
# - color_type: rgb_color
|
||||||
color: [255,0,0]
|
# color: [255,0,0]
|
||||||
brightness: 255
|
# brightness: 255
|
||||||
- color_type: rgb_color
|
# - color_type: rgb_color
|
||||||
color: [0,255,0]
|
# color: [0,255,0]
|
||||||
brightness: 255
|
# brightness: 255
|
||||||
transition: 1
|
# transition: 1
|
||||||
change_frequency: 5
|
# change_frequency: 5
|
||||||
change_amount: 3
|
# change_amount: 3
|
||||||
change_sequence: False
|
# change_sequence: False
|
||||||
animate_brightness: True
|
# animate_brightness: True
|
||||||
animate_color: True
|
# animate_color: True
|
||||||
|
|
||||||
#! Unless there is a good reason, do not define multi-room scenes below.
|
#! Unless there is a good reason, do not define multi-room scenes below.
|
||||||
#! Use scripts instead, to avoid some straight-up haunted house bullshit...
|
#! Use scripts instead, to avoid some straight-up haunted house bullshit...
|
||||||
|
|||||||
@@ -125,6 +125,18 @@ alarm_control_panel:
|
|||||||
|
|
||||||
template:
|
template:
|
||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
|
- name: Windows
|
||||||
|
unique_id: 9ff34cd4-c450-45d2-934a-b4a9fd8b93b2
|
||||||
|
device_class: window
|
||||||
|
state: >
|
||||||
|
{% set windows_open = states.binary_sensor
|
||||||
|
| selectattr('attributes.device_class','eq','window')
|
||||||
|
| selectattr('attributes.entity_id','eq',null)
|
||||||
|
| rejectattr('entity_id','search','windows')
|
||||||
|
| selectattr('state','eq','on')
|
||||||
|
| list
|
||||||
|
| count %}
|
||||||
|
{{ windows_open > 0 }}
|
||||||
- name: Living Room Windows
|
- name: Living Room Windows
|
||||||
unique_id: fb4ab414-3ceb-44d2-8276-66027a936329
|
unique_id: fb4ab414-3ceb-44d2-8276-66027a936329
|
||||||
device_class: window
|
device_class: window
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% set alerts = states('weather_alerts_active_corrected') %}
|
{% set alerts = states('weather_alerts_active_corrected') %}
|
||||||
{% if states('sensor.weatheralerts_active_alerts') > '0' %}
|
{% if states('sensor.weatheralerts_defiance_ohz004_ohc039') > '0' %}
|
||||||
"There {% if alerts == '1' %}is{% else %}are{% endif %} {{ states('sensor.weather_alerts_active_corrected') }} weather {% if alerts == '1' %}alert{% else %}alerts{% endif %} active. "
|
"There {% if alerts == '1' %}is{% else %}are{% endif %} {{ states('sensor.weather_alerts_active_corrected') }} weather {% if alerts == '1' %}alert{% else %}alerts{% endif %} active. "
|
||||||
"{% if alerts == '1' %}It is{% else %}They are{% endif %}, "
|
"{% if alerts == '1' %}It is{% else %}They are{% endif %}, "
|
||||||
{{ states('sensor.weather_alert_string') }}.
|
{{ states('sensor.weather_alert_string') }}.
|
||||||
|
|||||||
Reference in New Issue
Block a user