129 lines
3.0 KiB
YAML
129 lines
3.0 KiB
YAML
alias: Send Dynamic Notification To Devices
|
|
sequence:
|
|
- variables:
|
|
image_url: "{{ image }}"
|
|
video_url: "{{ video }}"
|
|
- parallel:
|
|
- if:
|
|
- condition: template
|
|
value_template: "{{ send_to_sm_n986b | default(True) }}"
|
|
alias: Send to SM_N986B?
|
|
then:
|
|
- 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
|
|
enabled: true
|
|
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_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
|
|
channel:
|
|
selector:
|
|
text: null
|
|
name: channel
|
|
required: true
|
|
importance:
|
|
selector:
|
|
text: null
|
|
name: importance
|
|
required: true
|
|
priority:
|
|
selector:
|
|
text: null
|
|
name: priority
|
|
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
|
|
description: ""
|