Text notify can now send actionable notifications, close #78
This commit is contained in:
@ -724,6 +724,12 @@ script:
|
|||||||
required: false
|
required: false
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
|
actions:
|
||||||
|
name: Actions
|
||||||
|
description: Dictionary describing actions for an actionable notification
|
||||||
|
required: false
|
||||||
|
selector:
|
||||||
|
object:
|
||||||
sequence:
|
sequence:
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
@ -749,6 +755,7 @@ script:
|
|||||||
message: "{{ message }}"
|
message: "{{ message }}"
|
||||||
data:
|
data:
|
||||||
tag: '{{ tag if tag is defined else "{}" }}'
|
tag: '{{ tag if tag is defined else "{}" }}'
|
||||||
|
actions: '{{ actions if actions is defined else "{}" }}'
|
||||||
entity_id: '{{ entity if entity is defined else "{}" }}'
|
entity_id: '{{ entity if entity is defined else "{}" }}'
|
||||||
push:
|
push:
|
||||||
sound:
|
sound:
|
||||||
@ -777,6 +784,7 @@ script:
|
|||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
data:
|
data:
|
||||||
tag: '{{ tag if tag is defined else "{}" }}'
|
tag: '{{ tag if tag is defined else "{}" }}'
|
||||||
|
actions: '{{ actions if actions is defined else "{}" }}'
|
||||||
entity_id: '{{ entity if entity is defined else "{}" }}'
|
entity_id: '{{ entity if entity is defined else "{}" }}'
|
||||||
push:
|
push:
|
||||||
sound:
|
sound:
|
||||||
@ -833,6 +841,7 @@ script:
|
|||||||
message: '{{ message }}'
|
message: '{{ message }}'
|
||||||
data:
|
data:
|
||||||
tag: '{{ tag if tag is defined else "{}" }}'
|
tag: '{{ tag if tag is defined else "{}" }}'
|
||||||
|
actions: '{{ actions if actions is defined else "{}" }}'
|
||||||
entity_id: '{{ entity if entity is defined else "{}" }}'
|
entity_id: '{{ entity if entity is defined else "{}" }}'
|
||||||
push:
|
push:
|
||||||
sound:
|
sound:
|
||||||
|
@ -468,16 +468,17 @@ script:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: group.adults
|
entity_id: group.adults
|
||||||
state: not_home
|
state: not_home
|
||||||
- service: >
|
- service: script.text_notify
|
||||||
|
data:
|
||||||
|
who: >
|
||||||
{% if states('person.christina_stork') in ['Bob Evans','BobEvans'] %}
|
{% if states('person.christina_stork') in ['Bob Evans','BobEvans'] %}
|
||||||
notify.ios_nerds
|
nerds
|
||||||
{% else %}
|
{% else %}
|
||||||
notify.all_ios
|
all
|
||||||
{% endif %}
|
{% endif %}
|
||||||
data:
|
type: alert
|
||||||
title: "Everyone Left"
|
title: "Everyone Left"
|
||||||
message: "Away mode arming in 1 minute"
|
message: "Away Mode arming in 1 minute"
|
||||||
data:
|
|
||||||
tag: skip-away
|
tag: skip-away
|
||||||
actions:
|
actions:
|
||||||
- action: "SKIP_AWAY"
|
- action: "SKIP_AWAY"
|
||||||
|
Reference in New Issue
Block a user