From a62e2f474d74d7423acd3020285523868da30b4d Mon Sep 17 00:00:00 2001 From: "alexei.dolgolyov" Date: Tue, 24 Mar 2026 18:58:29 +0300 Subject: [PATCH] fix: add crosslink from weather CSS card to weather source entity --- .../wled_controller/static/js/features/color-strips.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/src/wled_controller/static/js/features/color-strips.ts b/server/src/wled_controller/static/js/features/color-strips.ts index 7893985..bc4db75 100644 --- a/server/src/wled_controller/static/js/features/color-strips.ts +++ b/server/src/wled_controller/static/js/features/color-strips.ts @@ -1083,9 +1083,13 @@ const CSS_CARD_RENDERERS: Record = { weather: (source, { clockBadge }) => { const speedVal = (source.speed ?? 1.0).toFixed(1); const tempInfl = (source.temperature_influence ?? 0.5).toFixed(1); - const wsName = (_cachedWeatherSources || []).find((w: any) => w.id === source.weather_source_id)?.name || '—'; + const ws = (_cachedWeatherSources || []).find((w: any) => w.id === source.weather_source_id); + const wsName = ws?.name || '—'; + const wsLink = ws + ? ` stream-card-link" onclick="event.stopPropagation(); navigateToCard('streams','weather','weather-sources','data-id','${source.weather_source_id}')` + : ''; return ` - ${getColorStripIcon('weather')} ${escapeHtml(wsName)} + ${ICON_LINK_SOURCE} ${escapeHtml(wsName)} ⏩ ${speedVal}x 🌡 ${tempInfl} ${clockBadge}