Acknowledge iOS alerts

Hello,
is there any possibilities to acknowladge alerts which are sent to iOS? I like to push a button on my Apple Watch to silence the alert till the correct state is reached.

Or do i have to work around with an input_boolean? But how do I check for multiple states in an alert?

Thx

Here is what I have in my configuration. I have a few alerts for doors, and it will silence the alerts that are on (which works for me, but I’m sure it can be improved). From the documentation, it appears the behavior is the same whether it is a phone (only thing I have configured), tablet, or watch.

Configuration.yaml

ios:
  push:
    categories:
      - name: Alert
        identifier: 'alert'
        actions:
          - identifier: 'SILENCE_ALERT'
            title: 'Silence Alert'
            activationMode: 'background'
            authenticationRequired: yes
            destructive: yes
            behavior: 'default'

Notify group:

- name: walrus_ios_alert
  platform: group
  services:
    - service: ios_walrus_iphone
      data:
        title: 'Alert'
        data:
          push:
            category: 'alert'

Alert:

  sliding_door:
    name: '[alert] sliding door open'
    message: "NOTICE - Sliding door has been open for {{ relative_time(states.binary_sensor.patio_door.last_changed) }}!"
    done_message: "NOTICE - Sliding door is closed."
    entity_id: binary_sensor.patio_door
    state: 'on'
    repeat: [ 5, 10, 15 ]
    can_acknowledge: True
    skip_first: True
    notifiers:
      - walrus_ios_alert

Automation:

- alias: 'Alert Disable - Sliding Door'
  hide_entity: True
  initial_state: true
  trigger:
    - platform: event
      event_type: ios.notification_action_fired
      event_data:
        actionName: SILENCE_ALERT
  condition:
    - condition: state
      entity_id: alert.sliding_door
      state: 'on'
  action:
    - service: alert.turn_off
      data:
        entity_id: alert.sliding_door

Thank you. Seems this make sense.

But u disable the alarm completely with your automation. I think you have a second which enable this automation if the sliding door will be closed?

Regards

Alerts are different than automations. Alerts are always enabled.

Alerts will always start as “idle”.
When triggered, the alert transitions to “on” and “message” is sent (unless “skip_first” is set to true).
Messages “repeat” if defined.
If the “can_acknowledge” flag is set to true, then the alert can be turned “off”.
When the trigger entity returns to normal state, the alert returns to “idle” and “done_message” is sent.

1 Like