diff --git a/config/automation/Speech/door_opened.yaml b/config/automation/Speech/door_opened.yaml index 165e818f..ed2ab99a 100755 --- a/config/automation/Speech/door_opened.yaml +++ b/config/automation/Speech/door_opened.yaml @@ -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 diff --git a/config/automation/System/bad_logins.yaml b/config/automation/System/bad_logins.yaml index fadba375..2a78f597 100755 --- a/config/automation/System/bad_logins.yaml +++ b/config/automation/System/bad_logins.yaml @@ -3,7 +3,7 @@ ################################### - alias: Login Failure - + trigger: platform: template value_template: "{{ states('persistent_notification.httplogin') != 'unknown' }}" @@ -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: diff --git a/config/automation/System/ip_change.yaml b/config/automation/System/ip_change.yaml index 4a5c232a..25dc8214 100755 --- a/config/automation/System/ip_change.yaml +++ b/config/automation/System/ip_change.yaml @@ -5,7 +5,7 @@ ############################################################################## - alias: "NOTIFY IF IP CHANGES" - + trigger: - platform: state entity_id: sensor.ipchange @@ -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: diff --git a/config/automation/Timed_Triggers/startup_notification.yaml b/config/automation/Timed_Triggers/startup_notification.yaml index eea194bc..484c8aee 100755 --- a/config/automation/Timed_Triggers/startup_notification.yaml +++ b/config/automation/Timed_Triggers/startup_notification.yaml @@ -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 diff --git a/config/automation/garadget.yaml b/config/automation/garadget.yaml index 62449693..5b809925 100755 --- a/config/automation/garadget.yaml +++ b/config/automation/garadget.yaml @@ -4,7 +4,7 @@ ################################### - alias: Garadget Reflection Rates - + trigger: - platform: numeric_state entity_id: sensor.large_garage_reflection_rate @@ -30,11 +30,12 @@ who: "parents" content_type: 'jpeg' 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. - + trigger: - platform: time_pattern minutes: '/45' @@ -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: diff --git a/config/automation/medicine_logger.yaml b/config/automation/medicine_logger.yaml index a28b5848..5c4afa00 100755 --- a/config/automation/medicine_logger.yaml +++ b/config/automation/medicine_logger.yaml @@ -2,7 +2,7 @@ ## LOG Medicine ################################### - alias: 'Log Medicine Activity' - + trigger: - platform: event event_type: medicine_dash @@ -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 diff --git a/config/packages/hasspodcast.yaml b/config/packages/hasspodcast.yaml index 85625320..aabfcdd7 100755 --- a/config/packages/hasspodcast.yaml +++ b/config/packages/hasspodcast.yaml @@ -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: diff --git a/config/packages/juicenet.yaml b/config/packages/juicenet.yaml index f375f144..9b91db72 100755 --- a/config/packages/juicenet.yaml +++ b/config/packages/juicenet.yaml @@ -22,7 +22,7 @@ switch: group: juicenet: name: JuiceBox Charger - + entities: - sensor.carlojuice_amps - sensor.carlojuice_charge_time @@ -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: diff --git a/config/packages/neato.yaml b/config/packages/neato.yaml index dda88137..62aa62a5 100755 --- a/config/packages/neato.yaml +++ b/config/packages/neato.yaml @@ -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 diff --git a/config/packages/nest_protects.yaml b/config/packages/nest_protects.yaml index 8e505f65..d6bed05a 100755 --- a/config/packages/nest_protects.yaml +++ b/config/packages/nest_protects.yaml @@ -22,7 +22,7 @@ homeassistant: "sensor.*_security_state": hidden: True homebridge_hidden: true - + customize: binary_sensor.hallway_nest_protect_kids_hallway_online: @@ -83,7 +83,7 @@ group: #------------------------------------------- automation: - alias: Nest protect emergency - + trigger: platform: state 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)" - alias: Nest Protect Offline Notify - + trigger: platform: state entity_id: @@ -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: diff --git a/config/packages/phynplus.yaml b/config/packages/phynplus.yaml index 8ed1f0e1..8d84d425 100755 --- a/config/packages/phynplus.yaml +++ b/config/packages/phynplus.yaml @@ -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: diff --git a/config/packages/powerwall.yaml b/config/packages/powerwall.yaml index ed30e6ea..02546074 100755 --- a/config/packages/powerwall.yaml +++ b/config/packages/powerwall.yaml @@ -77,7 +77,7 @@ sensor: # automation: - alias: Notify if Grid is down - + trigger: - platform: state entity_id: sensor.grid_status @@ -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' diff --git a/config/packages/space.yaml b/config/packages/space.yaml index 53f18479..5c97e29d 100755 --- a/config/packages/space.yaml +++ b/config/packages/space.yaml @@ -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: diff --git a/config/script/notify_engine.yaml b/config/script/notify_engine.yaml index 8622622c..dffd0c5a 100755 --- a/config/script/notify_engine.yaml +++ b/config/script/notify_engine.yaml @@ -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 }}" diff --git a/config/script/skybell_pressed.yaml b/config/script/skybell_pressed.yaml index d53ad0f5..5badbd6e 100755 --- a/config/script/skybell_pressed.yaml +++ b/config/script/skybell_pressed.yaml @@ -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