212 lines
6.8 KiB
YAML
212 lines
6.8 KiB
YAML
alias: Send Dynamic Notification To All Devices
|
|
sequence:
|
|
- variables:
|
|
image_url: "{{ base_url~image }}"
|
|
video_url: "{{ base_url~video }}"
|
|
- parallel:
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ send_to_sm_n986b | default(True) }}"
|
|
alias: Send to SM_N986B?
|
|
then:
|
|
- parallel:
|
|
- data:
|
|
message: "{{ message }}"
|
|
title: "{{ title }}"
|
|
data:
|
|
sticky: "true"
|
|
color: "#2DF56D"
|
|
channel: "{{ channel }}"
|
|
vibrationPattern: 100, 1000, 100, 1000, 100
|
|
priority: "{{ priority }}"
|
|
ledColor: red
|
|
importance: "{{ importance }}"
|
|
clickAction: "{{ image_url }}"
|
|
tag: "{{ notifTag }}"
|
|
group: "{{ group }}"
|
|
image: >-
|
|
{% if (importance == "default" and video != null) -%} {{
|
|
null }} {%- else -%} {{ image_url }} {%- endif %}
|
|
video: >-
|
|
{% if (importance == "default" and video != null) -%} {{
|
|
video_url }} {%- else -%} {{ null }} {%- endif %}
|
|
notification_icon: "{{ notifIcon }}"
|
|
when: "{{ when }}"
|
|
actions:
|
|
- action: URI
|
|
title: Open Image
|
|
uri: "{{ image_url }}"
|
|
- action: URI
|
|
title: Open Clip
|
|
uri: "{{ video_url }}"
|
|
action: notify.mobile_app_sm_n986b
|
|
alias: "Notify: Send message to SM_N986B"
|
|
- action: counter.increment
|
|
target:
|
|
entity_id: counter.sm_n986b_notification_counter
|
|
data: {}
|
|
alias: Increment SM_N986B notification counter
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ send_to_nokia_c20 | default(True) }}"
|
|
alias: Send to Nokia_C20?
|
|
then:
|
|
- parallel:
|
|
- data:
|
|
message: "{{ message }}"
|
|
title: "{{ title }}"
|
|
data:
|
|
sticky: "true"
|
|
color: "#2DF56D"
|
|
channel: "{{ channel }}"
|
|
vibrationPattern: 100, 1000, 100, 1000, 100
|
|
priority: "{{ priority }}"
|
|
ledColor: red
|
|
importance: "{{ importance }}"
|
|
clickAction: "{{ image_url }}"
|
|
tag: "{{ notifTag }}"
|
|
group: "{{ group }}"
|
|
image: >-
|
|
{% if (importance == "default" and video != null) -%} {{
|
|
null }} {%- else -%} {{ image_url }} {%- endif %}
|
|
video: >-
|
|
{% if (importance == "default" and video != null) -%} {{
|
|
video_url }} {%- else -%} {{ null }} {%- endif %}
|
|
notification_icon: "{{ notifIcon }}"
|
|
when: "{{ when }}"
|
|
actions:
|
|
- action: URI
|
|
title: Open Image
|
|
uri: "{{ image_url }}"
|
|
- action: URI
|
|
title: Open Clip
|
|
uri: "{{ video_url }}"
|
|
action: notify.mobile_app_nokia_c20
|
|
alias: "Notify: Send message to Nokia_C20"
|
|
- action: counter.increment
|
|
target:
|
|
entity_id: counter.nokia_c20_notification_counter
|
|
data: {}
|
|
alias: Increment NOKIA_C20 notification counter
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ send_to_sm_x115 | default(True) }}"
|
|
alias: Send to SM_X115?
|
|
then:
|
|
- parallel:
|
|
- data:
|
|
message: "{{ message }}"
|
|
title: "{{ title }}"
|
|
data:
|
|
sticky: "true"
|
|
color: "#2DF56D"
|
|
channel: "{{ channel }}"
|
|
vibrationPattern: 100, 1000, 100, 1000, 100
|
|
priority: "{{ priority }}"
|
|
ledColor: red
|
|
importance: "{{ importance }}"
|
|
clickAction: "{{ image_url }}"
|
|
tag: "{{ notifTag }}"
|
|
group: "{{ group }}"
|
|
image: >-
|
|
{% if (importance == "default" and video != null) -%} {{
|
|
null }} {%- else -%} {{ image_url }} {%- endif %}
|
|
video: >-
|
|
{% if (importance == "default" and video != null) -%} {{
|
|
video_url }} {%- else -%} {{ null }} {%- endif %}
|
|
notification_icon: "{{ notifIcon }}"
|
|
when: "{{ when }}"
|
|
actions:
|
|
- action: URI
|
|
title: Open Image
|
|
uri: "{{ image_url }}"
|
|
- action: URI
|
|
title: Open Clip
|
|
uri: "{{ video_url }}"
|
|
action: notify.mobile_app_sm_x115
|
|
alias: "Notify: Send message to SM_X115"
|
|
- action: counter.increment
|
|
target:
|
|
entity_id: counter.sm_x115_notification_counter
|
|
data: {}
|
|
alias: Increment SM_X115 notification counter
|
|
mode: parallel
|
|
icon: mdi:bell-ring-outline
|
|
max: 10
|
|
fields:
|
|
send_to_sm_n986b:
|
|
selector:
|
|
boolean: null
|
|
name: send_to_sm_n986b
|
|
required: false
|
|
send_to_nokia_c20:
|
|
selector:
|
|
boolean: null
|
|
name: send_to_nokia_c20
|
|
required: false
|
|
send_to_sm_x115:
|
|
selector:
|
|
boolean: null
|
|
name: send_to_sm_x115
|
|
required: false
|
|
send_to_nova_4k:
|
|
selector:
|
|
boolean: null
|
|
name: send_to_nova_4k
|
|
required: false
|
|
id:
|
|
selector:
|
|
text: null
|
|
name: id
|
|
required: true
|
|
title:
|
|
selector:
|
|
text: null
|
|
name: title
|
|
required: true
|
|
message:
|
|
selector:
|
|
text: null
|
|
name: message
|
|
required: true
|
|
notiftag:
|
|
selector:
|
|
text: null
|
|
name: notifTag
|
|
required: true
|
|
notificon:
|
|
selector:
|
|
text: null
|
|
name: notifIcon
|
|
required: true
|
|
group:
|
|
selector:
|
|
text: null
|
|
name: group
|
|
required: true
|
|
importance:
|
|
selector:
|
|
text: null
|
|
name: importance
|
|
required: true
|
|
base_url:
|
|
selector:
|
|
text: null
|
|
name: base_url
|
|
required: true
|
|
image:
|
|
selector:
|
|
text: null
|
|
name: image
|
|
required: true
|
|
video:
|
|
selector:
|
|
text: null
|
|
name: video
|
|
required: true
|
|
when:
|
|
selector:
|
|
text: null
|
|
name: when
|
|
required: true
|