Last active
November 14, 2021 19:36
-
-
Save isabellaalstrom/58886a565b9166baad057aba5f129dae to your computer and use it in GitHub Desktop.
Handle Ios Actionable Notifications Blueprint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Handle Ios Actionable Notifications | |
description: Catch event ios.notification_action_fired that is fired when you press an actionable notification, and choose an action based on the actionName. | |
domain: automation | |
input: | |
choose_1: | |
name: First button identifier | |
default: [] | |
action_1: | |
name: Action for first button | |
default: [] | |
selector: | |
action: {} | |
choose_2: | |
name: Second button identifier | |
default: [] | |
action_2: | |
name: Action for second button | |
default: [] | |
selector: | |
action: {} | |
choose_3: | |
name: Third button identifier | |
default: [] | |
action_3: | |
name: Action for third button | |
default: [] | |
selector: | |
action: {} | |
choose_4: | |
name: Fourth button identifier | |
default: [] | |
action_4: | |
name: Action for fourth button | |
default: [] | |
selector: | |
action: {} | |
trigger: | |
- platform: event | |
event_type: ios.notification_action_fired | |
variables: | |
choose_1: !input 'choose_1' | |
choose_2: !input 'choose_2' | |
choose_3: !input 'choose_3' | |
choose_4: !input 'choose_4' | |
action: | |
- choose: | |
- conditions: | |
- condition: template | |
value_template: '{{trigger.event.data["actionName"] == choose_1}}' | |
sequence: !input 'action_1' | |
- conditions: | |
- condition: template | |
value_template: '{{trigger.event.data["actionName"] == choose_2}}' | |
sequence: !input 'action_2' | |
- conditions: | |
- condition: template | |
value_template: '{{trigger.event.data["actionName"] == choose_3}}' | |
sequence: !input 'action_3' | |
- conditions: | |
- condition: template | |
value_template: '{{trigger.event.data["actionName"] == choose_4}}' | |
sequence: !input 'action_4' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment