Skip to content

Bug Water heater page live updates don't reapply slot icon/label_color overrides #42

@edwardtfn

Description

@edwardtfn

REPO="edwardtfn/NSPanel-Easy"
TITLE="Bug: Water heater page live updates don't reapply slot icon/label_color overrides"
BODY=$(cat <<'EOF'
Summary
When the water_heater detail page is open, the live-update path added under “Update water heater page values” only runs the generic *display_value sequence. The initial page render for each slot also reapplies any slot‑specific overrides (custom icon via water_heater_value0x_icon and custom label color via water_heater_value0x_label_color). After a state change while the page is visible, those slot customizations aren’t re-applied by the live update path.

File

  • nspanel_easy_blueprint.yaml (Blueprint release: 7)

Where

  • Initial water_heater slot render: the repeat that sets var_icon and reapplies label_color after *display_value.
  • Live update path: “Update water heater page values” uses only *variables_water_heater_page + *display_value.

Steps to reproduce

  1. Configure any water_heater_value0x with a custom icon (mdi:...) and/or a custom label color.
  2. Open the water heater detail page on the panel.
  3. While the page remains open, cause any of the tracked value entities to change so the trigger_water_heater_page_value_state path runs.
  4. Observe that the live update does not explicitly reapply the slot’s custom icon/label_color overrides (only *display_value runs).

Expected
Live updates reapply:

  • The slot’s icon override (water_heater_value0x_icon), and
  • The slot’s label color override (water_heater_value0x_label_color),
    so the appearance remains consistent with the initial render.

Actual
Only *display_value is executed during live updates; slot-specific icon and label_color reapplication is skipped.

Proposed fix
Two equivalent options:

  • Extract the slot-render steps (icon + label_color after *display_value) into a shared anchor (e.g., &water_heater_slot_render) and reuse it for both the initial render and the live-update repeat; or
  • Enhance &display_value to also reapply slot-specific label_color (and, if desired, reassert icon when an override is defined) so all call sites benefit uniformly.

Context / Backlinks

Acceptance criteria

  • While the water_heater page is visible, any value change preserves (or immediately reapplies) the configured custom icon and label_color for each slot.
    EOF
    )
    gh issue create --repo "$REPO" --title "$TITLE" --body "$BODY" &&
    ISSUE_URL=$(gh issue list --repo "$REPO" --state open --search "$TITLE" --json url --jq '.[0].url') &&
    gh issue edit "$ISSUE_URL" --repo "$REPO" --add-assignee "edwardtfn" &&
    echo "Created: $ISSUE_URL"

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions