Send iOS notification to receipient based on who triggered event

Tags: #<Tag:0x00007f739f3bdca0>

I was wondering if there is a way to send a notification only to the person who triggered the event.

Example: I want to send the notification the alarm has been set only to the person who triggered it.

I have notifications working and can do that with actions in iOS:

  1. Created the action with name Alarm on in the companion app.
  2. Created the below automation:
- alias: "Turn alarm on"
  initial_state: true
    - platform: event
      event_type: ios.action_fired
        actionName: 'Alarm on'
    - service: input_boolean.turn_on
      entity_id: input_boolean.alarm
    - service: notify.mobile_app_rene_s_iphone_x
        message: 'Alarm turned on'

I could create a similar automation based on an action with a similar name, but would rather have the same automation, but notification to be sent to the source that sent the event …

Might be too complicated, but maybe someone has an idea?

Ever figure this out?

Nope, unfortunately not.

There may be a way now that ha records who does actions… but I am not yet familiar with the functions of that feature…
In the meantime… you could use state-switch based on which user… and have it only show a user specific button/interface… so the action could be tied to which user pressed it? Is it a keypad or just a button press?

Managed to get ti working.

Example below


 - id: '1599917976096'
   alias: Check Lock Status
   description: ''
   - platform: event
     event_type: ios.action_fired
       actionName: Check Locks
   condition: []
     service: script.home_is_secure_check_notify
       sourceDeviceID: >-
         {{ trigger.event.as_dict()['data']['sourceDeviceID']}}
   mode: single


  alias: Lock Status
  icon: mdi:lock
  mode: single
    - service_template: >
        {% if sourceDeviceID | length > 0  %}
          notify.mobile_app_{{ sourceDeviceID }}
        {% else %}
        {% endif %}
        title: Windows & Doors
        message: >
          {% if is_state("binary_sensor.housesecure", "off") -%} All windows and doors are shut {%- else -%} The following are open! {% for each in expand('group.all_openings') if each.state in ('unlocked','open','on') %}{{ }} {%- if not loop.last %}, {% endif -%} {% endfor %} {%- endif %}.

Here I am using {{ trigger.event.as_dict()[‘data’][‘sourceDeviceID’]}} to get the device id that that triggered the automation