Updated #750 - Adding collapable IOS notifications

This commit is contained in:
ccostan 2020-05-29 17:50:36 -04:00
parent ae2790c0c6
commit 8c466d50be
15 changed files with 34 additions and 37 deletions

View File

@ -25,6 +25,7 @@
data_template:
who: 'parents'
value1: "The {{ trigger.to_state.attributes.friendly_name }} has been {{ (trigger.to_state.state)|replace('_', ' ') }}."
apns_id: 'Doors'
- service: input_boolean.turn_on
entity_id: input_boolean.alert_mode

View File

@ -15,6 +15,7 @@
value2: 'There was a Hack attempt!'
value3: 'Go Check the GUI for details.'
who: 'carlo'
apns_id: 'Bad-IP'
- service: script.tweet_engine_image
data_template:

View File

@ -18,6 +18,7 @@
value2: "New IP: {{ states('sensor.exteral_ip') }}"
value3: ' - Be sure to Change DNS!'
who: 'carlo'
apns_id: 'ip-change'
- service: script.tweet_engine
data_template:

View File

@ -13,6 +13,7 @@
title: 'Home Assistant StartUp'
value1: 'Home Assistant is Up and Running!'
who: 'carlo'
apns_id: 'Startup'
- service: light.turn_off
entity_id: group.hallway_lights

View File

@ -30,6 +30,7 @@
who: "parents"
content_type: 'jpeg'
url: !secret camera2_snapshot
apns_id: 'Garadget'
##############################################################################
@ -82,6 +83,7 @@
value2: "Large: {{ states('cover.large_garage')}}"
who: "family"
camera_entity: "camera.camera2"
apns_id: 'Garadget'
- service: script.speech_engine
data_template:

View File

@ -32,6 +32,7 @@
title: 'Medicine Reminder Completed'
value1: 'Carlo Took Medicine today.'
who: 'parents'
apns_id: 'Medicine'
- delay:
minutes: 1
- service: automation.turn_on

View File

@ -19,29 +19,6 @@ automation:
event_type: feedreader
action:
- service: persistent_notification.create
data_template:
title: >
{{ trigger.event.data.title }}
message: >
{% set url = trigger.event.data.feed_url.split('https://')[1] %}
{% set source = {'https://us12.campaign-archive.com/feed?u=45cab4343ffdbeb9667c28a26&id=e01847e94f':'vCloudInfo.com',
'hasspodcast.io/feed/podcast':'Hass podcast'} %}
New Rss feed for {{source[url] if url in source else 'Unknown'}}, see
{{trigger.event.data.link}},{{trigger.event.data.author}}
notification_id: >
{% set url = trigger.event.data.feed_url.split('https://')[1] %}
{% set source = {'https://us12.campaign-archive.com/feed?u=45cab4343ffdbeb9667c28a26&id=e01847e94f':'vCloudInfo.com',
'hasspodcast.io/feed/podcast':'Hass podcast'} %}
rss-feed-{{source[url] if url in source else 'Unknown'}}
############ everything below this line should be deleted if using as a drop in package. ####################
- service: script.notify_engine
data_template:
value1: 'There is a new RSS item available for {{trigger.event.data.title}}.'
value2: '{{trigger.event.data.link}}'
who: 'carlo'
- service: script.tweet_engine_image
data_template:

View File

@ -48,6 +48,7 @@ automation:
data_template:
value1: "The Garage charger is now in {{ states('sensor.carlojuice_charging_status') }} mode."
who: 'carlo'
apns_id: 'JuiceBox'
- alias: 'Juicebox Self-Heal'
initial_state: 'on'
@ -101,6 +102,8 @@ automation:
above: 24
for:
minutes: 2
- platform: event
event_type: event_did_someone_help_juicebox
action:
- service: input_boolean.turn_on
entity_id: input_boolean.alert_mode
@ -109,11 +112,15 @@ automation:
data_template:
value1: "The Juice Box Charger is pulling {{ states('sensor.carlojuice_amps') }} AMPs. This is above the safety mark of 30. Please unplug charger immediately."
who: 'parents'
apns_id: 'JuiceBox'
- service: script.speech_engine
data_template:
value1: "The Juice Box Charger is pulling {{ states('sensor.carlojuice_amps') }} AMPs. This is above the safety mark of 30. Please unplug charger immediately."
- delay: 00:02:00
- event: event_did_someone_help_juicebox
- alias: 'JuiceBox Tweet Stat!'
initial_state: 'on'
trigger:

View File

@ -51,7 +51,7 @@ automation:
entity_id: vacuum.carlo_neato
to: 'error'
- platform: event
event_type: event_did_someone_help
event_type: event_did_someone_help_neato
condition:
- condition: state
@ -84,8 +84,7 @@ automation:
ios_category: 'camera'
camera_entity: 'camera.carlo_neato_cleaning_map'
content_type: 'jpeg'
apns_headers:
'apns-collapse-id': 'neato-carlo_neato_cleaning_map'
apns_id: 'neato-carlo_neato_cleaning_map'
- delay: 00:20:00
- event: event_did_someone_help
- event: event_did_someone_help_neato

View File

@ -152,6 +152,7 @@ automation:
data_template:
value1: "The {{ trigger.to_state.attributes.friendly_name }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}. Please check immediately."
who: "parents"
apns_id: 'Nest-Protect'
- service: script.tweet_engine
data:

View File

@ -30,6 +30,7 @@ automation:
value1: 'Phyn is sensing {{ trigger.event.data.alert_type }}. Please verify {{ trigger.event.data.where }}.'
who: 'family'
url: 'https://github.com/CCOSTAN/Home-AssistantConfig/raw/master/config/www/custom_ui/floorplan/images/branding/pipeleak.png'
apns_id: 'IFTTT_Phyn'
- service: script.speech_engine
data_template:

View File

@ -95,3 +95,4 @@ automation:
data_template:
value1: "The electrical grid is reporting to be {{ (trigger.to_state.state)|replace('True', 'up')|replace('False', 'down') }}. Please verify with Tesla App."
who: 'parents'
apns_id: 'PowerWall'

View File

@ -54,6 +54,7 @@ automation:
- service: script.notify_engine
data_template:
value1: 'Go Outside! There is a Rocket Launch very soon!'
apns_id: 'Space'
- service: script.tweet_engine
data_template:

View File

@ -44,6 +44,8 @@ notify_engine:
url: "{{ url }}"
content-type: "{{ content_type }}"
hide-thumbnail: false
apns_headers:
'apns-collapse-id': "{{ apns_id }}"
push:
sound: "{{ ios_sound }}"
badge: "{{ ios_badge }}"

View File

@ -33,6 +33,7 @@ skybell_pressed:
ios_category: 'camera'
camera_entity: 'camera.front_door_last_activity'
content_type: 'jpeg'
apns_id: 'doorbell'
- service: script.flash_notify