Dashboard Studio 1.11.0: energy card, climate popup, car and appliance redesigns, Home Connect

- Energy card: live power flow between solar, grid, battery and home,
  with line width and speed following the power, battery level and
  today's totals; sign of grid and battery sensors can be flipped
- Climate popup (room card thermostat and any climate entity): dial,
  -/+ that batch quick taps, modes, presets and fan modes, live updates
- Car card redesigned around 3x4 with a drawn car or photo, compact,
  wide and tall layouts
- Appliance card redesigned with a progress ring; Home Connect support:
  all operation states, auto-fill from the operation state sensor via
  the device registry, readable program names, door state, pause/
  resume/stop buttons, power switch and alerts. Fixes ready/inactive
  being shown as finished/running
- Horizontal scroll card: width in pixels or cards per view, and a
  width per card
- Swipe card: no lost tap after a touch swipe, no broken swipes over
  images, lost pointer capture ends the swipe, trackpad swiping

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-26 14:06:35 +01:00
parent 78aa85a82f
commit f9822a9c49
9 changed files with 551 additions and 90 deletions
+139 -24
View File
@@ -218,6 +218,25 @@ textarea.input { resize: vertical; min-height: 76px; font-family: ui-monospace,
.assign-kiosk { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.assign-kiosk input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
@media (max-width: 560px) { .assign-row[data-dev] { flex-wrap: wrap; } .assign-row[data-dev] .input { flex-basis: 100%; } }
/* climate popup */
.cl-dial { position: relative; width: min(240px, 70vw); margin: 8px auto 0; aspect-ratio: 1; }
.cl-dial svg { width: 100%; height: 100%; }
.cl-dial path { fill: none; stroke-width: 14; stroke-linecap: round; }
.cl-track { stroke: var(--fill-strong); }
.cl-fill { stroke: var(--cl); transition: d .3s; }
.cl-knob { fill: #fff; stroke: var(--cl); stroke-width: 4; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .3)); }
.cl-cur { fill: var(--text); }
.cl-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cl-target { font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.cl-mode { font-size: 14px; font-weight: 600; color: var(--cl); margin-bottom: 4px; }
.cl-dial.is-off .cl-target { color: var(--text-2); }
.cl-steps { display: flex; justify-content: center; gap: 28px; margin-top: -18px; }
.round-btn { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--fill); font-size: 22px; display: grid; place-items: center; cursor: pointer; }
.round-btn:hover { background: var(--fill-strong); }
.cl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 99px; border: 0; background: var(--fill); cursor: pointer; font-weight: 500; }
.chip-btn .i { font-size: 16px; }
.chip-btn[aria-pressed="true"] { background: var(--text); color: var(--surface); font-weight: 600; }
.changelog { margin-top: 8px; }
.changelog h4 { margin: 16px 0 4px; font-size: 15px; }
.changelog ul { margin: 0; padding-left: 20px; color: var(--text); }
@@ -506,15 +525,64 @@ body.kiosk #tabnav { top: 6px; max-height: calc(100vh - 20px); }
@keyframes eq { 0%, 100% { transform: scaleY(0.4); transform-origin: bottom; } 50% { transform: scaleY(1); transform-origin: bottom; } }
@container (max-height: 170px) { .mp-art { display: none; } }
/* appliance */
.appl { display: flex; flex-direction: column; height: 100%; gap: 8px; justify-content: space-between; }
.appl-status { margin-left: auto; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--d-fill); white-space: nowrap; }
/* appliance: ring on the left at two rows high, stacked when taller */
.appl { display: flex; align-items: center; gap: 16px; height: 100%; min-width: 0; }
.appl-ring { position: relative; flex: none; height: min(100%, 132px); aspect-ratio: 1; display: grid; place-items: center; }
.appl-ring > svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.appl-ring circle { fill: none; stroke-width: 7; }
.appl-ring .track { stroke: var(--d-fill); }
.appl-ring .fill { stroke: var(--d-accent); stroke-linecap: round; transition: stroke-dasharray .6s; }
.phase-done .appl-ring .fill { stroke: var(--ok); }
.appl-ico { width: 64%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(22px, 22cqh, 40px); background: var(--d-fill); }
.phase-running .appl-ico { background: color-mix(in srgb, var(--d-accent) 18%, transparent); color: var(--d-accent); }
.phase-done .appl-ico { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.appl-pct { position: absolute; bottom: -2px; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: var(--w-bg, var(--d-tile)); color: var(--d-text-2); }
.appl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.appl-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.appl-top .name { flex: 1; min-width: 0; }
.appl-status { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--d-fill); white-space: nowrap; flex: none; }
.appl.phase-running .appl-status { background: var(--d-accent); color: var(--d-on-accent, #fff); }
.theme-outline .w:not(.transparent) { border-color: var(--d-separator); }
.appl.phase-done .appl-status { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.appl-big { font-size: 22px; font-weight: 700; }
.appl-big .wt { font-size: 14px; font-weight: 400; }
.appl .car-fill { background: var(--d-accent); }
.appl-program { font-size: 13px; color: var(--d-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appl-main { margin-top: 2px; }
.appl-big { font-size: clamp(20px, 15cqh, 30px); font-weight: 700; line-height: 1.1; }
.appl-off { color: var(--d-text-2); }
.appl-sub { font-size: 13px; color: var(--d-text-2); }
.appl-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.appl-main { display: flex; align-items: center; gap: 8px; }
.appl-main-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.appl-ctrls { display: flex; gap: 6px; flex: none; }
.appl-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--d-fill); font-size: 18px; }
.appl-btn:hover { background: color-mix(in srgb, var(--d-text) 16%, transparent); }
.appl.phase-attention .appl-status { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.appl.phase-error .appl-status { background: color-mix(in srgb, var(--crit) 18%, transparent); color: var(--crit); }
.appl.phase-scheduled .appl-status, .appl.phase-stopping .appl-status { background: var(--d-fill); }
.phase-attention .appl-ico { color: var(--warn); } .phase-error .appl-ico { color: var(--crit); }
.appl-fact { white-space: nowrap; }
.appl-fact span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* two rows high: one line of facts, tighter spacing */
@container (max-height: 180px) {
.appl-text { gap: 0; }
.appl-facts { flex-wrap: nowrap; overflow: hidden; margin-top: 3px; }
.appl-fact { min-width: 0; flex-shrink: 1; }
.appl-big { font-size: 22px; }
.appl-btn { width: 36px; height: 36px; font-size: 16px; }
}
.appl-fact { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--d-fill); }
.appl-fact .i { font-size: 14px; }
.appl-fact.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.theme-outline .w:not(.transparent) { border-color: var(--d-separator); }
@container (max-width: 260px) { .appl-ring { display: none; } }
@container (min-height: 260px) {
.appl { flex-direction: column; justify-content: center; text-align: center; }
.appl-ring { height: min(55%, 170px); }
.appl-text { align-items: center; flex: none; width: 100%; }
.appl-top { justify-content: center; }
.appl-top .name { flex: none; }
.appl-main, .appl-main-text, .appl-facts { justify-content: center; }
.appl-main { flex-direction: column; }
.appl-main-text { flex: none; }
}
/* containers: horizontal scroll and swipe */
.w.child { position: relative; flex: none; height: 100%; }
@@ -525,7 +593,7 @@ body.kiosk #tabnav { top: 6px; max-height: calc(100vh - 20px); }
scroll-snap-type: x mandatory; scroll-padding: 0 2px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.hs-track::-webkit-scrollbar { display: none; }
.hs-track > .w.child { width: var(--item-w, 260px); scroll-snap-align: start; }
.hs-track > .w.child { width: var(--own-w, var(--item-w, 260px)); scroll-snap-align: start; }
.hs-track:focus-visible { box-shadow: var(--focus); border-radius: var(--d-radius, 20px); }
.hs-nav {
position: absolute; top: 50%; z-index: 4; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
@@ -542,6 +610,7 @@ body.kiosk #tabnav { top: 6px; max-height: calc(100vh - 20px); }
.sw-track > .w.child { flex: 0 0 100%; width: 100%; }
.sw.dragging .sw-track { cursor: grabbing; }
.sw.dragging .w.child { pointer-events: none; }
.sw img { -webkit-user-drag: none; user-select: none; }
.sw-track:focus-visible { box-shadow: inset var(--focus); }
/* Dots float over the cards and only show while swiping, hovering or focused. */
.sw-dots {
@@ -588,6 +657,26 @@ body.kiosk #tabnav { top: 6px; max-height: calc(100vh - 20px); }
.light-members { flex: 1; min-height: 0; margin: 0 -6px; }
.light:has(.light-members) { justify-content: flex-start; }
/* energy flow */
.energy { display: flex; flex-direction: column; height: 100%; gap: 10px; }
.ef-diagram { position: relative; flex: 1; min-height: 0; }
.ef-diagram > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ef-line, .ef-flow { fill: none; vector-effect: non-scaling-stroke; }
.ef-line { stroke: var(--d-fill); stroke-width: 2; }
.ef-flow { stroke-dasharray: 2 12; stroke-linecap: round; animation: ef-flow linear infinite; }
.ef-flow.solar { stroke: #f5a524; } .ef-flow.grid { stroke: var(--d-text-2); } .ef-flow.battery { stroke: var(--ok); }
@keyframes ef-flow { to { stroke-dashoffset: -28; } }
.ef-node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; width: 33%; }
.ef-solar { left: 50%; top: 14%; } .ef-grid { left: 14%; top: 50%; } .ef-home { left: 86%; top: 50%; } .ef-battery { left: 50%; top: 86%; }
.ef-ico { width: clamp(34px, 13cqmin, 52px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(17px, 6cqmin, 24px); background: var(--w-bg, var(--d-tile)); border: 2px solid; }
.ef-solar .ef-ico { border-color: #f5a524; color: #f5a524; } .ef-grid .ef-ico { border-color: var(--d-text-2); } .ef-home .ef-ico { border-color: var(--d-accent); color: var(--d-accent); } .ef-battery .ef-ico { border-color: var(--ok); color: var(--ok); }
.ef-val { font-size: clamp(13px, 5cqmin, 17px); font-weight: 700; white-space: nowrap; }
.ef-label { font-size: 11px; color: var(--d-text-2); white-space: nowrap; }
.ef-val, .ef-label { position: relative; padding: 0 5px; border-radius: 5px; background: var(--w-bg, var(--d-tile)); }
.surface-plain .ef-val, .surface-plain .ef-label, .w.transparent .ef-val, .w.transparent .ef-label { background: var(--d-bg); }
.ef-totals { flex: none; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--d-text-2); justify-content: center; }
.ef-total b { color: var(--d-text); font-size: 13px; }
/* room */
.room { position: relative; display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
.room.on-image { margin: -16px; padding: 16px; border-radius: inherit; color: #fff; --d-text-2: rgba(255, 255, 255, 0.86); --d-fill: rgba(255, 255, 255, 0.18);
@@ -680,28 +769,54 @@ body.kiosk #tabnav { top: 6px; max-height: calc(100vh - 20px); }
.cal-now { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; color: var(--d-accent); background: color-mix(in srgb, currentColor 16%, transparent); align-self: center; }
@container (max-width: 260px) { .cal-ev { flex-wrap: wrap; } .cal-when { width: auto; order: 2; flex-basis: 100%; padding-left: 14px; } }
/* car */
.car { position: relative; display: flex; flex-direction: column; height: 100%; gap: 8px; }
.car-img { position: absolute; right: -4px; top: -6px; width: 46%; height: 58%; object-fit: contain; object-position: right top; pointer-events: none; }
.car.has-img .car-head, .car.has-img .car-main { max-width: 56%; }
.car-head { display: flex; flex-direction: column; min-width: 0; }
.car-head .name { font-size: 17px; }
.car-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.car-range { font-size: 17px; font-weight: 600; }
.car-range .wt { font-size: 14px; font-weight: 400; }
/* pill button with icon and label (media "Turn on") */
.car-act { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--d-fill); font-size: 14px; font-weight: 500; }
.car-act .i { font-size: 18px; }
/* car: built around 3×4; compact when short, side by side when wide */
.car2 { display: grid; grid-template-areas: "top" "visual" "info"; grid-template-rows: auto 1fr auto; gap: 10px; height: 100%; min-height: 0; }
.car-top { grid-area: top; display: flex; align-items: center; gap: 8px; min-width: 0; }
.car-top .name { font-size: 17px; flex: 1; min-width: 0; }
.car-status { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--d-fill); color: var(--d-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.car-status.charging { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.car-visual { grid-area: visual; position: relative; min-height: 0; display: grid; place-items: center; }
.car-photo { width: 100%; height: 100%; object-fit: contain; }
.car-art { width: 100%; max-height: 100%; }
.car-body { fill: var(--d-fill); stroke: var(--d-text-2); stroke-width: 1.5; }
.car-glass { fill: color-mix(in srgb, var(--d-text) 12%, transparent); }
.car-wheel { fill: var(--d-text); opacity: .85; }
.car-hub { fill: var(--d-tile); }
.car-visual.is-charging::before { content: ""; position: absolute; inset: 15% 10%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--ok) 35%, transparent), transparent); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { opacity: .45; } }
.car-bolt { position: absolute; right: 8%; top: 4%; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #04210f; font-size: 17px; }
.car-info { grid-area: info; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.car-nums { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.car-pct { font-size: clamp(32px, 14cqh, 52px); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.car-range { font-size: 17px; font-weight: 600; color: var(--d-text-2); }
.car2 .level { color: var(--crit); align-self: center; }
.car-bar { position: relative; height: 12px; border-radius: 6px; background: var(--d-fill); overflow: visible; flex: none; }
.car-fill { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--d-text); transition: width .4s; }
.car-bar.charging .car-fill { background: var(--ok); background-image: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.45) 50%, transparent 60%); background-size: 200% 100%; animation: charge 2.4s linear infinite; }
.car-bar.low .car-fill { background: var(--crit); }
.car-limit { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--d-text-2); }
@keyframes charge { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.car-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.car-act { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--d-fill); font-size: 14px; font-weight: 500; }
.car-act .i { font-size: 18px; }
.car-act[aria-pressed="true"] { background: var(--d-text); color: var(--d-tile); }
.car-odo { margin-left: auto; }
@container (max-width: 340px) { .car-img { display: none; } .car.has-img .car-head, .car.has-img .car-main { max-width: none; } .car-odo { display: none; } }
@container (max-height: 200px) { .car-actions { display: none; } }
.car-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.car-stat { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; background: var(--d-fill); min-width: 0; }
.car-stat-v { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-stat-l { font-size: 12px; color: var(--d-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-actions2 { display: flex; gap: 6px; }
.car-btn { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 14px; background: var(--d-fill); }
.car-btn-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; }
.car-btn[aria-pressed="true"] .car-btn-ico { background: var(--d-text); color: var(--d-tile); }
.car-btn-label { font-size: 12px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* sizes */
@container (max-height: 380px) { .car-stats { display: none; } }
@container (max-height: 250px) and (max-width: 479px) { .car2 { grid-template-areas: "top" "info"; grid-template-rows: auto 1fr; } .car-visual { display: none; } .car-info { justify-content: flex-end; } }
@container (max-height: 160px) { .car-actions2 { display: none; } }
@container (min-width: 480px) and (min-height: 150px) {
.car2 { grid-template-areas: "top top" "visual info"; grid-template-columns: 1.1fr 1fr; grid-template-rows: auto 1fr; column-gap: 18px; }
.car-info { justify-content: center; }
}
@container (max-width: 230px) { .car-btn-label { display: none; } .car-range { font-size: 15px; } }
/* ============================================================ phone dashboards */
body.phone-ui:not(.peek) #topbar { display: none; }