mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 16:38:31 +00:00
v1.51.1: the v1.51.0 review (HP-1510-01, HP-1510-02)
- HP-1510-01: the static card's visibility filter had quietly become its aggregation filter — the same room showed different Zigbee health on the two cards. Two lists now: aggregation (room LQI, temp) sees every device of the space including hidden ones, rendering sees visible only. Light fill keeps excluding hidden through areaLights itself, so the contract stays exactly as agreed: hidden counts toward signal, casts no light. - HP-1510-02: the ghost suppressed state colors but still painted value text, temperature, humidity, the LQI badge and the state-morphed icon. All live numbers are gated on d.hidden now — a ghost is the base icon and the name, nothing else. smoke_hidden_flag grew both audit vectors: the 42 kW value-display ghost renders no numbers, and a room whose only Zigbee devices are hidden paints the identical lqi fill on the full and the static card.
This commit is contained in:
+10
-5
@@ -65,8 +65,13 @@ export function renderSpaceStatic(o: StaticRenderOpts): TemplateResult | null {
|
||||
loc,
|
||||
iconRules,
|
||||
});
|
||||
// the static card never shows hidden devices — there is no editor here
|
||||
const devs = all.filter((d) => d.space === o.spaceId && !d.hidden);
|
||||
// Two lists, two jobs (HP-1510-01): AGGREGATION sees every device of the
|
||||
// space — hidden ones still count toward room LQI, same as the full card —
|
||||
// while RENDERING sees only the visible ones (there is no editor here, so
|
||||
// hidden devices are never drawn). Filtering one list for both jobs made
|
||||
// the same room show different Zigbee health on the two cards.
|
||||
const spaceDevs = all.filter((d) => d.space === o.spaceId);
|
||||
const devs = spaceDevs.filter((d) => !d.hidden);
|
||||
const defPos = defaultPositions(devs, space, iconPct);
|
||||
|
||||
const roomShapes = space.rooms
|
||||
@@ -83,9 +88,9 @@ export function renderSpaceStatic(o: StaticRenderOpts): TemplateResult | null {
|
||||
const fillC = r.area
|
||||
? roomFillStyle(
|
||||
fill,
|
||||
fill === 'lqi' ? areaLqi(o.hass, devs, r.area) : null,
|
||||
fill === 'light' ? areaLights(o.hass, devs, r.area) : 'none',
|
||||
fill === 'temp' ? areaTemp(o.hass, devs, r.area) : null,
|
||||
fill === 'lqi' ? areaLqi(o.hass, spaceDevs, r.area) : null,
|
||||
fill === 'light' ? areaLights(o.hass, spaceDevs, r.area) : 'none',
|
||||
fill === 'temp' ? areaTemp(o.hass, spaceDevs, r.area) : null,
|
||||
disp.tempMin,
|
||||
disp.tempMax,
|
||||
fillColorsOf(o.cfg?.settings),
|
||||
|
||||
Reference in New Issue
Block a user