Support the use of tags and notification clearing with text_notify
This commit is contained in:
@ -24,6 +24,7 @@
|
|||||||
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!!!!
|
||||||
who: all
|
who: all
|
||||||
|
tag: tornado-warning
|
||||||
alias: CRITICAL PHONE ALERT
|
alias: CRITICAL PHONE ALERT
|
||||||
- service: script.tv_notify
|
- service: script.tv_notify
|
||||||
data:
|
data:
|
||||||
@ -444,6 +445,7 @@
|
|||||||
who: all
|
who: all
|
||||||
title: Low Batteries in House
|
title: Low Batteries in House
|
||||||
message: 'Low battery alert for: {{sensors}}'
|
message: 'Low battery alert for: {{sensors}}'
|
||||||
|
tag: battery-monitoring
|
||||||
- id: '1655493590791'
|
- id: '1655493590791'
|
||||||
alias: NWS Announce Weather Alert for Tornado (CLEAR)
|
alias: NWS Announce Weather Alert for Tornado (CLEAR)
|
||||||
description: ''
|
description: ''
|
||||||
@ -457,6 +459,12 @@
|
|||||||
entity_id: input_boolean.vacation_mode
|
entity_id: input_boolean.vacation_mode
|
||||||
state: 'off'
|
state: 'off'
|
||||||
action:
|
action:
|
||||||
|
- service: notify.all_ios
|
||||||
|
data:
|
||||||
|
message: clear_notification
|
||||||
|
data:
|
||||||
|
tag: tornado-warning
|
||||||
|
alias: Clear critical notification
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
@ -471,6 +479,7 @@
|
|||||||
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
|
||||||
- service: script.tv_notify
|
- service: script.tv_notify
|
||||||
data:
|
data:
|
||||||
title: Tornado Warning is cleared
|
title: Tornado Warning is cleared
|
||||||
|
@ -188,6 +188,7 @@ automation:
|
|||||||
who: "all"
|
who: "all"
|
||||||
title: "Garbage Collection - Unlimited"
|
title: "Garbage Collection - Unlimited"
|
||||||
message: "Tomorrow is large trash pickup day. Please take out all large items, and don't forget the trash can!"
|
message: "Tomorrow is large trash pickup day. Please take out all large items, and don't forget the trash can!"
|
||||||
|
tag: garbage-unlimited
|
||||||
else:
|
else:
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
@ -200,6 +201,7 @@ automation:
|
|||||||
who: "all"
|
who: "all"
|
||||||
title: "Garbage Collection - Regular"
|
title: "Garbage Collection - Regular"
|
||||||
message: "Tomorrow is regular trash pickup day. Make sure the trash can is taken to the curb!"
|
message: "Tomorrow is regular trash pickup day. Make sure the trash can is taken to the curb!"
|
||||||
|
tag: garbage-regular
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: and
|
- condition: and
|
||||||
conditions:
|
conditions:
|
||||||
@ -222,6 +224,7 @@ automation:
|
|||||||
who: "all"
|
who: "all"
|
||||||
title: "Retrieve Garbage Can"
|
title: "Retrieve Garbage Can"
|
||||||
message: "Garbage has been collected. Don't forget to move the trash can back to the house!"
|
message: "Garbage has been collected. Don't forget to move the trash can back to the house!"
|
||||||
|
tag: garbage-retrieve
|
||||||
|
|
||||||
- id: d7641b5e-3cbb-4fb3-b6ed-5edf3157b88d
|
- id: d7641b5e-3cbb-4fb3-b6ed-5edf3157b88d
|
||||||
alias: Kallen Briefing Location Change
|
alias: Kallen Briefing Location Change
|
||||||
@ -261,7 +264,10 @@ script:
|
|||||||
- service: script.text_notify
|
- service: script.text_notify
|
||||||
data:
|
data:
|
||||||
who: "kallen"
|
who: "kallen"
|
||||||
|
title: "Yo Doofus"
|
||||||
message: "Heads up, here comes your nightly briefing!"
|
message: "Heads up, here comes your nightly briefing!"
|
||||||
|
type: normal
|
||||||
|
tag: kallen-nightly-briefing
|
||||||
- delay:
|
- delay:
|
||||||
seconds: 3
|
seconds: 3
|
||||||
- service: script.speech_engine
|
- service: script.speech_engine
|
||||||
|
@ -145,6 +145,8 @@ script:
|
|||||||
who: "parents"
|
who: "parents"
|
||||||
title: "Emma Climate Schedule"
|
title: "Emma Climate Schedule"
|
||||||
message: "The air conditioner in Emma's Bedroom has been activated."
|
message: "The air conditioner in Emma's Bedroom has been activated."
|
||||||
|
type: normal
|
||||||
|
tag: emma-climate
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_select.scheduled_climate_mode_emma_aircon
|
entity_id: input_select.scheduled_climate_mode_emma_aircon
|
||||||
@ -162,6 +164,8 @@ script:
|
|||||||
who: "parents"
|
who: "parents"
|
||||||
title: "Emma Climate Schedule"
|
title: "Emma Climate Schedule"
|
||||||
message: "White noise has been activated in Emma's Bedroom."
|
message: "White noise has been activated in Emma's Bedroom."
|
||||||
|
type: normal
|
||||||
|
tag: emma-climate
|
||||||
default:
|
default:
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
@ -172,6 +176,8 @@ script:
|
|||||||
who: "parents"
|
who: "parents"
|
||||||
title: "Emma Climate Schedule"
|
title: "Emma Climate Schedule"
|
||||||
message: "No option selected for Emma's climate mode. No devices will be activated."
|
message: "No option selected for Emma's climate mode. No devices will be activated."
|
||||||
|
type: normal
|
||||||
|
tag: emma-climate
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.early_night_mode
|
entity_id: binary_sensor.early_night_mode
|
||||||
|
@ -663,6 +663,17 @@ script:
|
|||||||
mode: queued
|
mode: queued
|
||||||
max: 10
|
max: 10
|
||||||
fields:
|
fields:
|
||||||
|
type:
|
||||||
|
name: 'Type'
|
||||||
|
description: 'The type of notification to send. Normal will respect whether a person/group is home. Alert will ignore home/away status. Critical will ignore home/away and send a persistant critical notification.'
|
||||||
|
example: 'normal, alert, critical'
|
||||||
|
required: false
|
||||||
|
selector:
|
||||||
|
select:
|
||||||
|
options:
|
||||||
|
- normal
|
||||||
|
- alert
|
||||||
|
- critical
|
||||||
who:
|
who:
|
||||||
name: 'Who'
|
name: 'Who'
|
||||||
description: 'Which phone, or group of phones, to send the notification to'
|
description: 'Which phone, or group of phones, to send the notification to'
|
||||||
@ -692,17 +703,13 @@ script:
|
|||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
multiline: true
|
multiline: true
|
||||||
type:
|
tag:
|
||||||
name: 'Type'
|
name: 'Tag'
|
||||||
description: 'The type of notification to send. Normal will respect whether a person/group is home. Alert will ignore home/away status. Critical will ignore home/away and send a persistant critical notification.'
|
description: 'The tag for the notification. Used primarily for dismissing notifications via automation.'
|
||||||
example: 'normal, alert, critical'
|
example: 'test-notification'
|
||||||
required: false
|
required: false
|
||||||
selector:
|
selector:
|
||||||
select:
|
text:
|
||||||
options:
|
|
||||||
- normal
|
|
||||||
- alert
|
|
||||||
- critical
|
|
||||||
sequence:
|
sequence:
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
@ -727,6 +734,12 @@ script:
|
|||||||
title: "{{ title }}"
|
title: "{{ title }}"
|
||||||
message: "{{ message }}"
|
message: "{{ message }}"
|
||||||
data:
|
data:
|
||||||
|
tag: >
|
||||||
|
{% if tag is defined %}
|
||||||
|
{{ tag }}
|
||||||
|
{% else %}
|
||||||
|
{}
|
||||||
|
{% endif %}
|
||||||
push:
|
push:
|
||||||
sound:
|
sound:
|
||||||
name: default
|
name: default
|
||||||
@ -752,16 +765,13 @@ script:
|
|||||||
data:
|
data:
|
||||||
title: '{{ title }}'
|
title: '{{ title }}'
|
||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
# data:
|
data:
|
||||||
# attachment:
|
tag: >
|
||||||
# url: '{{ url }}'
|
{% if tag is defined %}
|
||||||
# content-type: '{{ content_type }}'
|
{{ tag }}
|
||||||
# hide-thumbnail: false
|
{% else %}
|
||||||
# push:
|
{}
|
||||||
# sound: '{{ ios_sound }}'
|
{% endif %}
|
||||||
# badge: 0
|
|
||||||
# category: '{{ ios_category }}'
|
|
||||||
# entity_id: '{{ camera_entity }}'
|
|
||||||
default:
|
default:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.text_notifications
|
entity_id: input_boolean.text_notifications
|
||||||
@ -779,6 +789,13 @@ script:
|
|||||||
data:
|
data:
|
||||||
title: '{{ title }}'
|
title: '{{ title }}'
|
||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
|
data:
|
||||||
|
tag: >
|
||||||
|
{% if tag is defined %}
|
||||||
|
{{ tag }}
|
||||||
|
{% else %}
|
||||||
|
{}
|
||||||
|
{% endif %}
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ who == "tina"}}'
|
value_template: '{{ who == "tina"}}'
|
||||||
@ -792,6 +809,13 @@ script:
|
|||||||
data:
|
data:
|
||||||
title: '{{ title }}'
|
title: '{{ title }}'
|
||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
|
data:
|
||||||
|
tag: >
|
||||||
|
{% if tag is defined %}
|
||||||
|
{{ tag }}
|
||||||
|
{% else %}
|
||||||
|
{}
|
||||||
|
{% endif %}
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ who == "kallen"}}'
|
value_template: '{{ who == "kallen"}}'
|
||||||
@ -805,6 +829,13 @@ script:
|
|||||||
data:
|
data:
|
||||||
title: '{{ title }}'
|
title: '{{ title }}'
|
||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
|
data:
|
||||||
|
tag: >
|
||||||
|
{% if tag is defined %}
|
||||||
|
{{ tag }}
|
||||||
|
{% else %}
|
||||||
|
{}
|
||||||
|
{% endif %}
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ who == "parents"}}'
|
value_template: '{{ who == "parents"}}'
|
||||||
@ -825,6 +856,13 @@ script:
|
|||||||
data:
|
data:
|
||||||
title: '{{ title }}'
|
title: '{{ title }}'
|
||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
|
data:
|
||||||
|
tag: >
|
||||||
|
{% if tag is defined %}
|
||||||
|
{{ tag }}
|
||||||
|
{% else %}
|
||||||
|
{}
|
||||||
|
{% endif %}
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ who == "nerds"}}'
|
value_template: '{{ who == "nerds"}}'
|
||||||
@ -845,6 +883,13 @@ script:
|
|||||||
data:
|
data:
|
||||||
title: '{{ title }}'
|
title: '{{ title }}'
|
||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
|
data:
|
||||||
|
tag: >
|
||||||
|
{% if tag is defined %}
|
||||||
|
{{ tag }}
|
||||||
|
{% else %}
|
||||||
|
{}
|
||||||
|
{% endif %}
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: '{{ who == "all"}}'
|
value_template: '{{ who == "all"}}'
|
||||||
@ -858,6 +903,13 @@ script:
|
|||||||
data:
|
data:
|
||||||
title: '{{ title }}'
|
title: '{{ title }}'
|
||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
|
data:
|
||||||
|
tag: >
|
||||||
|
{% if tag is defined %}
|
||||||
|
{{ tag }}
|
||||||
|
{% else %}
|
||||||
|
{}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
tv_notify:
|
tv_notify:
|
||||||
alias: 'TV Notify'
|
alias: 'TV Notify'
|
||||||
|
@ -312,6 +312,8 @@ automation:
|
|||||||
type: alert
|
type: alert
|
||||||
who: parents
|
who: parents
|
||||||
message: "Kallen has been dropped off at school."
|
message: "Kallen has been dropped off at school."
|
||||||
|
title: "Kallen Location Alert"
|
||||||
|
tag: kallen-dropoff
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id: light.kallen_bedroom_lights
|
entity_id: light.kallen_bedroom_lights
|
||||||
initial_state: true
|
initial_state: true
|
||||||
@ -351,6 +353,8 @@ automation:
|
|||||||
type: alert
|
type: alert
|
||||||
who: parents
|
who: parents
|
||||||
message: "Kallen has been picked up from school."
|
message: "Kallen has been picked up from school."
|
||||||
|
title: "Kallen Location Alert"
|
||||||
|
tag: kallen-pickup
|
||||||
initial_state: true
|
initial_state: true
|
||||||
|
|
||||||
- id: 94b57d79-efe0-4f34-b5e3-baeaa5eea9f4
|
- id: 94b57d79-efe0-4f34-b5e3-baeaa5eea9f4
|
||||||
|
@ -266,6 +266,7 @@ automation:
|
|||||||
type: critical
|
type: critical
|
||||||
who: 'parents'
|
who: 'parents'
|
||||||
title: 'Security Not Armed!'
|
title: 'Security Not Armed!'
|
||||||
|
tag: lockdown-issue
|
||||||
message: >-
|
message: >-
|
||||||
{% set extdoors = expand('binary_sensor.exterior_doors') | selectattr('state','eq','on') | map(attribute='name') | list | join(', ') %}
|
{% set extdoors = expand('binary_sensor.exterior_doors') | selectattr('state','eq','on') | map(attribute='name') | list | join(', ') %}
|
||||||
{% set windows = expand('binary_sensor.windows') | selectattr('state','eq','on') | map(attribute='name') | list | join(', ') %}
|
{% set windows = expand('binary_sensor.windows') | selectattr('state','eq','on') | map(attribute='name') | list | join(', ') %}
|
||||||
@ -317,6 +318,14 @@ automation:
|
|||||||
entity_id: binary_sensor.security_faults
|
entity_id: binary_sensor.security_faults
|
||||||
state: 'off'
|
state: 'off'
|
||||||
then:
|
then:
|
||||||
|
- service: notify.all_ios
|
||||||
|
data:
|
||||||
|
message: clear_notification
|
||||||
|
data:
|
||||||
|
tag: lockdown-issue
|
||||||
|
- service: persistent_notification.dismiss
|
||||||
|
data:
|
||||||
|
notification_id: lockdown_issue
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.adults
|
entity_id: group.adults
|
||||||
@ -330,9 +339,6 @@ automation:
|
|||||||
data:
|
data:
|
||||||
who: common
|
who: common
|
||||||
message: 'I am unable to resolve the security issue, so I am giving up. Please report the issue to Tony if applicable.'
|
message: 'I am unable to resolve the security issue, so I am giving up. Please report the issue to Tony if applicable.'
|
||||||
- service: persistent_notification.dismiss
|
|
||||||
data:
|
|
||||||
notification_id: lockdown_issue
|
|
||||||
- service: scene.turn_on
|
- service: scene.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: scene.light_state_before_lockdown_issue
|
entity_id: scene.light_state_before_lockdown_issue
|
||||||
|
@ -1547,6 +1547,7 @@ automation:
|
|||||||
who: 'all'
|
who: 'all'
|
||||||
title: "WINDOWS ARE OPEN!"
|
title: "WINDOWS ARE OPEN!"
|
||||||
message: "It is raining and there are windows open in the house. Please close them!"
|
message: "It is raining and there are windows open in the house. Please close them!"
|
||||||
|
tag: rain-window-warning
|
||||||
- service: script.speech_engine
|
- service: script.speech_engine
|
||||||
data:
|
data:
|
||||||
who: everywhere
|
who: everywhere
|
||||||
@ -1607,6 +1608,7 @@ script:
|
|||||||
message: >-
|
message: >-
|
||||||
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
{% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %}
|
||||||
"Lightning has been detected within 20 miles of the house. Nearest storm is {{ ltgdist }} miles away."
|
"Lightning has been detected within 20 miles of the house. Nearest storm is {{ ltgdist }} miles away."
|
||||||
|
tag: lightning-warning
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.lightning_warning
|
entity_id: input_boolean.lightning_warning
|
||||||
@ -1619,6 +1621,11 @@ script:
|
|||||||
lightning_clear:
|
lightning_clear:
|
||||||
alias: 'Lightning Clear'
|
alias: 'Lightning Clear'
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: notify.all_ios
|
||||||
|
data:
|
||||||
|
message: clear_notification
|
||||||
|
data:
|
||||||
|
tag: lightning-warning
|
||||||
- service: script.status_annc
|
- service: script.status_annc
|
||||||
data_template:
|
data_template:
|
||||||
who: 'common'
|
who: 'common'
|
||||||
|
Reference in New Issue
Block a user