πŸ”” Notifications - Actionable Mobile Notifications Script, with optional Timeout Feature and Camera Snapshots [works with iOS/Android]

Delivery! @andyrak :sweat_smile:

Again this is experimental - I’m still testing out quirks of fields, totally understandable if you want to give it some time to become stable.

:test_tube: Experimental: Version 2.0 Beta 2

:link: Github Link | :male_detective:t2: Compare Changes | :question: How to update
See historical changelogs here.

Multi-device Variant:

:link: Github Link | :male_detective:t2: Compare Changes | :question: How to update

:memo: What’s Changed

Existing scripts should not be affected this release. :crossed_fingers:t2:🫳🏻:wood:

  • :oncoming_automobile: Android: Added Show on Android Auto option.
  • :hourglass: Enable Timeout Action(s) option to dynamically disable timeout actions
  • :scroll: Fields Support Added! (requires Home Assistant 2023.11 or newer)

:mag_right: Things to check after updating:

  • As usual, existing scripts should be loaded.
  • If you have switched between either variants, check out this reply.
  • Script should show one of:
    • Version 2.0 Beta 2
    • Version 2.0 Beta 2 - Multi-device.

:eyes: Preview:

Show/Hide: Script Fields Preview


Show/Hide: Script Fields with Templates


Example payload:

service: script.my_test_notifications
data:
  field_title: >-
    {{ state_attr("sun.sun", "friendly_name") }}
  field_message: >-
    {% if is_state("sun.sun", "above_horizon") -%}
      The sun rose {{ relative_time(states.sun.sun.last_changed) }} ago.
    {%- else -%}
      The sun will rise at {{ as_timestamp(state_attr("sun.sun", "next_rising")) | timestamp_local }}.
    {%- endif %}

Result:


Show/Hide: Script Fields in Automations with Templates


Version 2 Beta 2 - 2 Nov 2023

  • Deprecated: πŸ“² Notification Strategy due to refactor.
  • Deprecated: πŸ“² Service to notify due to refactor.
  • Added: Support for fields
    • Added: 🏷️ Title field
    • Added: πŸ’¬ Message field
    • Added: 🏷️ Subtitle field
    • Added: πŸ“Έ Attachment: Camera Entity: Camera Entity field
    • Added: Options show/hide fields
    • Added: βŒ›οΈ Enable Timeout and βŒ›οΈ Enable Timeout Action(s) fields.
  • Added: 🚘 Show on Android Auto option.
  • Added: βŒ›οΈ Enable Timeout Action(s) option and field.

Notes:

  • When enabling boolean fields with value of false, be sure to toggle them to true once, and then to false.
    There seems to be a bug where the boolean value is not passed if it’s enabled and value is false without the toggle.
  • If you rely on πŸ“² Service to notify, do not upgrade, Version 1.6.1 will be the last version supporting that feature.
2 Likes