Skip to content

v1.3.4

Choose a tag to compare

@djdevil djdevil released this 24 Jun 17:14
94ab8be

AlertTicker Card — v1.3.4

🐛 Bug Fixes

Weather badge alignment in cinematic style (#167)

The high/low temperature, AQI and humidity row inside the weather badge was missing its base display: flex; align-items: center CSS rule. All other rows (row1, row2, row3) were explicit flex containers, but row-minmax rendered as a plain block element.

In cinematic style — where the badge arranges all rows horizontally — this caused a visible vertical misalignment of the humidity value and the elements that follow it (wind speed, condition label).

Fixed by adding the missing base flex rule to atc-cw-badge-row-minmax. No configuration changes needed.


conditions_logic: or incorrectly triggering on primary state match alone (#168)

When conditions_logic: or was set, the primary entity state check (primaryOk) was accidentally included inside the OR group alongside the conditions. This meant the alert fired if:

  • the entity was in the configured state ← (alone, without any condition passing)
  • OR any condition was true ← (alone, without the entity being in the configured state)

The correct behavior is:

  • the entity must be in the configured state AND
  • at least one condition must be true (the OR applies only among the conditions)
# Expected: shows only when door is OPEN *and* alarm is enabled or someone is home
alerts:
  - entity_filter: "sensor.interlogix*"
    state: "open"
    conditions_logic: or
    conditions:
      - entity: input_boolean.alarm_enabled
        state: "on"
      - entity: binary_sensor.someone_home
        state: "off"

Fixed in both the card render path and the cross-view overlay watcher.


Editor "entities match" counter ignoring label_filter and area_filter (#170)

The entity count shown next to the device class and text filter fields in the visual editor only applied its own single filter — it did not take into account any label_filter or area_filter that was also set. This caused the count to be inflated (e.g. "120 entities match" for device_class: temperature even when label_filter: [SMART] reduced the real set to a handful).

The runtime behavior was always correct. Fixed by replicating the same combined filter logic (device_class + text filter + label + area) in both editor counter paths.


Card blank when casting to Google Home (#171)

When casting a Lovelace dashboard to a Google Home display, AlertTicker Card rendered as a completely blank card.

Root cause: The Google Cast runtime declares adoptedStyleSheets on ShadowRoot (so Lit's supportsAdoptingStyleSheets feature-detection check passes), but the setter throws "TypeError: Failed to set the 'adoptedStyleSheets' property on 'ShadowRoot': Failed to convert value to 'CSSStyleSheet'" at runtime. This is a Cast runtime bug — it advertises the API but can't handle Constructable StyleSheets objects. Because Lit relies on this path to inject the card's CSS, all styling is silently lost and the card renders blank.

Fix: At load time, ShadowRoot.prototype.adoptedStyleSheets setter is patched with a try-catch wrapper. When the native setter throws (Cast environment), the fallback iterates over each CSSStyleSheet, reads its rules via cssRules, and injects them as a <style> element inside the shadow root. Normal HA browsers take the fast path (native setter succeeds) with zero overhead.

No configuration changes needed.


📦 Update Instructions

  1. Download alert-ticker-card.js and alert-ticker-card-editor.js
  2. Replace both files in your www/ folder (or the path you set in Resources)
  3. Hard-reload the browser: Ctrl+Shift+R / Cmd+Shift+R

HACS users: update from the HACS panel — no manual steps needed.


Full changelog: CHANGELOG.md


☕ If this card saves you time, consider buying me a coffee — it keeps the updates coming!

Buy Me A Coffee