Skip to content

v1.3

Choose a tag to compare

@djdevil djdevil released this 28 Apr 20:55
6e49e67

AlertTicker Card v1.3

📱 Mobile push notifications

Per-alert push notifications via any HA notify.* service. When an alert activates, the card sends a notification with a configurable title and message — both support full Jinja2 templates and fall back to the alert badge label / message when left empty.

alerts:
  - entity: binary_sensor.front_door
    state: "on"
    theme: door
    message: "Front door opened"
    push_notify: true
    push_notify_service: mobile_app_my_phone
    push_notify_title: "🚪 Door Alert"
    push_notify_message: "Front door has been opened — state: {state}"
Key Description
push_notify Enable push notification for this alert
push_notify_service notify.* service name (e.g. mobile_app_my_phone, notify.telegram)
push_notify_title Optional title (Jinja2). Defaults to alert badge label
push_notify_message Optional message (Jinja2). Defaults to alert message

A global 📱 Push Notifications section in the General tab provides a master toggle (push_notify_enabled) to disable all push notifications at once without changing individual alerts. Everything is configurable in the visual editor — no YAML required.


🎵 Music player — MDI icons, iOS rendering, button fix

Four improvements to the music_player alert type:

  • MDI icons for all controls — play/pause, previous, next, and mute now use <ha-icon mdi:...> instead of emoji characters, rendering correctly in the HA Companion App on all platforms.
  • Buttons unresponsive on desktop when tap_action is set — play/pause, prev/next, mute and the volume slider had no effect when the alert had a tap_action or double_tap_action. The card's outer pointer handler was intercepting events and suppressing click via preventDefault. Fixed with stopPropagation on all button elements.
  • Blurred art and vinyl not rendering on iOS — the album art background and spinning vinyl disc were invisible on iOS Safari. Root cause: inset: 0 shorthand not supported on iOS Safari < 15.4, missing -webkit-filter prefix, and missing will-change: transform for GPU compositing. All three are now applied.
  • Cover art too dark on desktop — background brightness raised from 0.4 to 0.55 for a better visual balance.

🌐 Full Jinja2 {% if %} / {% else %} block tag support

Template fields (message, secondary_text, group_message, group_expanded_message, group_secondary_text, overlay messages) now correctly evaluate Jinja2 block tags even without any {{ }} expression. The {{ "" }} workaround is no longer needed:

message: >
  Waste collection in {state}
  {% if state_attr('sensor.bins','daysTo') == 1 %} day {% else %} days {% endif %}

🗂️ Group tap / hold actions + custom secondary text

Three new options for grouped filter alerts, all configurable in the visual editor:

alerts:
  - device_class: update
    group: true
    group_message: "🐳 {count} updates available"
    group_secondary_text: "Tap to manage · {count} pending"
    group_tap_action:
      action: navigate
      navigation_path: /update
    group_hold_action:
      action: url
      url_path: http://portainer.local
Key Description
group_tap_action Action when tapping the collapsed group header. Default: expand/collapse (non-breaking)
group_hold_action Action when holding the collapsed group header
group_secondary_text Custom secondary line replacing the auto-generated entity name list. Supports {count}, {names}, Jinja2

💤 Snooze menu: 1 week and 1 month

The snooze duration menu now includes 1 week (168 h) and 1 month (720 h) alongside the existing 1h / 4h / 8h / 24h options, available in all 11 supported languages.

For a fixed long snooze without a menu (single tap), snooze_duration: 168 and snooze_default_duration: 720 already worked in previous versions.


🔔 Overlay improvements

  • Fires for ALL matching entities in filter-mode — when a device_class, entity_filter, label_filter, or area_filter alert had multiple entities simultaneously satisfying the condition (e.g. 3 batteries below 20%), the overlay fired only for the first entity. Now every matching entity gets its own banner, fired one at a time (2 s apart), with the correct per-entity message. When an entity recovers it is removed from the notified set so it can re-fire if the condition becomes active again.
  • Respects trigger_delay — the overlay watcher now correctly waits the full configured delay before firing.
  • No longer fires in the same view as the card — three overlapping bugs caused the overlay to fire even when the card was visible on the active dashboard view. All three are fixed: _bases not stamped on first watcher tick when mounted, card-ID-based dedup key preventing cross-instance suppression, and _overlayShown gate blocking multiple suppress() calls.

🐛 Bug fixes

  • trigger_delay resets to zero on page load (#88) — if an entity was already in the trigger state when the dashboard was opened, the card restarted the full delay from scratch instead of firing immediately. Fixed by reading entity.last_changed, subtracting the already-elapsed time, and activating instantly if the delay has already passed.
  • Snooze pill not visible over the clear widget (#106) — when show_when_clear: true and all alerts were snoozed, the snooze bar was returned early and blocked the weather/clock widget entirely. Now the widget renders correctly with the 💤 pill overlaid on top.
  • hold_action: url on desktopwindow.open("_blank") inside a setTimeout loses user-activation and is silently blocked by popup blockers. Fixed by deferring the open to pointerup, a direct user-interaction event that is never blocked.
  • hold_action: url on mobile/touch — iOS/Safari sends pointercancel instead of pointerup after a long-press (WKWebView limitation), so the URL was never opened. Fixed by using window.location.href directly from the hold timer for touch gestures.
  • Overlay secondary_text with {% %} blocks — secondary text in overlay banners containing only Jinja2 block tags was rendered verbatim instead of being evaluated server-side.

📦 Full changelog

See CHANGELOG.md for the complete list of changes.


☕ If this update saves you time, consider buying me a coffee — it keeps the development going!

Buy Me A Coffee