I have an ios category that checks if my doors are locked
actions:
- name: Check Locks
background_color: "#ffffff"
label:
text: "Check Locks"
color: "#000000"
icon:
icon: lock
color: "#000000"
Then I have an automation that reacts to the action fired event and calls a script to notify me if my locks are not closed
- id: '1599917976096'
alias: Check Lock Status
description: ''
trigger:
- platform: event
event_type: ios.action_fired
event_data:
actionName: Check Locks
condition: []
action:
- service: script.home_is_secure_check_notify
data: {}
Here is the sript that checks and notifies
home_is_secure_check_notify:
alias: Lock Status
icon: mdi:lock
mode: single
sequence:
- data:
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'') %}{{ each.name }} {%- if not
loop.last %}, {% endif -%} {% endfor %} {%- endif %}.'
title: Windows and Doors
service: notify.mobile_app_lees_iphone
I want to make this available to my wife to run but if I run it, I don’t want it to notify her and visa versa.
Is there a way I can identify which device called the action and then only notify that device?