blueprint: name: IOS Actionable Notifications domain: automation description: "## General Stuff\nThis Blueprint should capture all options that exist for notificaions on IOS. If you find something that is broken, or that is missing tell me. \n__THIS DOES NOT SUPPORT ANDROID__ (it may work tho at least some of it.) While this blueprint aims to be for actionable notifications, you can simply not enable any actions and use this as a normal notification. All actions are disabled by default. Don't forget to enable them with the toggle right there by header of the action section. Please note that currently there are some [bugs](https://github.com/home-assistant/frontend/issues/12542) inside the blueprint engine, which means that you can _not_ disable switches after you enable them. So if you screw this up, you will have to make a new automation. Or edit the yaml in the `automations.yaml` file.\n## Templates\nThe blueprint engine seems to allow adding templates in text fields. Everywhere else, you are out of luck.\n" input: dummy: name: "-" default: false description: "# General Options " selector: boolean: {} target_for_notifications: name: Target for notification description: "This is the target that the notification should be send to. If you want to send this message to multiple devices, please see how to do that [here]( https://companion.home-assistant.io/docs/notifications/notifications-basic#sending-notifications-to-multiple-devices). This should be the text WITHOUT 'notify.' " selector: text: {} trigger_source: name: Trigger description: "This is the trigger of the automation. Sadly it is not possible to just use a normal trigger. Just create a new input_button in the helper section. " selector: entity: domain: input_button message_content: name: Title selector: text: {} message_text: name: Text default: "" selector: text: {} badge_type: default: "-1" name: Icon description: "This _should_ edit the icon of the notification and thus the icon of the homeassistant app (which would reset after you open the app). But for some reason this doesn't work. It is included for completness. " selector: number: min: -1.0 max: 24.0 step: 1.0 mode: slider url: default: "" name: URL to open description: "This is the URL that will be openend when you tap the notificaion (not the actions) per default it just opens the homeassistant app. But you could specify another URL here. [Read more](https://companion.home-assistant.io/docs/notifications/notifications-basic#opening-a-url) " selector: text: {} interruption_level: default: "" name: Interruption Level description: "This is the level of interruption the notification will have. [Read More](https://companion.home-assistant.io/docs/notifications/notifications-basic#interruption-level) " selector: select: options: - passive - active - time-sensitive - critical multiple: false custom_value: false message_sound_name: default: default name: Sound Name description: "This is the name of the sound the notification should make. There is an extensive list [here](https://companion.home-assistant.io/docs/notifications/notification-sounds) (at the bottom): " selector: text: {} message_volume: default: 1.0 name: The volume of the sound selector: number: min: 0.0 max: 1.0 step: 0.1 mode: slider message_attachment: default: Disabled name: Content Attachment description: "This is the type of content to attach to this notification. 'Map' and 'Camera Stream' allow for dynamic content. 'Static' will expect a URL to a resource. Read more about this [here]( https://companion.home-assistant.io/docs/notifications/notification-attachments) " selector: select: options: - Disabled - Map - Camera Stream - Static multiple: false custom_value: false message_static_media_url: default: "" name: Static Content URL description: "This is the resource that will be downloaded/preloaded when the notificaion is recived and displayed when it is expanded. " selector: text: {} camera_hide_thumbnail: default: false name: Hide the thumbnail description: "Hide the thumbnail in the notificaion. This makes the content only visible after expanding the notificaion. Also works for 'Camera' content. " selector: boolean: {} dummy_3: default: false name: _ description: "# Map Options Note: This switch does nothing, only for structure " selector: boolean: {} map_first_pin: default: "" name: Pin 1 description: "This is the first pin that should be put on the map. It needs to be in the following form '' (Without '<' and '>') " selector: text: {} map_enable_second_pin: default: "" name: Enable a second pin selector: boolean: {} map_second_pin: default: "" name: Pin 2 description: "This is the second pin that should be put on the map. It needs to be in the following form '' (Without '<' and '>') " map_show_line_between_points: default: false name: Show line between pins selector: boolean: {} map_show_compass: default: false name: Show a compass on the map description: '"Didn''t get that to work" ' selector: boolean: {} map_show_points_of_interest: default: false name: Show points of interest on the map description: '"Didn''t get that to work" ' selector: boolean: {} map_show_scale: default: false name: Show the scale on the map description: '"Didn''t get that to work" ' selector: boolean: {} map_show_traffic: default: false name: Show traffic on the map description: '"Didn''t get that to work" ' selector: boolean: {} map_show_user_location: default: false name: Show user location on the map selector: boolean: {} dummy_4: default: false name: _ description: "# Camera Options Note: This switch does nothing, only for structure " selector: boolean: {} camera_camera_entity: default: "" name: Camera Entity description: "The camara entity to embedd a live stream of (if supported) " selector: entity: domain: camera multiple: false action_1_action_enabled: name: _ default: false description: "# Action 1 " selector: boolean: {} action_1_title: default: "" name: Title (Action 1) selector: text: {} action_1_action_activation_mode: default: background name: Activation Mode (Action 1) description: "Should this action run quietly in the background, or open the Homeassistant app? Disabled when uri is supplied. " selector: select: options: - background - foreground multiple: false custom_value: false action_1_action_authentication_required: default: false name: Authentication Requried (Action 1) selector: boolean: {} action_1_action_destructive: default: false name: Destructive (Action 1) selector: boolean: {} action_1_action_behavior: default: Disabled name: Behavior (Action 1) selector: select: options: - textInput - Disabled multiple: false custom_value: false action_1_action_text_input_button_title: default: Fire name: Title text button (Action 1) selector: text: {} action_1_action_text_input_button_placeholder_text: default: Input name: Placeholder for text input (Action 1) selector: text: {} action_1_action_icon: default: "" name: Icon (Action 1) description: 'The [icon](https://developer.apple.com/sf-symbols/) of the action. WITH sfsymbols" ' selector: text: {} action_1_action_uri: default: "" name: URI on click (Action 1) selector: text: {} action_1_action_script_to_run: default: {} name: Scripts to run (Action 1) description: "Each script will be passed the unique identifier of the action as `name` and the reply that was entered in the text box as `reply` (If enabled). Both of those variables can be used in templates inside the script. " selector: target: entity: domain: script action_2_action_enabled: name: _ default: false description: "# Action 2 " selector: boolean: {} action_2_title: default: "" name: Title (Action 2) selector: text: {} action_2_action_activation_mode: default: background name: Activation Mode (Action 2) description: "Should this action run quietly in the background, or open the Homeassistant app? Disabled when uri is supplied. " selector: select: options: - background - foreground multiple: false custom_value: false action_2_action_authentication_required: default: false name: Authentication Requried (Action 2) selector: boolean: {} action_2_action_destructive: default: false name: Destructive (Action 2) selector: boolean: {} action_2_action_behavior: default: Disabled name: Behavior (Action 2) selector: select: options: - textInput - Disabled multiple: false custom_value: false action_2_action_text_input_button_title: default: Fire name: Title text button (Action 2) selector: text: {} action_2_action_text_input_button_placeholder_text: default: Input name: Placeholder for text input (Action 2) selector: text: {} action_2_action_icon: default: "" name: Icon (Action 2) description: 'The [icon](https://developer.apple.com/sf-symbols/) of the action. WITH sfsymbols" ' selector: text: {} action_2_action_uri: default: "" name: URI on click (Action 2) selector: text: {} action_2_action_script_to_run: default: {} name: Scripts to run (Action 2) description: "Each script will be passed the unique identifier of the action as `name` and the reply that was entered in the text box as `reply` (If enabled). Both of those variables can be used in templates inside the script. " selector: target: entity: domain: script action_3_action_enabled: name: _ default: false description: "# Action 3 " selector: boolean: {} action_3_title: default: "" name: Title (Action 3) selector: text: {} action_3_action_activation_mode: default: background name: Activation Mode (Action 3) description: "Should this action run quietly in the background, or open the Homeassistant app? Disabled when uri is supplied. " selector: select: options: - background - foreground multiple: false custom_value: false action_3_action_authentication_required: default: false name: Authentication Requried (Action 3) selector: boolean: {} action_3_action_destructive: default: false name: Destructive (Action 3) selector: boolean: {} action_3_action_behavior: default: Disabled name: Behavior (Action 3) selector: select: options: - textInput - Disabled multiple: false custom_value: false action_3_action_text_input_button_title: default: Fire name: Title text button (Action 3) selector: text: {} action_3_action_text_input_button_placeholder_text: default: Input name: Placeholder for text input (Action 3) selector: text: {} action_3_action_icon: default: "" name: Icon (Action 3) description: 'The [icon](https://developer.apple.com/sf-symbols/) of the action. WITH sfsymbols" ' selector: text: {} action_3_action_uri: default: "" name: URI on click (Action 3) selector: text: {} action_3_action_script_to_run: default: {} name: Scripts to run (Action 3) description: "Each script will be passed the unique identifier of the action as `name` and the reply that was entered in the text box as `reply` (If enabled). Both of those variables can be used in templates inside the script. " selector: target: entity: domain: script action_4_action_enabled: name: _ default: false description: "# Action 4 " selector: boolean: {} action_4_title: default: "" name: Title (Action 4) selector: text: {} action_4_action_activation_mode: default: background name: Activation Mode (Action 4) description: "Should this action run quietly in the background, or open the Homeassistant app? Disabled when uri is supplied. " selector: select: options: - background - foreground multiple: false custom_value: false action_4_action_authentication_required: default: false name: Authentication Requried (Action 4) selector: boolean: {} action_4_action_destructive: default: false name: Destructive (Action 4) selector: boolean: {} action_4_action_behavior: default: Disabled name: Behavior (Action 4) selector: select: options: - textInput - Disabled multiple: false custom_value: false action_4_action_text_input_button_title: default: Fire name: Title text button (Action 4) selector: text: {} action_4_action_text_input_button_placeholder_text: default: Input name: Placeholder for text input (Action 4) selector: text: {} action_4_action_icon: default: "" name: Icon (Action 4) description: 'The [icon](https://developer.apple.com/sf-symbols/) of the action. WITH sfsymbols" ' selector: text: {} action_4_action_uri: default: "" name: URI on click (Action 4) selector: text: {} action_4_action_script_to_run: default: {} name: Scripts to run (Action 4) description: "Each script will be passed the unique identifier of the action as `name` and the reply that was entered in the text box as `reply` (If enabled). Both of those variables can be used in templates inside the script. " selector: target: entity: domain: script action_5_action_enabled: name: _ default: false description: "# Action 5 " selector: boolean: {} action_5_title: default: "" name: Title (Action 5) selector: text: {} action_5_action_activation_mode: default: background name: Activation Mode (Action 5) description: "Should this action run quietly in the background, or open the Homeassistant app? Disabled when uri is supplied. " selector: select: options: - background - foreground multiple: false custom_value: false action_5_action_authentication_required: default: false name: Authentication Requried (Action 5) selector: boolean: {} action_5_action_destructive: default: false name: Destructive (Action 5) selector: boolean: {} action_5_action_behavior: default: Disabled name: Behavior (Action 5) selector: select: options: - textInput - Disabled multiple: false custom_value: false action_5_action_text_input_button_title: default: Fire name: Title text button (Action 5) selector: text: {} action_5_action_text_input_button_placeholder_text: default: Input name: Placeholder for text input (Action 5) selector: text: {} action_5_action_icon: default: "" name: Icon (Action 5) description: 'The [icon](https://developer.apple.com/sf-symbols/) of the action. WITH sfsymbols" ' selector: text: {} action_5_action_uri: default: "" name: URI on click (Action 5) selector: text: {} action_5_action_script_to_run: default: {} name: Scripts to run (Action 5) description: "Each script will be passed the unique identifier of the action as `name` and the reply that was entered in the text box as `reply` (If enabled). Both of those variables can be used in templates inside the script. " selector: target: entity: domain: script action_6_action_enabled: name: _ default: false description: "# Action 6 " selector: boolean: {} action_6_title: default: "" name: Title (Action 6) selector: text: {} action_6_action_activation_mode: default: background name: Activation Mode (Action 6) description: "Should this action run quietly in the background, or open the Homeassistant app? Disabled when uri is supplied. " selector: select: options: - background - foreground multiple: false custom_value: false action_6_action_authentication_required: default: false name: Authentication Requried (Action 6) selector: boolean: {} action_6_action_destructive: default: false name: Destructive (Action 6) selector: boolean: {} action_6_action_behavior: default: Disabled name: Behavior (Action 6) selector: select: options: - textInput - Disabled multiple: false custom_value: false action_6_action_text_input_button_title: default: Fire name: Title text button (Action 6) selector: text: {} action_6_action_text_input_button_placeholder_text: default: Input name: Placeholder for text input (Action 6) selector: text: {} action_6_action_icon: default: "" name: Icon (Action 6) description: 'The [icon](https://developer.apple.com/sf-symbols/) of the action. WITH sfsymbols" ' selector: text: {} action_6_action_uri: default: "" name: URI on click (Action 6) selector: text: {} action_6_action_script_to_run: default: {} name: Scripts to run (Action 6) description: "Each script will be passed the unique identifier of the action as `name` and the reply that was entered in the text box as `reply` (If enabled). Both of those variables can be used in templates inside the script. " selector: target: entity: domain: script action_7_action_enabled: name: _ default: false description: "# Action 7 " selector: boolean: {} action_7_title: default: "" name: Title (Action 7) selector: text: {} action_7_action_activation_mode: default: background name: Activation Mode (Action 7) description: "Should this action run quietly in the background, or open the Homeassistant app? Disabled when uri is supplied. " selector: select: options: - background - foreground multiple: false custom_value: false action_7_action_authentication_required: default: false name: Authentication Requried (Action 7) selector: boolean: {} action_7_action_destructive: default: false name: Destructive (Action 7) selector: boolean: {} action_7_action_behavior: default: Disabled name: Behavior (Action 7) selector: select: options: - textInput - Disabled multiple: false custom_value: false action_7_action_text_input_button_title: default: Fire name: Title text button (Action 7) selector: text: {} action_7_action_text_input_button_placeholder_text: default: Input name: Placeholder for text input (Action 7) selector: text: {} action_7_action_icon: default: "" name: Icon (Action 7) description: 'The [icon](https://developer.apple.com/sf-symbols/) of the action. WITH sfsymbols" ' selector: text: {} action_7_action_uri: default: "" name: URI on click (Action 7) selector: text: {} action_7_action_script_to_run: default: {} name: Scripts to run (Action 7) description: "Each script will be passed the unique identifier of the action as `name` and the reply that was entered in the text box as `reply` (If enabled). Both of those variables can be used in templates inside the script. " selector: target: entity: domain: script action_8_action_enabled: name: _ default: false description: "# Action 8 " selector: boolean: {} action_8_title: default: "" name: Title (Action 8) selector: text: {} action_8_action_activation_mode: default: background name: Activation Mode (Action 8) description: "Should this action run quietly in the background, or open the Homeassistant app? Disabled when uri is supplied. " selector: select: options: - background - foreground multiple: false custom_value: false action_8_action_authentication_required: default: false name: Authentication Requried (Action 8) selector: boolean: {} action_8_action_destructive: default: false name: Destructive (Action 8) selector: boolean: {} action_8_action_behavior: default: Disabled name: Behavior (Action 8) selector: select: options: - textInput - Disabled multiple: false custom_value: false action_8_action_text_input_button_title: default: Fire name: Title text button (Action 8) selector: text: {} action_8_action_text_input_button_placeholder_text: default: Input name: Placeholder for text input (Action 8) selector: text: {} action_8_action_icon: default: "" name: Icon (Action 8) description: 'The [icon](https://developer.apple.com/sf-symbols/) of the action. WITH sfsymbols" ' selector: text: {} action_8_action_uri: default: "" name: URI on click (Action 8) selector: text: {} action_8_action_script_to_run: default: {} name: Scripts to run (Action 8) description: "Each script will be passed the unique identifier of the action as `name` and the reply that was entered in the text box as `reply` (If enabled). Both of those variables can be used in templates inside the script. " selector: target: entity: domain: script action_9_action_enabled: name: _ default: false description: "# Action 9 " selector: boolean: {} action_9_title: default: "" name: Title (Action 9) selector: text: {} action_9_action_activation_mode: default: background name: Activation Mode (Action 9) description: "Should this action run quietly in the background, or open the Homeassistant app? Disabled when uri is supplied. " selector: select: options: - background - foreground multiple: false custom_value: false action_9_action_authentication_required: default: false name: Authentication Requried (Action 9) selector: boolean: {} action_9_action_destructive: default: false name: Destructive (Action 9) selector: boolean: {} action_9_action_behavior: default: Disabled name: Behavior (Action 9) selector: select: options: - textInput - Disabled multiple: false custom_value: false action_9_action_text_input_button_title: default: Fire name: Title text button (Action 9) selector: text: {} action_9_action_text_input_button_placeholder_text: default: Input name: Placeholder for text input (Action 9) selector: text: {} action_9_action_icon: default: "" name: Icon (Action 9) description: 'The [icon](https://developer.apple.com/sf-symbols/) of the action. WITH sfsymbols" ' selector: text: {} action_9_action_uri: default: "" name: URI on click (Action 9) selector: text: {} action_9_action_script_to_run: default: {} name: Scripts to run (Action 9) description: "Each script will be passed the unique identifier of the action as `name` and the reply that was entered in the text box as `reply` (If enabled). Both of those variables can be used in templates inside the script. " selector: target: entity: domain: script action_10_action_enabled: name: _ default: false description: "# Action 10 " selector: boolean: {} action_10_title: default: "" name: Title (Action 10) selector: text: {} action_10_action_activation_mode: default: background name: Activation Mode (Action 10) description: "Should this action run quietly in the background, or open the Homeassistant app? Disabled when uri is supplied. " selector: select: options: - background - foreground multiple: false custom_value: false action_10_action_authentication_required: default: false name: Authentication Requried (Action 10) selector: boolean: {} action_10_action_destructive: default: false name: Destructive (Action 10) selector: boolean: {} action_10_action_behavior: default: Disabled name: Behavior (Action 10) selector: select: options: - textInput - Disabled multiple: false custom_value: false action_10_action_text_input_button_title: default: Fire name: Title text button (Action 10) selector: text: {} action_10_action_text_input_button_placeholder_text: default: Input name: Placeholder for text input (Action 10) selector: text: {} action_10_action_icon: default: "" name: Icon (Action 10) description: 'The [icon](https://developer.apple.com/sf-symbols/) of the action. WITH sfsymbols" ' selector: text: {} action_10_action_uri: default: "" name: URI on click (Action 10) selector: text: {} action_10_action_script_to_run: default: {} name: Scripts to run (Action 10) description: "Each script will be passed the unique identifier of the action as `name` and the reply that was entered in the text box as `reply` (If enabled). Both of those variables can be used in templates inside the script. " selector: target: entity: domain: script source_url: https://raw.githubusercontent.com/Hypercookie/ha-ios-notification-blueprint/main/ios_notification_blueprint.yaml trigger: - platform: state entity_id: !input trigger_source condition: [] action: - variables: message_text: !input message_content message_subtext: !input message_text message_attachment: !input message_attachment map_first_pin: !input map_first_pin map_enable_second_pin: !input map_enable_second_pin map_second_pin: !input map_second_pin map_show_line_between_points: !input map_show_line_between_points map_show_compass: !input map_show_compass map_show_points_of_interest: !input map_show_points_of_interest map_show_scale: !input map_show_scale map_show_traffic: !input map_show_traffic map_show_user_location: !input map_show_user_location camera_camera_entity: !input camera_camera_entity camera_hide_thumbnail: !input camera_hide_thumbnail sound: !input message_sound_name volume: !input message_volume url: !input url badge: !input badge_type interruption_level: !input interruption_level message_static_media_url: !input message_static_media_url action_1_name: !input action_1_title action_1_action_enabled: !input action_1_action_enabled action_1_action_activation_mode: !input action_1_action_activation_mode action_1_action_authentication_required: !input action_1_action_authentication_required action_1_action_destructive: !input action_1_action_destructive action_1_action_behavior: !input action_1_action_behavior action_1_action_text_input_button_title: !input action_1_action_text_input_button_title action_1_action_text_input_button_placeholder_text: !input action_1_action_text_input_button_placeholder_text action_1_action_icon: !input action_1_action_icon action_1_action_uri: !input action_1_action_uri action_2_name: !input action_2_title action_2_action_enabled: !input action_2_action_enabled action_2_action_activation_mode: !input action_2_action_activation_mode action_2_action_authentication_required: !input action_2_action_authentication_required action_2_action_destructive: !input action_2_action_destructive action_2_action_behavior: !input action_2_action_behavior action_2_action_text_input_button_title: !input action_2_action_text_input_button_title action_2_action_text_input_button_placeholder_text: !input action_2_action_text_input_button_placeholder_text action_2_action_icon: !input action_2_action_icon action_2_action_uri: !input action_2_action_uri action_3_name: !input action_3_title action_3_action_enabled: !input action_3_action_enabled action_3_action_activation_mode: !input action_3_action_activation_mode action_3_action_authentication_required: !input action_3_action_authentication_required action_3_action_destructive: !input action_3_action_destructive action_3_action_behavior: !input action_3_action_behavior action_3_action_text_input_button_title: !input action_3_action_text_input_button_title action_3_action_text_input_button_placeholder_text: !input action_3_action_text_input_button_placeholder_text action_3_action_icon: !input action_3_action_icon action_3_action_uri: !input action_3_action_uri action_4_name: !input action_4_title action_4_action_enabled: !input action_4_action_enabled action_4_action_activation_mode: !input action_4_action_activation_mode action_4_action_authentication_required: !input action_4_action_authentication_required action_4_action_destructive: !input action_4_action_destructive action_4_action_behavior: !input action_4_action_behavior action_4_action_text_input_button_title: !input action_4_action_text_input_button_title action_4_action_text_input_button_placeholder_text: !input action_4_action_text_input_button_placeholder_text action_4_action_icon: !input action_4_action_icon action_4_action_uri: !input action_4_action_uri action_5_name: !input action_5_title action_5_action_enabled: !input action_5_action_enabled action_5_action_activation_mode: !input action_5_action_activation_mode action_5_action_authentication_required: !input action_5_action_authentication_required action_5_action_destructive: !input action_5_action_destructive action_5_action_behavior: !input action_5_action_behavior action_5_action_text_input_button_title: !input action_5_action_text_input_button_title action_5_action_text_input_button_placeholder_text: !input action_5_action_text_input_button_placeholder_text action_5_action_icon: !input action_5_action_icon action_5_action_uri: !input action_5_action_uri action_6_name: !input action_6_title action_6_action_enabled: !input action_6_action_enabled action_6_action_activation_mode: !input action_6_action_activation_mode action_6_action_authentication_required: !input action_6_action_authentication_required action_6_action_destructive: !input action_6_action_destructive action_6_action_behavior: !input action_6_action_behavior action_6_action_text_input_button_title: !input action_6_action_text_input_button_title action_6_action_text_input_button_placeholder_text: !input action_6_action_text_input_button_placeholder_text action_6_action_icon: !input action_6_action_icon action_6_action_uri: !input action_6_action_uri action_7_name: !input action_7_title action_7_action_enabled: !input action_7_action_enabled action_7_action_activation_mode: !input action_7_action_activation_mode action_7_action_authentication_required: !input action_7_action_authentication_required action_7_action_destructive: !input action_7_action_destructive action_7_action_behavior: !input action_7_action_behavior action_7_action_text_input_button_title: !input action_7_action_text_input_button_title target_for_notifications: !input target_for_notifications action_7_action_text_input_button_placeholder_text: !input action_7_action_text_input_button_placeholder_text action_7_action_icon: !input action_7_action_icon action_7_action_uri: !input action_7_action_uri action_8_name: !input action_8_title action_8_action_enabled: !input action_8_action_enabled action_8_action_activation_mode: !input action_8_action_activation_mode action_8_action_authentication_required: !input action_8_action_authentication_required action_8_action_destructive: !input action_8_action_destructive action_8_action_behavior: !input action_8_action_behavior action_8_action_text_input_button_title: !input action_8_action_text_input_button_title action_8_action_text_input_button_placeholder_text: !input action_8_action_text_input_button_placeholder_text action_8_action_icon: !input action_8_action_icon action_8_action_uri: !input action_8_action_uri action_9_name: !input action_9_title action_9_action_enabled: !input action_9_action_enabled action_9_action_activation_mode: !input action_9_action_activation_mode action_9_action_authentication_required: !input action_9_action_authentication_required action_9_action_destructive: !input action_9_action_destructive action_9_action_behavior: !input action_9_action_behavior action_9_action_text_input_button_title: !input action_9_action_text_input_button_title action_9_action_text_input_button_placeholder_text: !input action_9_action_text_input_button_placeholder_text action_9_action_icon: !input action_9_action_icon action_9_action_uri: !input action_9_action_uri action_10_name: !input action_10_title action_10_action_enabled: !input action_10_action_enabled action_10_action_activation_mode: !input action_10_action_activation_mode action_10_action_authentication_required: !input action_10_action_authentication_required action_10_action_destructive: !input action_10_action_destructive action_10_action_behavior: !input action_10_action_behavior action_10_action_text_input_button_title: !input action_10_action_text_input_button_title action_10_action_text_input_button_placeholder_text: !input action_10_action_text_input_button_placeholder_text action_10_action_icon: !input action_10_action_icon action_10_action_uri: !input action_10_action_uri - variables: action_1_iden: "{{action_1_name ~ context.id}}" action_2_iden: "{{action_2_name ~ context.id}}" action_3_iden: "{{action_3_name ~ context.id}}" action_4_iden: "{{action_4_name ~ context.id}}" action_5_iden: "{{action_5_name ~ context.id}}" action_6_iden: "{{action_6_name ~ context.id}}" action_7_iden: "{{action_7_name ~ context.id}}" action_8_iden: "{{action_8_name ~ context.id}}" action_9_iden: "{{action_9_name ~ context.id}}" action_10_iden: "{{action_10_name ~ context.id}}" action_1_action_script_to_run: !input action_1_action_script_to_run action_2_action_script_to_run: !input action_2_action_script_to_run action_3_action_script_to_run: !input action_3_action_script_to_run action_4_action_script_to_run: !input action_4_action_script_to_run action_5_action_script_to_run: !input action_5_action_script_to_run action_6_action_script_to_run: !input action_6_action_script_to_run action_7_action_script_to_run: !input action_7_action_script_to_run action_8_action_script_to_run: !input action_8_action_script_to_run action_9_action_script_to_run: !input action_9_action_script_to_run action_10_action_script_to_run: !input action_10_action_script_to_run - service: "{{'notify.'~target_for_notifications}}" data: "{% set push_options = [ \n(\"sound\",{\n \"name\":sound,\n \"volume\":volume,\n \ \"critical\": (interruption_level==\"critical\")|int\n })\n] %}\n{% if badge != -1 %}\n{% set push_options = push_options+[(\"badge\",badge)]%}\n{% endif %}\n{% if interruption_level != \"\"%}\n{% set push_options = push_options + [(\"interruption-level\",interruption_level)]%}\n{% endif %}\n{% set push_options = dict.from_keys(push_options)%}\n{% set attachment_options = [('hide-thumbnail',camera_hide_thumbnail)] %}\n{% if message_attachment == \"Static\" %}\n{% set attachment_options = attachment_options + [(\"url\",message_static_media_url)]%}\n{% endif %}\n{% set camera_options = [\n(\"entity_id\",camera_camera_entity)\n]%}\n{% set map_options= [\n(\"latitude\",map_first_pin.split(\",\")[0]),\n(\"longitude\",map_first_pin.split(\",\")[1]),\n(\"shows_compass\",map_show_compass),\n(\"shows_points_of_interest\",map_show_points_of_interest),\n(\"shows_traffic\",map_show_traffic),\n(\"shows_user_location\",map_show_user_location),\n(\"shows_scale\",map_show_scale)\n]\n%} \n{% if map_enable_second_pin %}\n{% set map_options = map_options + [\n(\"second_latitude\",map_second_pin.split(\",\")[0]),\n(\"second_longitude\",map_second_pin.split(\",\")[1]),\n(\"shows_line_between_points\",map_show_line_between_points)\n]%}\n{% endif %}\n{% set m_data = [\n(\"message\",message_subtext), \n(\"title\",message_text)\n] %}\n{% set data_dict = []%}\n{% if url!=\"\" %}\n{% set data_dict = data_dict + [(\"url\",url)]%}\n{% endif %}\n{% if message_attachment != \"Disabled\" %}\n{% set data_dict = data_dict + [(\"attachment\",dict.from_keys(attachment_options))]%}\n{% endif%}\n{% set data_dict = data_dict + [(\"push\",dict.from_keys(push_options))] %}\n{% if message_attachment == \"Map\" %}\n{% set data_dict = data_dict + [(\"action_data\",dict.from_keys(map_options))]%}\n{% endif %}\n{% if message_attachment == \"Camera Stream\" %}\n{% set data_dict = data_dict + camera_options %}\n{% endif %}\n{% set action_1_action_object = [\n(\"action\",action_1_iden),\n(\"title\", action_1_name),\n(\"icon\",action_1_action_icon),\n(\"activationMode\",action_1_action_activation_mode),\n(\"authenticationRequired\",action_1_action_authentication_required),\n(\"destructive\",action_1_action_destructive),\n(\"behavior\",action_1_action_behavior),\n(\"textInputButtonTitle\",action_1_action_text_input_button_title),\n(\"textInputPlaceholder\",action_1_action_text_input_button_placeholder_text),\n]%}\n{% if action_1_action_uri != '' %}\n{% set action_1_action_object = action_1_action_object + [('uri',action_1_action_uri)] %}\n{% endif %}\n{% set action_1_action_object = dict.from_keys(action_1_action_object) %}\n{% set action_list = [] %}\n{% if action_1_action_enabled %}\n{% set action_list = action_list + [dict.from_keys(action_1_action_object)] %}\n{% endif %}\n{% set action_2_action_object = [\n(\"action\",action_2_iden),\n(\"title\", action_2_name),\n(\"icon\",action_2_action_icon),\n(\"activationMode\",action_2_action_activation_mode),\n(\"authenticationRequired\",action_2_action_authentication_required),\n(\"destructive\",action_2_action_destructive),\n(\"behavior\",action_2_action_behavior),\n(\"textInputButtonTitle\",action_2_action_text_input_button_title),\n(\"textInputPlaceholder\",action_2_action_text_input_button_placeholder_text),\n]%}\n{% if action_2_action_uri != '' %}\n{% set action_2_action_object = action_2_action_object + [('uri',action_2_action_uri)] %}\n{% endif %}\n{% set action_2_action_object = dict.from_keys(action_2_action_object) %}\n{% if action_2_action_enabled %}\n{% set action_list = action_list + [dict.from_keys(action_2_action_object)] %}\n{% endif %}\n{% set action_3_action_object = [\n(\"action\",action_3_iden),\n(\"title\", action_3_name),\n(\"icon\",action_3_action_icon),\n(\"activationMode\",action_3_action_activation_mode),\n(\"authenticationRequired\",action_3_action_authentication_required),\n(\"destructive\",action_3_action_destructive),\n(\"behavior\",action_3_action_behavior),\n(\"textInputButtonTitle\",action_3_action_text_input_button_title),\n(\"textInputPlaceholder\",action_3_action_text_input_button_placeholder_text),\n]%}\n{% if action_3_action_uri != '' %}\n{% set action_3_action_object = action_3_action_object + [('uri',action_3_action_uri)] %}\n{% endif %}\n{% set action_3_action_object = dict.from_keys(action_3_action_object) %}\n{% if action_3_action_enabled %}\n{% set action_list = action_list + [dict.from_keys(action_3_action_object)] %}\n{% endif %}\n{% set action_4_action_object = [\n(\"action\",action_4_iden),\n(\"title\", action_4_name),\n(\"icon\",action_4_action_icon),\n(\"activationMode\",action_4_action_activation_mode),\n(\"authenticationRequired\",action_4_action_authentication_required),\n(\"destructive\",action_4_action_destructive),\n(\"behavior\",action_4_action_behavior),\n(\"textInputButtonTitle\",action_4_action_text_input_button_title),\n(\"textInputPlaceholder\",action_4_action_text_input_button_placeholder_text),\n]%}\n{% if action_4_action_uri != '' %}\n{% set action_4_action_object = action_4_action_object + [('uri',action_4_action_uri)] %}\n{% endif %}\n{% set action_4_action_object = dict.from_keys(action_4_action_object) %}\n{% if action_4_action_enabled %}\n{% set action_list = action_list + [dict.from_keys(action_4_action_object)] %}\n{% endif %}\n{% set action_5_action_object = [\n(\"action\",action_5_iden),\n(\"title\", action_5_name),\n(\"icon\",action_5_action_icon),\n(\"activationMode\",action_5_action_activation_mode),\n(\"authenticationRequired\",action_5_action_authentication_required),\n(\"destructive\",action_5_action_destructive),\n(\"behavior\",action_5_action_behavior),\n(\"textInputButtonTitle\",action_5_action_text_input_button_title),\n(\"textInputPlaceholder\",action_5_action_text_input_button_placeholder_text),\n]%}\n{% if action_5_action_uri != '' %}\n{% set action_5_action_object = action_5_action_object + [('uri',action_5_action_uri)] %}\n{% endif %}\n{% set action_5_action_object = dict.from_keys(action_5_action_object) %}\n{% if action_5_action_enabled %}\n{% set action_list = action_list + [dict.from_keys(action_5_action_object)] %}\n{% endif %}\n{% set action_6_action_object = [\n(\"action\",action_6_iden),\n(\"title\", action_6_name),\n(\"icon\",action_6_action_icon),\n(\"activationMode\",action_6_action_activation_mode),\n(\"authenticationRequired\",action_6_action_authentication_required),\n(\"destructive\",action_6_action_destructive),\n(\"behavior\",action_6_action_behavior),\n(\"textInputButtonTitle\",action_6_action_text_input_button_title),\n(\"textInputPlaceholder\",action_6_action_text_input_button_placeholder_text),\n]%}\n{% if action_6_action_uri != '' %}\n{% set action_6_action_object = action_6_action_object + [('uri',action_6_action_uri)] %}\n{% endif %}\n{% set action_6_action_object = dict.from_keys(action_6_action_object) %}\n{% if action_6_action_enabled %}\n{% set action_list = action_list + [dict.from_keys(action_6_action_object)] %}\n{% endif %}\n{% set action_7_action_object = [\n(\"action\",action_7_iden),\n(\"title\", action_7_name),\n(\"icon\",action_7_action_icon),\n(\"activationMode\",action_7_action_activation_mode),\n(\"authenticationRequired\",action_7_action_authentication_required),\n(\"destructive\",action_7_action_destructive),\n(\"behavior\",action_7_action_behavior),\n(\"textInputButtonTitle\",action_7_action_text_input_button_title),\n(\"textInputPlaceholder\",action_7_action_text_input_button_placeholder_text),\n]%}\n{% if action_7_action_uri != '' %}\n{% set action_7_action_object = action_7_action_object + [('uri',action_7_action_uri)] %}\n{% endif %}\n{% set action_7_action_object = dict.from_keys(action_7_action_object) %}\n{% if action_7_action_enabled %}\n{% set action_list = action_list + [dict.from_keys(action_7_action_object)] %}\n{% endif %}\n{% set action_8_action_object = [\n(\"action\",action_8_iden),\n(\"title\", action_8_name),\n(\"icon\",action_8_action_icon),\n(\"activationMode\",action_8_action_activation_mode),\n(\"authenticationRequired\",action_8_action_authentication_required),\n(\"destructive\",action_8_action_destructive),\n(\"behavior\",action_8_action_behavior),\n(\"textInputButtonTitle\",action_8_action_text_input_button_title),\n(\"textInputPlaceholder\",action_8_action_text_input_button_placeholder_text),\n]%}\n{% if action_8_action_uri != '' %}\n{% set action_8_action_object = action_8_action_object + [('uri',action_8_action_uri)] %}\n{% endif %}\n{% set action_8_action_object = dict.from_keys(action_8_action_object) %}\n{% if action_8_action_enabled %}\n{% set action_list = action_list + [dict.from_keys(action_8_action_object)] %}\n{% endif %}\n{% set action_9_action_object = [\n(\"action\",action_9_iden),\n(\"title\", action_9_name),\n(\"icon\",action_9_action_icon),\n(\"activationMode\",action_9_action_activation_mode),\n(\"authenticationRequired\",action_9_action_authentication_required),\n(\"destructive\",action_9_action_destructive),\n(\"behavior\",action_9_action_behavior),\n(\"textInputButtonTitle\",action_9_action_text_input_button_title),\n(\"textInputPlaceholder\",action_9_action_text_input_button_placeholder_text),\n]%}\n{% if action_9_action_uri != '' %}\n{% set action_9_action_object = action_9_action_object + [('uri',action_9_action_uri)] %}\n{% endif %}\n{% set action_9_action_object = dict.from_keys(action_9_action_object) %}\n{% if action_9_action_enabled %}\n{% set action_list = action_list + [dict.from_keys(action_9_action_object)] %}\n{% endif %}\n{% set action_10_action_object = [\n(\"action\",action_10_iden),\n(\"title\", action_10_name),\n(\"icon\",action_10_action_icon),\n(\"activationMode\",action_10_action_activation_mode),\n(\"authenticationRequired\",action_10_action_authentication_required),\n(\"destructive\",action_10_action_destructive),\n(\"behavior\",action_10_action_behavior),\n(\"textInputButtonTitle\",action_10_action_text_input_button_title),\n(\"textInputPlaceholder\",action_10_action_text_input_button_placeholder_text),\n]%}\n{% if action_10_action_uri != '' %}\n{% set action_10_action_object = action_10_action_object + [('uri',action_10_action_uri)] %}\n{% endif %}\n{% set action_10_action_object = dict.from_keys(action_10_action_object) %}\n{% if action_10_action_enabled %}\n{% set action_list = action_list + [dict.from_keys(action_10_action_object)] %}\n{% endif %}\n\n{% set data_dict = data_dict + [(\"actions\",action_list)]%}\n{% set m_data = m_data + [(\"data\",dict.form_keys(data_dict))]%}\n{{dict.from_keys(m_data)}}\n" - wait_for_trigger: - platform: event event_type: mobile_app_notification_action event_data: action: "{{action_1_iden}}" - platform: event event_type: mobile_app_notification_action event_data: action: "{{action_2_iden}}" - platform: event event_type: mobile_app_notification_action event_data: action: "{{action_3_iden}}" - platform: event event_type: mobile_app_notification_action event_data: action: "{{action_4_iden}}" - platform: event event_type: mobile_app_notification_action event_data: action: "{{action_5_iden}}" - platform: event event_type: mobile_app_notification_action event_data: action: "{{action_6_iden}}" - platform: event event_type: mobile_app_notification_action event_data: action: "{{action_7_iden}}" - platform: event event_type: mobile_app_notification_action event_data: action: "{{action_8_iden}}" - platform: event event_type: mobile_app_notification_action event_data: action: "{{action_9_iden}}" - platform: event event_type: mobile_app_notification_action event_data: action: "{{action_10_iden}}" - choose: - conditions: - condition: template value_template: "{{wait.trigger.event.data.action == action_1_iden and action_1_action_script_to_run != {}}}" sequence: - service: homeassistant.turn_on target: !input action_1_action_script_to_run data: variables: name: "{{action_1_iden}}" reply: "{{wait.trigger.event.data.reply_text}}" - conditions: - condition: template value_template: "{{wait.trigger.event.data.action == action_2_iden and action_2_action_script_to_run != {}}}" sequence: - service: homeassistant.turn_on target: !input action_2_action_script_to_run data: variables: name: "{{action_2_iden}}" reply: "{{wait.trigger.event.data.reply_text}}" - conditions: - condition: template value_template: "{{wait.trigger.event.data.action == action_3_iden and action_3_action_script_to_run != {}}}" sequence: - service: homeassistant.turn_on target: !input action_3_action_script_to_run data: variables: name: "{{action_2_iden}}" reply: "{{wait.trigger.event.data.reply_text}}" - conditions: - condition: template value_template: "{{wait.trigger.event.data.action == action_4_iden and action_4_action_script_to_run != {}}}" sequence: - service: homeassistant.turn_on target: !input action_4_action_script_to_run data: variables: name: "{{action_4_iden}}" reply: "{{wait.trigger.event.data.reply_text}}" - conditions: - condition: template value_template: "{{wait.trigger.event.data.action == action_5_iden and action_5_action_script_to_run != {}}}" sequence: - service: homeassistant.turn_on target: !input action_5_action_script_to_run data: variables: name: "{{action_5_iden}}" reply: "{{wait.trigger.event.data.reply_text}}" - conditions: - condition: template value_template: "{{wait.trigger.event.data.action == action_6_iden and action_6_action_script_to_run != {}}}" sequence: - service: homeassistant.turn_on target: !input action_6_action_script_to_run data: variables: name: "{{action_6_iden}}" reply: "{{wait.trigger.event.data.reply_text}}" - conditions: - condition: template value_template: "{{wait.trigger.event.data.action == action_7_iden and action_7_action_script_to_run != {}}}" sequence: - service: homeassistant.turn_on target: !input action_7_action_script_to_run data: variables: name: "{{action_7_iden}}" reply: "{{wait.trigger.event.data.reply_text}}" - conditions: - condition: template value_template: "{{wait.trigger.event.data.action == action_8_iden and action_8_action_script_to_run != {}}}" sequence: - service: homeassistant.turn_on target: !input action_8_action_script_to_run data: variables: name: "{{action_8_iden}}" reply: "{{wait.trigger.event.data.reply_text}}" - conditions: - condition: template value_template: "{{wait.trigger.event.data.action == action_9_iden and action_9_action_script_to_run != {}}}" sequence: - service: homeassistant.turn_on target: !input action_9_action_script_to_run data: variables: name: "{{action_9_iden}}" reply: "{{wait.trigger.event.data.reply_text}}" - conditions: - condition: template value_template: "{{wait.trigger.event.data.action == action_10_iden and action_10_action_script_to_run != {}}}" sequence: - service: homeassistant.turn_on target: !input action_10_action_script_to_run data: variables: name: "{{action_10_iden}}" reply: "{{wait.trigger.event.data.reply_text}}" mode: restart