Skip to content

v1.2.6#76

Merged
lop1505 merged 1 commit into
mainfrom
issues-70-74-open-issues
Apr 24, 2026
Merged

v1.2.6#76
lop1505 merged 1 commit into
mainfrom
issues-70-74-open-issues

Conversation

@lop1505

@lop1505 lop1505 commented Apr 24, 2026

Copy link
Copy Markdown
Owner

No description provided.

@lop1505 lop1505 merged commit 2073f28 into main Apr 24, 2026
1 check failed
@lop1505 lop1505 deleted the issues-70-74-open-issues branch April 24, 2026 20:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 235bd8a5f6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread room-card.js
Comment on lines +1353 to +1356
if (domain !== "media_player" || ctrl.show_media_title !== true || !st) return "";
const title = trimStr(st.attributes?.media_title);
const artist = trimStr(st.attributes?.media_artist);
const album = trimStr(st.attributes?.media_album_name);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Trigger updates when media title metadata changes

This new show_media_title path reads media_title/media_artist/media_album_name, but render invalidation still relies on _getStateSignature, which does not include those attributes. When a player stays in the same state (for example, playing) and only track metadata changes, _shouldUpdateFromHass can skip re-rendering, so the tile keeps showing stale title/artist until some unrelated state change occurs.

Useful? React with 👍 / 👎.

Comment thread room-card.js
Comment on lines +1481 to +1482
const hasMediaSources = domain === "media_player" && !isUnavail && (isFullControl || ctrl.show_media_sources === true) && mediaSources.length > 0;
const hasMediaSoundModes = domain === "media_player" && !isUnavail && (isFullControl || ctrl.show_media_sound_modes === true) && mediaSoundModes.length > 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Respect media chip toggles in full control mode

control_mode: full currently forces both source and sound-mode chips on via (isFullControl || ...), so show_media_sources and show_media_sound_modes cannot actually disable chips in full mode. This makes the new per-button toggles ineffective for users who want slider+transport controls without extra chips.

Useful? React with 👍 / 👎.

lop1505 added a commit that referenced this pull request May 9, 2026
…83)

* restore image_entity grayscale on header image (#66)

Regressed in v1.2.6 (#76) when room-card.js was rewritten. Re-add the
image_entity config option and matching editor picker in the Image
section. When the configured light/switch is off, the header image
fades to grayscale (0.8s transition). image_entity is included in the
state-snapshot so toggling the light triggers an immediate re-render.

https://claude.ai/code/session_01SG43FrWV2dRWZ8pFW3ntSt

* restore presence_sensor chip in header (#66)

Second half of the 1.2.6 regression fix. Re-add presence_sensor config
plus an editor picker (person/binary_sensor/device_tracker) in the
Sensors section. When the entity is on/home/active/detected, a green
chip with the friendly name appears in the header info line.
presence_sensor is included in the state-snapshot so chip shows/hides
without delay.

https://claude.ai/code/session_01SG43FrWV2dRWZ8pFW3ntSt

* restore sensor sparklines on buttons (#55)

Regressed in v1.2.6. Re-add show_sparkline + sparkline_hours per-button
config plus card-level sparkline_refresh. Sensor history is fetched via
history/history_during_period (minimal_response) and rendered as an SVG
polyline below the button content. A periodic refresh interval is set up
in setConfig and torn down in disconnectedCallback.

Editor: per-button switch and history-hours field added next to the
existing show_last_changed control. sparkline_refresh remains YAML-only
to keep the editor uncluttered.

https://claude.ai/code/session_01SG43FrWV2dRWZ8pFW3ntSt

* restore area-based auto-setup in editor (#54)

Regressed in v1.2.6. Re-add the "Area Setup" collapsible section at the
top of the editor's Configuration tab with an ha-selector area picker
and a "Generate from Area" button. Walks device_registry +
entity_registry for the chosen area, then auto-populates:

- climate entity (first match)
- controls (light/switch/cover/fan/media_player/lock) via templates
- temp/humid sensors (device_class + name fallback)
- window/door sensors (device_class)
- battery sensors (device_class)

Existing controls are preserved (new ones appended). Section state is
persisted across editor re-renders via _ensureAreaOptions /
_updateAreaSetupUI in the fast-path.

https://claude.ai/code/session_01SG43FrWV2dRWZ8pFW3ntSt

* restore configurable alert sensors (#57)

Last piece of the v1.2.6 regression fix. Re-add alert_sensors with
threshold detection (state list / above / below / numeric / well-known
active states), red header chips, red card outline (alert_border_color),
and collapsed-mode count badge with click-to-list dialog
(_showAlertDialog). Editor section appears under Sensors with add /
delete / per-row entity-picker + above/below/state fields, plus a
chip-mode toggle and border-color textfield.

https://claude.ai/code/session_01SG43FrWV2dRWZ8pFW3ntSt

* add show_image toggle to hide header background (#82)

New card-level option show_image (default true). When false, toggles a
no-image class on .img-box that hides the <img>, drops the #444
placeholder background, and removes the dark overlay gradient. The
header bar itself, room name, main icon, badges, chips and collapse
button continue to render — fills the gap between header_height: 0
(hides everything) and an empty image (still shows grey placeholder).

Editor: new "Show background image" switch in the Image section above
the URL field. Default unchanged for existing cards.

https://claude.ai/code/session_01SG43FrWV2dRWZ8pFW3ntSt

* add HVAC mode and fan speed chips for climate buttons (#81)

Two new per-button toggles for climate entities:

- show_hvac_modes: render attributes.hvac_modes as preset chips that
  call climate.set_hvac_mode. Active mode is highlighted (matched
  against state). Mode names are decorated with MDI icons
  (off/auto/heat/cool/heat_cool/dry/fan_only).
- show_fan_modes: render attributes.fan_modes as preset chips that
  call climate.set_fan_mode. Active mode highlighted via
  attributes.fan_mode.

Editor: two switches added to the climate-only row in the button
editor. attributes.fan_mode is now part of the state-snapshot so chip
highlighting updates immediately.

https://claude.ai/code/session_01SG43FrWV2dRWZ8pFW3ntSt

* shrink header to content when show_image is false (#82)

When show_image=false and no explicit header_height is set, the
header now collapses to fit only its content (room name + chips +
icon) instead of staying at the default 120px. The overlay switches
from absolute to relative positioning so the .img-box auto-sizes.
Explicit header_height still wins.

https://claude.ai/code/session_01SG43FrWV2dRWZ8pFW3ntSt

* bump version to 1.2.8 and update README

- VERSION constant: 1.2.7 → 1.2.8
- CHANGELOG: rename Unreleased to 1.2.8
- README: document show_image, image_entity, presence_sensor, alert_sensors
  (+ alert_chip_mode, alert_border_color), show_hvac_modes, show_fan_modes,
  show_sparkline / sparkline_hours / sparkline_refresh, plus an Area-Based
  Auto-Setup feature bullet under the Editor section.

https://claude.ai/code/session_01SG43FrWV2dRWZ8pFW3ntSt

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant