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: data_template:
who: 'parents' who: 'parents'
value1: "The {{ trigger.to_state.attributes.friendly_name }} has been {{ (trigger.to_state.state)|replace('_', ' ') }}." value1: "The {{ trigger.to_state.attributes.friendly_name }} has been {{ (trigger.to_state.state)|replace('_', ' ') }}."
apns_id: 'Doors'
- service: input_boolean.turn_on - service: input_boolean.turn_on
entity_id: input_boolean.alert_mode entity_id: input_boolean.alert_mode

View File

@ -3,7 +3,7 @@
################################### ###################################
- alias: Login Failure - alias: Login Failure
trigger: trigger:
platform: template platform: template
value_template: "{{ states('persistent_notification.httplogin') != 'unknown' }}" value_template: "{{ states('persistent_notification.httplogin') != 'unknown' }}"
@ -15,6 +15,7 @@
value2: 'There was a Hack attempt!' value2: 'There was a Hack attempt!'
value3: 'Go Check the GUI for details.' value3: 'Go Check the GUI for details.'
who: 'carlo' who: 'carlo'
apns_id: 'Bad-IP'
- service: script.tweet_engine_image - service: script.tweet_engine_image
data_template: data_template:

View File

@ -5,7 +5,7 @@
############################################################################## ##############################################################################
- alias: "NOTIFY IF IP CHANGES" - alias: "NOTIFY IF IP CHANGES"
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.ipchange entity_id: sensor.ipchange
@ -18,6 +18,7 @@
value2: "New IP: {{ states('sensor.exteral_ip') }}" value2: "New IP: {{ states('sensor.exteral_ip') }}"
value3: ' - Be sure to Change DNS!' value3: ' - Be sure to Change DNS!'
who: 'carlo' who: 'carlo'
apns_id: 'ip-change'
- service: script.tweet_engine - service: script.tweet_engine
data_template: data_template:

View File

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

View File

@ -4,7 +4,7 @@
################################### ###################################
- alias: Garadget Reflection Rates - alias: Garadget Reflection Rates
trigger: trigger:
- platform: numeric_state - platform: numeric_state
entity_id: sensor.large_garage_reflection_rate entity_id: sensor.large_garage_reflection_rate
@ -30,11 +30,12 @@
who: "parents" who: "parents"
content_type: 'jpeg' content_type: 'jpeg'
url: !secret camera2_snapshot url: !secret camera2_snapshot
apns_id: 'Garadget'
############################################################################## ##############################################################################
- alias: Is the Garage door Open at night - Checks every 30 minutes or 5 minutes after we drive away. - alias: Is the Garage door Open at night - Checks every 30 minutes or 5 minutes after we drive away.
trigger: trigger:
- platform: time_pattern - platform: time_pattern
minutes: '/45' minutes: '/45'
@ -82,6 +83,7 @@
value2: "Large: {{ states('cover.large_garage')}}" value2: "Large: {{ states('cover.large_garage')}}"
who: "family" who: "family"
camera_entity: "camera.camera2" camera_entity: "camera.camera2"
apns_id: 'Garadget'
- service: script.speech_engine - service: script.speech_engine
data_template: data_template:

View File

@ -2,7 +2,7 @@
## LOG Medicine ## LOG Medicine
################################### ###################################
- alias: 'Log Medicine Activity' - alias: 'Log Medicine Activity'
trigger: trigger:
- platform: event - platform: event
event_type: medicine_dash event_type: medicine_dash
@ -32,6 +32,7 @@
title: 'Medicine Reminder Completed' title: 'Medicine Reminder Completed'
value1: 'Carlo Took Medicine today.' value1: 'Carlo Took Medicine today.'
who: 'parents' who: 'parents'
apns_id: 'Medicine'
- delay: - delay:
minutes: 1 minutes: 1
- service: automation.turn_on - service: automation.turn_on

View File

@ -19,29 +19,6 @@ automation:
event_type: feedreader event_type: feedreader
action: 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 - service: script.tweet_engine_image
data_template: data_template:

View File

@ -22,7 +22,7 @@ switch:
group: group:
juicenet: juicenet:
name: JuiceBox Charger name: JuiceBox Charger
entities: entities:
- sensor.carlojuice_amps - sensor.carlojuice_amps
- sensor.carlojuice_charge_time - sensor.carlojuice_charge_time
@ -48,6 +48,7 @@ automation:
data_template: data_template:
value1: "The Garage charger is now in {{ states('sensor.carlojuice_charging_status') }} mode." value1: "The Garage charger is now in {{ states('sensor.carlojuice_charging_status') }} mode."
who: 'carlo' who: 'carlo'
apns_id: 'JuiceBox'
- alias: 'Juicebox Self-Heal' - alias: 'Juicebox Self-Heal'
initial_state: 'on' initial_state: 'on'
@ -101,6 +102,8 @@ automation:
above: 24 above: 24
for: for:
minutes: 2 minutes: 2
- platform: event
event_type: event_did_someone_help_juicebox
action: action:
- service: input_boolean.turn_on - service: input_boolean.turn_on
entity_id: input_boolean.alert_mode entity_id: input_boolean.alert_mode
@ -109,11 +112,15 @@ automation:
data_template: 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." 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' who: 'parents'
apns_id: 'JuiceBox'
- service: script.speech_engine - service: script.speech_engine
data_template: 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." 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!' - alias: 'JuiceBox Tweet Stat!'
initial_state: 'on' initial_state: 'on'
trigger: trigger:

View File

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

View File

@ -22,7 +22,7 @@ homeassistant:
"sensor.*_security_state": "sensor.*_security_state":
hidden: True hidden: True
homebridge_hidden: true homebridge_hidden: true
customize: customize:
binary_sensor.hallway_nest_protect_kids_hallway_online: binary_sensor.hallway_nest_protect_kids_hallway_online:
@ -83,7 +83,7 @@ group:
#------------------------------------------- #-------------------------------------------
automation: automation:
- alias: Nest protect emergency - alias: Nest protect emergency
trigger: trigger:
platform: state platform: state
entity_id: entity_id:
@ -125,7 +125,7 @@ automation:
tweet: "An emergency has been detected on {{ trigger.to_state.attributes.friendly_name }} @CCostan (https://www.vcloudinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html)" tweet: "An emergency has been detected on {{ trigger.to_state.attributes.friendly_name }} @CCostan (https://www.vcloudinfo.com/2017/06/psa-check-out-your-smoke-detectors-once.html)"
- alias: Nest Protect Offline Notify - alias: Nest Protect Offline Notify
trigger: trigger:
platform: state platform: state
entity_id: entity_id:
@ -152,6 +152,7 @@ automation:
data_template: data_template:
value1: "The {{ trigger.to_state.attributes.friendly_name }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}. Please check immediately." value1: "The {{ trigger.to_state.attributes.friendly_name }} is now {{ (trigger.to_state.state)|replace('_', ' ') }}. Please check immediately."
who: "parents" who: "parents"
apns_id: 'Nest-Protect'
- service: script.tweet_engine - service: script.tweet_engine
data: data:

View File

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

View File

@ -77,7 +77,7 @@ sensor:
# #
automation: automation:
- alias: Notify if Grid is down - alias: Notify if Grid is down
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.grid_status entity_id: sensor.grid_status
@ -95,3 +95,4 @@ automation:
data_template: 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." 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' who: 'parents'
apns_id: 'PowerWall'

View File

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

View File

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

View File

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