2018-01-02 00:00:45 +00:00
|
|
|
######################################################################################################
|
2023-11-17 06:59:29 +00:00
|
|
|
###Script to send notifications to the mobile Phone! Call like this:
|
2018-01-02 00:00:45 +00:00
|
|
|
# action:
|
|
|
|
# service: script.notify_engine
|
2020-09-26 14:52:45 +00:00
|
|
|
# data:
|
2019-03-16 22:05:28 +00:00
|
|
|
# title: 'Ios Title'
|
2018-01-02 00:00:45 +00:00
|
|
|
# value1: 'Startup: Home Assistant is Up and Running!'
|
2019-03-16 22:05:28 +00:00
|
|
|
# value2: "{{ trigger.to_state.state }}"
|
|
|
|
# value3:
|
2018-01-02 00:00:45 +00:00
|
|
|
# who: "stacey | carlo | paige | family | parents"
|
2019-03-16 22:05:28 +00:00
|
|
|
# camera_entity: 'Camera.Camera'
|
|
|
|
# content-type: "jpeg"
|
2023-11-17 22:16:41 +00:00
|
|
|
# group: "Something_Unique" if important or information
|
2018-01-02 00:00:45 +00:00
|
|
|
|
2020-05-29 21:53:20 +00:00
|
|
|
# @CCOSTAN
|
|
|
|
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
|
2021-08-20 16:11:41 +00:00
|
|
|
|
|
|
|
# Need this script to work with Android? Check out this Video. https://youtu.be/mK1wdpxhLbM
|
2018-01-02 00:00:45 +00:00
|
|
|
######################################################################################################
|
|
|
|
|
|
|
|
notify_engine:
|
2018-02-25 21:00:30 +00:00
|
|
|
sequence:
|
|
|
|
- condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.text_notifications
|
|
|
|
state: 'on'
|
2018-01-02 00:00:45 +00:00
|
|
|
|
2020-09-26 14:52:45 +00:00
|
|
|
- service: >
|
2018-01-02 00:00:45 +00:00
|
|
|
{% if who == 'stacey' %}
|
2023-07-20 03:32:11 +00:00
|
|
|
notify.mobile_app_stacey_iphone11
|
2018-01-02 00:00:45 +00:00
|
|
|
{% elif who == 'carlo' %}
|
2020-06-04 17:15:01 +00:00
|
|
|
notify.mobile_app_carlo_xsmax
|
2018-01-02 00:00:45 +00:00
|
|
|
{% elif who == 'parents' %}
|
|
|
|
notify.ios_parents
|
2019-03-16 21:36:18 +00:00
|
|
|
{% elif who == 'family' %}
|
|
|
|
notify.ios_family
|
2018-01-02 00:00:45 +00:00
|
|
|
{% else %}
|
|
|
|
notify.ios_family
|
|
|
|
{% endif %}
|
2020-09-26 14:52:45 +00:00
|
|
|
data:
|
2019-03-16 21:36:18 +00:00
|
|
|
title: "{{ title }}"
|
2018-01-02 00:00:45 +00:00
|
|
|
message: "{{ value1 }} {{ value2 }} {{ value3 }}"
|
|
|
|
data:
|
2023-11-17 22:16:41 +00:00
|
|
|
group: "{{ group|default('information'),true }}"
|
2019-03-16 22:57:17 +00:00
|
|
|
push:
|
2023-11-17 22:16:41 +00:00
|
|
|
interuption_level: "{{ level|default('active'),true }}"
|
2019-03-16 21:36:18 +00:00
|
|
|
entity_id: "{{ camera_entity }}"
|
2023-11-17 06:59:29 +00:00
|
|
|
|
|
|
|
notify_engine_two_button:
|
|
|
|
sequence:
|
|
|
|
- condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.text_notifications
|
|
|
|
state: 'on'
|
|
|
|
|
|
|
|
- service: >
|
|
|
|
{% if who == 'stacey' %}
|
|
|
|
notify.mobile_app_stacey_iphone11
|
|
|
|
{% elif who == 'carlo' %}
|
|
|
|
notify.mobile_app_carlo_xsmax
|
|
|
|
{% elif who == 'parents' %}
|
|
|
|
notify.ios_parents
|
|
|
|
{% elif who == 'family' %}
|
|
|
|
notify.ios_family
|
|
|
|
{% else %}
|
|
|
|
notify.ios_family
|
|
|
|
{% endif %}
|
|
|
|
data:
|
|
|
|
message: "{{ value1 }} {{ value2 }} {{ value3 }}"
|
|
|
|
title: "{{ title|default('', true) }}"
|
|
|
|
data:
|
|
|
|
actions:
|
|
|
|
- title: "{{ title1|default('', true) }}"
|
|
|
|
action: "{{ action1 }}"
|
|
|
|
icon: "{{ icon1|default ('sfsymbols:house.circle', true) }}"
|
|
|
|
destructive: "{{ destructive1|default('false', true) }}"
|
|
|
|
- title: "{{ title2|default('', true) }}"
|
|
|
|
action: "{{ action2 }}"
|
|
|
|
icon: "{{ icon2|default ('sfsymbols:house.circle', true) }}"
|
|
|
|
destructive: "{{ destructive2|default('false', true) }}"
|
2023-11-17 22:16:41 +00:00
|
|
|
group: "{{ group|default('information'),true }}"
|