Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
7a490f2b4d
|
|||
|
a3fe6e269f
|
|||
|
edb1728c02
|
|||
|
81f74cc30d
|
|||
|
391faf170a
|
|||
|
c278db1864
|
|||
|
9ce0012265
|
|||
|
dda8a88fff
|
|||
|
2649af5a7f
|
|||
|
dbfdc9e6ff
|
|||
|
65309bfa39
|
|||
|
8ea1d4ca2b
|
|||
|
9f6f35c848
|
@@ -1 +1 @@
|
|||||||
2026.3.4
|
2026.4.1
|
||||||
238
automations.yaml
238
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
|
||||||
@@ -437,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
|
||||||
@@ -503,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
|
||||||
@@ -985,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'
|
||||||
@@ -6583,3 +6595,101 @@
|
|||||||
ready if you haven't already.
|
ready if you haven't already.
|
||||||
type: alert
|
type: alert
|
||||||
mode: restart
|
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
|
||||||
|
- id: '1775709997448'
|
||||||
|
alias: Basement Heat Disallow
|
||||||
|
description: Turn off the heater when the Heat Allowed toggle is switched off
|
||||||
|
triggers:
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.basement_studio_heat_allowed
|
||||||
|
from:
|
||||||
|
- 'on'
|
||||||
|
to:
|
||||||
|
- 'off'
|
||||||
|
conditions: []
|
||||||
|
actions:
|
||||||
|
- action: climate.turn_off
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: climate.basement_studio_vtherm
|
||||||
|
data: {}
|
||||||
|
mode: restart
|
||||||
|
- id: '1775731411839'
|
||||||
|
alias: Emma Bedroom Mode Switch
|
||||||
|
description: For switching modes when the temperature goes from one extreme at night
|
||||||
|
to the other during the day
|
||||||
|
triggers:
|
||||||
|
- trigger: time
|
||||||
|
at: input_datetime.emma_bedroom_mode_switch
|
||||||
|
id: switch-time
|
||||||
|
alias: Switch Time
|
||||||
|
conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.emma_bedroom_mode_switch
|
||||||
|
state:
|
||||||
|
- 'on'
|
||||||
|
actions:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_select.emma_bedroom_mode_switch
|
||||||
|
state:
|
||||||
|
- To Aircon
|
||||||
|
alias: To Aircon
|
||||||
|
sequence:
|
||||||
|
- action: input_boolean.turn_on
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.emma_bedroom_aircon_installed
|
||||||
|
data: {}
|
||||||
|
alias: Enable aircon, disable heater
|
||||||
|
- action: input_number.set_value
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_number.emma_bedroom_bedtime_temp
|
||||||
|
data:
|
||||||
|
value: 68
|
||||||
|
alias: Set bedtime temp
|
||||||
|
- action: input_select.select_option
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_select.scheduled_climate_mode_emma_bedroom
|
||||||
|
data:
|
||||||
|
option: AC
|
||||||
|
alias: Set scheduled mode to AC
|
||||||
|
- action: switch.turn_on
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: switch.emma_bedroom_climate_watchdog
|
||||||
|
data: {}
|
||||||
|
alias: Turn on climate watchdog
|
||||||
|
- delay:
|
||||||
|
hours: 0
|
||||||
|
minutes: 0
|
||||||
|
seconds: 5
|
||||||
|
milliseconds: 0
|
||||||
|
- action: button.press
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: button.emma_bedroom_bedtime_mode
|
||||||
|
data: {}
|
||||||
|
alias: Activate bedtime mode to apply new settings
|
||||||
|
- delay:
|
||||||
|
hours: 0
|
||||||
|
minutes: 1
|
||||||
|
seconds: 0
|
||||||
|
milliseconds: 0
|
||||||
|
- action: input_boolean.turn_off
|
||||||
|
metadata: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.white_noise_emma_bedroom
|
||||||
|
data: {}
|
||||||
|
alias: Turn off white noise
|
||||||
|
mode: restart
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -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
|
||||||
@@ -471,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
|
||||||
|
|||||||
@@ -162,6 +162,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
'language': 'da',
|
||||||
|
'plural_form': 'english',
|
||||||
|
'phrases': {
|
||||||
|
'year': ['år', 'år', 'år'],
|
||||||
|
'month': ['mnd', 'måned', 'måneder'],
|
||||||
|
'week': ['uge', 'uge', 'uger'],
|
||||||
|
'day': ['dag', 'dag', 'dage'],
|
||||||
|
'hour': ['t.', 'time', 'timer'],
|
||||||
|
'minute': ['min.', 'minut', 'minutter'],
|
||||||
|
'second': ['sek.', 'sekund', 'sekunder'],
|
||||||
|
'millisecond': ['ms.', 'millisekund', 'millisekunder'],
|
||||||
|
'combine': 'og',
|
||||||
|
'error': 'Ugyldig dato',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
'language': 'dk',
|
'language': 'dk',
|
||||||
'plural_form': 'english',
|
'plural_form': 'english',
|
||||||
'phrases': {
|
'phrases': {
|
||||||
@@ -170,7 +186,7 @@
|
|||||||
'week': ['uge', 'uge', 'uger'],
|
'week': ['uge', 'uge', 'uger'],
|
||||||
'day': ['dag', 'dag', 'dage'],
|
'day': ['dag', 'dag', 'dage'],
|
||||||
'hour': ['t.', 'time', 'timer'],
|
'hour': ['t.', 'time', 'timer'],
|
||||||
'minute': ['min.', 'minut', 'minuter'],
|
'minute': ['min.', 'minut', 'minutter'],
|
||||||
'second': ['sek.', 'sekund', 'sekunder'],
|
'second': ['sek.', 'sekund', 'sekunder'],
|
||||||
'millisecond': ['ms.', 'millisekund', 'millisekunder'],
|
'millisecond': ['ms.', 'millisekund', 'millisekunder'],
|
||||||
'combine': 'og',
|
'combine': 'og',
|
||||||
@@ -236,7 +252,7 @@
|
|||||||
'hour': ['ч', 'час', 'часа', 'часов'],
|
'hour': ['ч', 'час', 'часа', 'часов'],
|
||||||
'minute': ['м', 'минута', 'минуты', 'минут'],
|
'minute': ['м', 'минута', 'минуты', 'минут'],
|
||||||
'second': ['с', 'секунда', 'секунды', 'секунд'],
|
'second': ['с', 'секунда', 'секунды', 'секунд'],
|
||||||
'millisecond': ['мс', 'миллисекунда', 'миллисекунды', 'миллисекунд'],
|
'millisecond': ['мс', 'милисекунда', 'милисекунды', 'милисекунд'],
|
||||||
'combine': 'и',
|
'combine': 'и',
|
||||||
'error': 'Неверная дата',
|
'error': 'Неверная дата',
|
||||||
}
|
}
|
||||||
@@ -337,22 +353,6 @@
|
|||||||
'error': 'Érvénytelen dátum',
|
'error': 'Érvénytelen dátum',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'language': 'tr',
|
|
||||||
'plural_form': 'english',
|
|
||||||
'phrases': {
|
|
||||||
'year': ['yıl', 'yıl', 'yıl'],
|
|
||||||
'month': ['ay', 'ay', 'ay'],
|
|
||||||
'week': ['hf', 'hafta', 'hafta'],
|
|
||||||
'day': ['gün', 'gün', 'gün'],
|
|
||||||
'hour': ['sa', 'saat', 'saat'],
|
|
||||||
'minute': ['dk', 'dakika', 'dakika'],
|
|
||||||
'second': ['sn', 'saniye', 'saniye'],
|
|
||||||
'millisecond': ['ms', 'milisaniye', 'milisaniye'],
|
|
||||||
'combine': 've',
|
|
||||||
'error': 'Geçersiz tarih',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
] -%}
|
] -%}
|
||||||
|
|
||||||
{# macro to convert the abbreviated input for the not_use and always_show lists to the full time part names #}
|
{# macro to convert the abbreviated input for the not_use and always_show lists to the full time part names #}
|
||||||
@@ -374,8 +374,33 @@
|
|||||||
macro to split a timedelta in years, months, weeks, days, hours, minutes, seconds and milliseconds
|
macro to split a timedelta in years, months, weeks, days, hours, minutes, seconds and milliseconds
|
||||||
used by the relative time plus macro, set up as a seperate macro so it can be reused
|
used by the relative time plus macro, set up as a seperate macro so it can be reused
|
||||||
#}
|
#}
|
||||||
{%- macro time_split(date, parts=8, compare_date=now(), not_use=[], always_show=['all'], time=true, round_mode='floor') -%}
|
{%- macro time_split(date, parts=8, compare_date=now(), not_use=[], always_show=['all'], time=true, round_mode='floor', duration=false, duration_unit='s') -%}
|
||||||
{#- set defaults for input if not entered #}
|
{#- set defaults for input if not entered #}
|
||||||
|
{%- if date in states | map(attribute='entity_id') -%}
|
||||||
|
{%- if date | has_value and is_state_attr(date, 'device_class', 'duration') -%}
|
||||||
|
{%- set duration = true -%}
|
||||||
|
{%- set duration_unit = state_attr(date, 'unit_of_measurement') -%}
|
||||||
|
{%- set date = states(date) -%}
|
||||||
|
{%- elif date is match('input_datetime') and not state_attr(date, 'has_date') -%}
|
||||||
|
{%- set date = today_at(states(date)) -%}
|
||||||
|
{%- else -%}
|
||||||
|
{%- set date = states(date) -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- if duration and date | is_number -%}
|
||||||
|
{%- set conversion_mapper =
|
||||||
|
{
|
||||||
|
'd': 3600 * 24,
|
||||||
|
'h': 3600,
|
||||||
|
'min': 60,
|
||||||
|
's': 1,
|
||||||
|
'ms': 1/1000,
|
||||||
|
'μs': 1/1000000
|
||||||
|
}
|
||||||
|
-%}
|
||||||
|
{%- set sec = date | float * conversion_mapper[duration_unit] | default(1) -%}
|
||||||
|
{%- set date = now() + timedelta(seconds=sec) -%}
|
||||||
|
{%- endif -%}
|
||||||
{%- set date = date if date is datetime else date | as_datetime('invalid') -%}
|
{%- set date = date if date is datetime else date | as_datetime('invalid') -%}
|
||||||
{%- set compare_date = compare_date if compare_date is datetime else compare_date | as_datetime('invalid') -%}
|
{%- set compare_date = compare_date if compare_date is datetime else compare_date | as_datetime('invalid') -%}
|
||||||
{%- set time = time | bool(true) -%}
|
{%- set time = time | bool(true) -%}
|
||||||
@@ -521,7 +546,7 @@
|
|||||||
{%- else -%} {{- dict(error='No time parts left to output') -}}
|
{%- else -%} {{- dict(error='No time parts left to output') -}}
|
||||||
{%- endif -%} {# 3 #}
|
{%- endif -%} {# 3 #}
|
||||||
{%- endif -%} {# 2 #}
|
{%- endif -%} {# 2 #}
|
||||||
{%- else -%} {{- dict(error='Invalid date input')-}}
|
{%- else -%} {{- dict(error='Invalid date input') -}}
|
||||||
{%- endif -%} {# 1 #}
|
{%- endif -%} {# 1 #}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
@@ -557,7 +582,7 @@
|
|||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{# macro to output a timedelta in a readable format #}
|
{# macro to output a timedelta in a readable format #}
|
||||||
{%- macro relative_time_plus(date, parts=1, abbr=false, language='en', compare_date=now(), not_use=['millisecond'], always_show=[], time=true, round_mode='floor') -%}
|
{%- macro relative_time_plus(date, parts=1, abbr=false, language='en', compare_date=now(), not_use=['millisecond'], always_show=[], time=true, round_mode='floor', duration=false, duration_unit='s') -%}
|
||||||
{#- select correct phrases bases on language input #}
|
{#- select correct phrases bases on language input #}
|
||||||
{%- set phrases = _time_period_phrases -%}
|
{%- set phrases = _time_period_phrases -%}
|
||||||
{%- set languages = phrases | map(attribute='language') | list -%}
|
{%- set languages = phrases | map(attribute='language') | list -%}
|
||||||
@@ -566,7 +591,7 @@
|
|||||||
{%- set plural_form = phrases | selectattr('language', 'eq', language) | map(attribute='plural_form') | list | first -%}
|
{%- set plural_form = phrases | selectattr('language', 'eq', language) | map(attribute='plural_form') | list | first -%}
|
||||||
{%- set abbr = abbr | bool(false) -%}
|
{%- set abbr = abbr | bool(false) -%}
|
||||||
{# split timedelta #}
|
{# split timedelta #}
|
||||||
{%- set time_parts = time_split(date, parts, compare_date, not_use, always_show, time, round_mode) | from_json -%}
|
{%- set time_parts = time_split(date, parts, compare_date, not_use, always_show, time, round_mode, duration, duration_unit) | from_json -%}
|
||||||
{# check for error #}
|
{# check for error #}
|
||||||
{%- if 'error' in time_parts -%}
|
{%- if 'error' in time_parts -%}
|
||||||
{{- time_parts['error'] -}}
|
{{- time_parts['error'] -}}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
{% if is_state(team,'PRE') %}
|
{% if is_state(team,'PRE') %}
|
||||||
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
{% set date = state_attr(team,'date') | as_timestamp | timestamp_custom('%m-%d') %}
|
||||||
{% if date == now().strftime('%m-%d') %}
|
{% if date == now().strftime('%m-%d') %}
|
||||||
The {{ state_attr(team,'friendly_name') }} will be playing today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} at {{ state_attr(team,'venue') }}.
|
The {{ entity_name(team) }} will be playing today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} at {{ state_attr(team,'venue') }}.
|
||||||
{{ sports_str(team,'start') }} is at {{ state_attr(team,'date') | as_timestamp | timestamp_custom('%I:%M %p') }}.
|
{{ sports_str(team,'start') }} is at {{ state_attr(team,'date') | as_timestamp | timestamp_custom('%I:%M %p') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -82,26 +82,26 @@
|
|||||||
{% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %}
|
{% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %}
|
||||||
{% if date == now().strftime('%m-%d') %}
|
{% if date == now().strftime('%m-%d') %}
|
||||||
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
||||||
The {{ state_attr(team,'friendly_name') }} had their game postponed today, and it will be played at a later date.
|
The {{ entity_name(team) }} had their game postponed today, and it will be played at a later date.
|
||||||
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
|
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
|
||||||
The {{ state_attr(team,'friendly_name') }} tied in their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
The {{ entity_name(team) }} tied in their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'team_winner') == true %}
|
{% elif state_attr(team,'team_winner') == true %}
|
||||||
The {{ state_attr(team,'friendly_name') }} won their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
The {{ entity_name(team) }} won their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'opponent_winner') == true %}
|
{% elif state_attr(team,'opponent_winner') == true %}
|
||||||
The {{ state_attr(team,'friendly_name') }} lost their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
The {{ entity_name(team) }} lost their game today against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if state_attr(team,'clock') not in ['postponed','Postponed'] and state_attr(team,'team_record') != None %}
|
{% if state_attr(team,'clock') not in ['postponed','Postponed'] and state_attr(team,'team_record') != None %}
|
||||||
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif yday == date %}
|
{% elif yday == date %}
|
||||||
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
{% if state_attr(team,'clock') in ['postponed','Postponed'] %}
|
||||||
The {{ state_attr(team,'friendly_name') }} had their game postponed yesterday, and it will be played at a later date.
|
The {{ entity_name(team) }} had their game postponed yesterday, and it will be played at a later date.
|
||||||
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
|
{% elif (state_attr(team,'team_score') | int) == state_attr(team,'opponent_score') | int %}
|
||||||
The {{ state_attr(team,'friendly_name') }} tied in their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
The {{ entity_name(team) }} tied in their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'team_winner') == true %}
|
{% elif state_attr(team,'team_winner') == true %}
|
||||||
The {{ state_attr(team,'friendly_name') }} won their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
The {{ entity_name(team) }} won their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }}.
|
||||||
{% elif state_attr(team,'opponent_winner') == true %}
|
{% elif state_attr(team,'opponent_winner') == true %}
|
||||||
The {{ state_attr(team,'friendly_name') }} lost their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
The {{ entity_name(team) }} lost their game yesterday against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} by a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
{% if state_attr(team,'clock') not in ['postponed','Postponed'] %}
|
||||||
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
This brings their record to {{ state_attr(team,'team_record') | replace("-"," and ") }} on the season.
|
||||||
@@ -109,11 +109,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state(team,'IN') %}
|
{% elif is_state(team,'IN') %}
|
||||||
{% if (state_attr(team,'team_score') | int) == (state_attr(team,'opponent_score') | int) %}
|
{% if (state_attr(team,'team_score') | int) == (state_attr(team,'opponent_score') | int) %}
|
||||||
The {{ state_attr(team,'friendly_name') }} are currently tied in their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }} {{ sports_clock(team) }}.
|
The {{ entity_name(team) }} are currently tied in their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }} {{ sports_clock(team) }}.
|
||||||
{% elif (state_attr(team,'team_score') | int) > (state_attr(team,'opponent_score') | int) %}
|
{% elif (state_attr(team,'team_score') | int) > (state_attr(team,'opponent_score') | int) %}
|
||||||
The {{ state_attr(team,'friendly_name') }} are currently winning their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }} {{ sports_clock(team) }}.
|
The {{ entity_name(team) }} are currently winning their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} with a score of {{ state_attr(team,'team_score') }} to {{ state_attr(team,'opponent_score') }} {{ sports_clock(team) }}.
|
||||||
{% else %}
|
{% else %}
|
||||||
The {{ state_attr(team,'friendly_name') }} are currently losing their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} with a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }} {{ sports_clock(team) }}.
|
The {{ entity_name(team) }} are currently losing their game against {% if state_attr(team,'league') != 'NCAAF'%}the{% endif %} {{ opponent_name }} with a score of {{ state_attr(team,'opponent_score') }} to {{ state_attr(team,'team_score') }} {{ sports_clock(team) }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|||||||
@@ -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 %}
|
||||||
|
|||||||
@@ -243,6 +243,10 @@ input_boolean:
|
|||||||
name: Emma Bedroom Heater Installed
|
name: Emma Bedroom Heater Installed
|
||||||
icon: mdi:heating-coil
|
icon: mdi:heating-coil
|
||||||
|
|
||||||
|
emma_bedroom_mode_switch:
|
||||||
|
name: Emma Bedroom Mode Switch
|
||||||
|
icon: mdi:swap-horizontal
|
||||||
|
|
||||||
input_select:
|
input_select:
|
||||||
scheduled_climate_mode_master_bedroom_aircon:
|
scheduled_climate_mode_master_bedroom_aircon:
|
||||||
name: Scheduled Climate Mode - Master Bedroom Aircon
|
name: Scheduled Climate Mode - Master Bedroom Aircon
|
||||||
@@ -273,6 +277,13 @@ input_select:
|
|||||||
- White Noise
|
- White Noise
|
||||||
- N/A
|
- N/A
|
||||||
icon: mdi:home-thermometer
|
icon: mdi:home-thermometer
|
||||||
|
emma_bedroom_mode_switch:
|
||||||
|
name: Emma Bedroom Mode Switch
|
||||||
|
options:
|
||||||
|
- To Aircon
|
||||||
|
- To Heater
|
||||||
|
initial: To Aircon
|
||||||
|
icon: mdi:swap-horizontal
|
||||||
|
|
||||||
input_number:
|
input_number:
|
||||||
master_bedroom_daytime_temp:
|
master_bedroom_daytime_temp:
|
||||||
@@ -401,6 +412,13 @@ input_number:
|
|||||||
step: 1
|
step: 1
|
||||||
unit_of_measurement: °F
|
unit_of_measurement: °F
|
||||||
icon: mdi:thermometer
|
icon: mdi:thermometer
|
||||||
|
emma_bedroom_auto_mode_threshold:
|
||||||
|
name: Emma Bedroom Auto Mode Threshold
|
||||||
|
min: 40
|
||||||
|
max: 80
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: °F
|
||||||
|
icon: mdi:thermometer
|
||||||
kallen_fan_threshold:
|
kallen_fan_threshold:
|
||||||
name: Kallen Fan Threshold
|
name: Kallen Fan Threshold
|
||||||
min: 40
|
min: 40
|
||||||
@@ -597,6 +615,27 @@ input_number:
|
|||||||
step: 1
|
step: 1
|
||||||
unit_of_measurement: °F
|
unit_of_measurement: °F
|
||||||
icon: mdi:thermometer-chevron-down
|
icon: mdi:thermometer-chevron-down
|
||||||
|
window_weather_minimum:
|
||||||
|
name: Window Weather Minimum
|
||||||
|
min: 40
|
||||||
|
max: 80
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: °F
|
||||||
|
icon: mdi:window-closed
|
||||||
|
window_weather_maximum:
|
||||||
|
name: Window Weather Maximum
|
||||||
|
min: 40
|
||||||
|
max: 80
|
||||||
|
step: 1
|
||||||
|
unit_of_measurement: °F
|
||||||
|
icon: mdi:window-closed
|
||||||
|
|
||||||
|
input_datetime:
|
||||||
|
emma_bedroom_mode_switch:
|
||||||
|
name: Emma Bedroom Mode Switch
|
||||||
|
has_date: false
|
||||||
|
has_time: true
|
||||||
|
icon: mdi:swap-horizontal
|
||||||
|
|
||||||
climate:
|
climate:
|
||||||
- platform: generic_thermostat
|
- platform: generic_thermostat
|
||||||
|
|||||||
@@ -742,6 +742,25 @@ template:
|
|||||||
state: "{{ state_attr('binary_sensor.severe_thunderstorm_warning','tornado_possible') }}"
|
state: "{{ state_attr('binary_sensor.severe_thunderstorm_warning','tornado_possible') }}"
|
||||||
device_class: safety
|
device_class: safety
|
||||||
icon: "{{ 'mdi:weather-tornado' if this.state == 'on' else 'mdi:close' }}"
|
icon: "{{ 'mdi:weather-tornado' if this.state == 'on' else 'mdi:close' }}"
|
||||||
|
- name: Window Weather
|
||||||
|
unique_id: 9b119394-cb05-44bb-9c6e-e8d5c882a470
|
||||||
|
state: >
|
||||||
|
{% set minimum_temp = states('input_number.window_weather_minimum') | int %}
|
||||||
|
{% set maximum_temp = states('input_number.window_weather_maximum') | int %}
|
||||||
|
{% set ns = namespace(raining=false) %}
|
||||||
|
{% for entity, dry_state in [
|
||||||
|
('binary_sensor.home_tempest_cloud_binary_sensors_is_raining', 'off'),
|
||||||
|
('sensor.home_tempest_cloud_sensors_precipitation_intensity', 'no_rain'),
|
||||||
|
('sensor.home_tempest_precipitation_type', 'none')
|
||||||
|
] %}
|
||||||
|
{% if states(entity) not in ['unavailable', 'unknown'] %}
|
||||||
|
{% if not is_state(entity, dry_state) %}
|
||||||
|
{% set ns.raining = true %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
{% set temp = state_attr('weather.iron_nerd_weather_station','temperature') %}
|
||||||
|
{{ (not ns.raining) and (minimum_temp <= temp <= maximum_temp) }}
|
||||||
- sensor:
|
- sensor:
|
||||||
# - name: Total Rain Sensors
|
# - name: Total Rain Sensors
|
||||||
# unique_id: b7c2e709-8f5c-4263-aa1d-fa8280afcddb
|
# unique_id: b7c2e709-8f5c-4263-aa1d-fa8280afcddb
|
||||||
@@ -1442,7 +1461,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 +1487,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 +1513,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 +1632,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 +1699,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:
|
||||||
|
|||||||
@@ -31,15 +31,15 @@ input_datetime:
|
|||||||
input_number:
|
input_number:
|
||||||
rabbit_feeding_interval:
|
rabbit_feeding_interval:
|
||||||
name: Rabbit Feeding Interval
|
name: Rabbit Feeding Interval
|
||||||
min: 0
|
min: 1
|
||||||
max: 24
|
max: 24
|
||||||
step: 1
|
step: 1
|
||||||
unit_of_measurement: hours
|
unit_of_measurement: hours
|
||||||
icon: mdi:rabbit
|
icon: mdi:rabbit
|
||||||
rabbit_hutch_cleaning_interval:
|
rabbit_hutch_cleaning_interval:
|
||||||
name: Rabbit Hutch Cleaning Interval
|
name: Rabbit Hutch Cleaning Interval
|
||||||
min: 0
|
min: 1
|
||||||
max: 3
|
max: 14
|
||||||
step: 1
|
step: 1
|
||||||
unit_of_measurement: days
|
unit_of_measurement: days
|
||||||
icon: mdi:rabbit
|
icon: mdi:rabbit
|
||||||
|
|||||||
@@ -376,7 +376,7 @@ intent_script:
|
|||||||
speech:
|
speech:
|
||||||
text: >
|
text: >
|
||||||
{% set location = states(person) %}
|
{% set location = states(person) %}
|
||||||
{% set name = state_attr(person,'friendly_name') %}
|
{% set name = entity_name(person) %}
|
||||||
{% if location in ['away','not_home'] %}
|
{% if location in ['away','not_home'] %}
|
||||||
{{ name }} is currently away from home
|
{{ name }} is currently away from home
|
||||||
{% elif location in ['unavailable','unknown'] %}
|
{% elif location in ['unavailable','unknown'] %}
|
||||||
|
|||||||
@@ -51,79 +51,87 @@ input_datetime:
|
|||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
|
|
||||||
alarm_control_panel:
|
template:
|
||||||
- platform: template
|
- alarm_control_panel:
|
||||||
panels:
|
- name: Nerd Home Alarm Panel
|
||||||
nerdhome_alarm_panel:
|
unique_id: d7eb8335-4998-49bf-957e-231aeed35179
|
||||||
name: Nerd Home Alarm Panel
|
code_arm_required: false
|
||||||
unique_id: d7eb8335-4998-49bf-957e-231aeed35179
|
arm_away:
|
||||||
value_template: "{{ states('alarm_control_panel.stratton_ave_alarm') }}"
|
- if:
|
||||||
code_arm_required: false
|
- condition: state
|
||||||
arm_away:
|
entity_id:
|
||||||
- if:
|
- binary_sensor.security_faults
|
||||||
- condition: state
|
state: 'off'
|
||||||
entity_id: binary_sensor.security_faults
|
match: all
|
||||||
state: 'off'
|
then:
|
||||||
then:
|
- target:
|
||||||
- service: alarm_control_panel.alarm_arm_away
|
entity_id:
|
||||||
target:
|
- alarm_control_panel.stratton_ave_alarm
|
||||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
|
||||||
data:
|
|
||||||
code: !secret ring_alarm_code
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
target:
|
|
||||||
entity_id:
|
|
||||||
- input_boolean.lockdown_issue
|
|
||||||
else:
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.lockdown_issue
|
|
||||||
arm_home:
|
|
||||||
- if:
|
|
||||||
- condition: state
|
|
||||||
entity_id: binary_sensor.security_faults
|
|
||||||
state: 'off'
|
|
||||||
then:
|
|
||||||
- service: alarm_control_panel.alarm_arm_home
|
|
||||||
target:
|
|
||||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
|
||||||
data:
|
|
||||||
code: !secret ring_alarm_code
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
target:
|
|
||||||
entity_id:
|
|
||||||
- input_boolean.lockdown_issue
|
|
||||||
- if:
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ silent != 1 and is_state('input_boolean.vacation_mode','off') }}"
|
|
||||||
then:
|
|
||||||
- service: script.status_annc
|
|
||||||
data:
|
|
||||||
who: living_room
|
|
||||||
call_security_armed: 1
|
|
||||||
else:
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.lockdown_issue
|
|
||||||
disarm:
|
|
||||||
- service: alarm_control_panel.alarm_disarm
|
|
||||||
target:
|
|
||||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
|
||||||
data:
|
data:
|
||||||
code: !secret ring_alarm_code
|
code: !secret ring_alarm_code
|
||||||
- service: input_boolean.turn_off
|
action: alarm_control_panel.alarm_arm_away
|
||||||
target:
|
- target:
|
||||||
entity_id: input_boolean.lockdown_issue
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
action: input_boolean.turn_off
|
||||||
|
else:
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
action: input_boolean.turn_on
|
||||||
|
arm_home:
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id:
|
||||||
|
- binary_sensor.security_faults
|
||||||
|
state: 'off'
|
||||||
|
match: all
|
||||||
|
then:
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- alarm_control_panel.stratton_ave_alarm
|
||||||
|
data:
|
||||||
|
code: !secret ring_alarm_code
|
||||||
|
action: alarm_control_panel.alarm_arm_home
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
action: input_boolean.turn_off
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ silent != 1 and is_state('input_boolean.vacation_mode','off') }}"
|
value_template: "{{ silent != 1 and is_state('input_boolean.vacation_mode','off') }}"
|
||||||
then:
|
then:
|
||||||
- service: script.status_annc
|
- data:
|
||||||
data:
|
|
||||||
who: living_room
|
who: living_room
|
||||||
call_security_not_armed: 1
|
call_security_armed: 1
|
||||||
|
action: script.status_annc
|
||||||
template:
|
else:
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
action: input_boolean.turn_on
|
||||||
|
disarm:
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- alarm_control_panel.stratton_ave_alarm
|
||||||
|
data:
|
||||||
|
code: !secret ring_alarm_code
|
||||||
|
action: alarm_control_panel.alarm_disarm
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
action: input_boolean.turn_off
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ silent != 1 and is_state('input_boolean.vacation_mode','off') }}"
|
||||||
|
then:
|
||||||
|
- data:
|
||||||
|
who: living_room
|
||||||
|
call_security_not_armed: 1
|
||||||
|
action: script.status_annc
|
||||||
|
code_format: number
|
||||||
|
default_entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
|
state: "{{ states('alarm_control_panel.stratton_ave_alarm') }}"
|
||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: Windows
|
- name: Windows
|
||||||
unique_id: 9ff34cd4-c450-45d2-934a-b4a9fd8b93b2
|
unique_id: 9ff34cd4-c450-45d2-934a-b4a9fd8b93b2
|
||||||
@@ -271,7 +279,7 @@ template:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ fn.friendly }}
|
{{ fn.friendly }}
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if states('sensor.window_faults') | int > 0 %}
|
{% if this.state | int > 0 %}
|
||||||
mdi:window-open
|
mdi:window-open
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:window-closed
|
mdi:window-closed
|
||||||
@@ -335,7 +343,7 @@ template:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{{ fn.friendly }}
|
{{ fn.friendly }}
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if states('sensor.door_faults') | int > 0 %}
|
{% if this.state | int > 0 %}
|
||||||
mdi:door-open
|
mdi:door-open
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:door-closed
|
mdi:door-closed
|
||||||
@@ -365,7 +373,7 @@ template:
|
|||||||
| list %}
|
| list %}
|
||||||
{{ window_names }}
|
{{ window_names }}
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if states('sensor.windows_open') | int == 0 %}
|
{% if this.state | int == 0 %}
|
||||||
mdi:window-closed
|
mdi:window-closed
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:window-open
|
mdi:window-open
|
||||||
@@ -392,7 +400,7 @@ template:
|
|||||||
| list %}
|
| list %}
|
||||||
{{ window_names }}
|
{{ window_names }}
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if states('sensor.front_windows_open') | int == 0 %}
|
{% if this.state | int == 0 %}
|
||||||
mdi:window-closed
|
mdi:window-closed
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:window-open
|
mdi:window-open
|
||||||
@@ -418,7 +426,7 @@ template:
|
|||||||
| list | count %}
|
| list | count %}
|
||||||
{{ windows_open }}
|
{{ windows_open }}
|
||||||
icon: >
|
icon: >
|
||||||
{% if states('sensor.living_room_windows_open') | int == 0 %}
|
{% if this.state | int == 0 %}
|
||||||
mdi:window-closed
|
mdi:window-closed
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:window-open
|
mdi:window-open
|
||||||
@@ -442,7 +450,7 @@ template:
|
|||||||
| list %}
|
| list %}
|
||||||
{{ door_names }}
|
{{ door_names }}
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if states('sensor.doors_open') | int == 0 %}
|
{% if this.state | int == 0 %}
|
||||||
mdi:door-closed
|
mdi:door-closed
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:door-open
|
mdi:door-open
|
||||||
@@ -476,7 +484,7 @@ template:
|
|||||||
| list %}
|
| list %}
|
||||||
{{ interior }}
|
{{ interior }}
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if states('sensor.interior_doors') | int == 0 %}
|
{% if this.state | int == 0 %}
|
||||||
mdi:door-closed
|
mdi:door-closed
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:door-open
|
mdi:door-open
|
||||||
@@ -507,7 +515,7 @@ template:
|
|||||||
{% set doors_open = states('sensor.doors_open') | int %}
|
{% set doors_open = states('sensor.doors_open') | int %}
|
||||||
{{ doors_open + windows_open }}
|
{{ doors_open + windows_open }}
|
||||||
icon: >-
|
icon: >-
|
||||||
{% if states('sensor.air_leaks') | int == 0 %}
|
{% if this.state | int == 0 %}
|
||||||
mdi:leak-off
|
mdi:leak-off
|
||||||
{% else %}
|
{% else %}
|
||||||
mdi:leak
|
mdi:leak
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ intent_script:
|
|||||||
{% set inhibit = "binary_sensor." + team + "_inhibit" %}
|
{% set inhibit = "binary_sensor." + team + "_inhibit" %}
|
||||||
{% set sensor = "sensor." + team %}
|
{% set sensor = "sensor." + team %}
|
||||||
{% if is_state(inhibit,'on') %}
|
{% if is_state(inhibit,'on') %}
|
||||||
I do not have any information about the {{ state_attr(team,'friendly_name') }} at this time.
|
I do not have any information about the {{ entity_name(sensor) }} at this time.
|
||||||
{% elif states(sensor) in ["NOT_FOUND"] %}
|
{% elif states(sensor) in ["NOT_FOUND"] %}
|
||||||
They do not appear to have a game scheduled for today.
|
They do not appear to have a game scheduled for today.
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -58,6 +58,8 @@ ## HACS Components
|
|||||||
- [WeatherFlow Forecast](https://github.com/briis/weatherflow_forecast)
|
- [WeatherFlow Forecast](https://github.com/briis/weatherflow_forecast)
|
||||||
- [NWS SPC Outlook](https://github.com/sedward5/nws_spc_outlook)
|
- [NWS SPC Outlook](https://github.com/sedward5/nws_spc_outlook)
|
||||||
- [Music Assistant Queue Actions](https://github.com/droans/mass_queue)
|
- [Music Assistant Queue Actions](https://github.com/droans/mass_queue)
|
||||||
|
- [Bubble Card Tools](https://github.com/Clooos/Bubble-Card-Tools)
|
||||||
|
- [Home Assistant Global Health Score](https://github.com/D-N91/home-assistant-global-health-score)
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -91,7 +93,7 @@ ## HACS Lovelace Cards
|
|||||||
- [Weather Card](https://github.com/bramkragten/weather-card)
|
- [Weather Card](https://github.com/bramkragten/weather-card)
|
||||||
- [Template Entity Row](https://github.com/thomasloven/lovelace-template-entity-row)
|
- [Template Entity Row](https://github.com/thomasloven/lovelace-template-entity-row)
|
||||||
- [Waze Travel Time](https://github.com/r-renato/ha-card-waze-travel-time)
|
- [Waze Travel Time](https://github.com/r-renato/ha-card-waze-travel-time)
|
||||||
- [Fold Entity Row](https://github.com/thomasloven/lovelace-fold-entity-row)
|
- [Lovelace Expander Card](https://github.com/MelleD/lovelace-expander-card)
|
||||||
- [Room Card](https://github.com/marcokreeft87/room-card)
|
- [Room Card](https://github.com/marcokreeft87/room-card)
|
||||||
- [Simple Thermostat Card](https://github.com/nervetattoo/simple-thermostat)
|
- [Simple Thermostat Card](https://github.com/nervetattoo/simple-thermostat)
|
||||||
- [Clock Weather Card](https://github.com/pkissling/clock-weather-card)
|
- [Clock Weather Card](https://github.com/pkissling/clock-weather-card)
|
||||||
|
|||||||
@@ -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