|
| 1 | +/* ═══════════════════════════════════════ |
| 2 | + CHANGELOG |
| 3 | + ═══════════════════════════════════════ |
| 4 | + v1.3.28 |
| 5 | + - Auto power-unit detection. Power sensors reporting kW/MW are now |
| 6 | + converted to W automatically (`power_unit: auto|W|kW`, default `auto`). |
| 7 | + Fixes dull/inactive-looking nodes and frozen flow animations on |
| 8 | + inverters that report power in kilowatts (e.g. Sigenergy). |
| 9 | + - Performance: cached element lookups.** Shadow-DOM element references |
| 10 | + are now cached instead of re-queried on every update (~100 |
| 11 | + `getElementById` calls removed per tick). Most noticeable on always-on |
| 12 | + panels and dashboards running several cards at once. |
| 13 | +v1.3.27 |
| 14 | + - Autarky ring: slices now glide when the mix changes and the centre % |
| 15 | + counts up/down like the power values (both honour reduced motion). |
| 16 | + - Home flow bands use a fixed order (solar, battery, grid). |
| 17 | +v1.3.26 |
| 18 | + - Extra consumption nodes: appliances, garage, heat pump, and a spare |
| 19 | + "extra" node — each with its own power entity, icon, label, and flow |
| 20 | + to the home. |
| 21 | + - Energy price display with per-source price icons. |
| 22 | + - Click a node to open its Home Assistant more-info dialog. |
| 23 | + - Swedish (sv) translation added. |
| 24 | + - Thanks to @Cm0n89 for this contribution. |
| 25 | +v1.3.25 |
| 26 | + - Autarky mini-ring now split by source feeding the home: green = solar, |
| 27 | + amber = battery, red = grid. Ring always fills to 100%; centre % stays |
| 28 | + self-sufficiency (solar + battery share). |
| 29 | + - Inverter->home flow line now split into the same source bands, ordered |
| 30 | + smallest share (at inverter) to largest (at home); same pulse animation. |
| 31 | +v1.3.23 |
| 32 | + - Fix: grid-export flow phase — resync compared 'fl' but the class is 'fL', |
| 33 | + so the -T/2 outlet delay never applied while exporting. Corrected to 'fL'. |
| 34 | + - Solar node (single MPPT): daily kWh and PV voltage enlarged to match the |
| 35 | + grid node (13px / 11px) and nudged right (x 314 -> 330) to clear the sun. |
| 36 | +v1.3.22 |
| 37 | + - Autarky badge redesigned as a circular mini-ring (replaces the corner |
| 38 | + pill): green→lime progress arc, centered %, leaf glyph below, and the |
| 39 | + "Autossuficiência" label hidden — revealed on hover (desktop) or tap |
| 40 | + (mobile, 3s). Level colors kept (amber ≥50, orange ≥25, red <25); ≥90 glow. |
| 41 | +v1.3.21 |
| 42 | + - Fix: 24h sparklines floated above the panel bottom when header text |
| 43 | + wrapped (narrow layouts equalize panel heights); .sb svg margin-top |
| 44 | + 4px -> auto pins each chart to the bottom of its panel. |
| 45 | +v1.3.20 |
| 46 | + - Solar day ring: 270° arc (r=36) around the sun icon, sunrise→sunset |
| 47 | + progress with amber gradient + position dot (opacity pulse only). |
| 48 | + Sunrise/sunset times at the arc ends. Uses sun.sun (config: sun_entity), |
| 49 | + hidden below horizon. Editor field added (8 languages). |
| 50 | + - PV1/PV2 side info: centered columns (title / power / voltage) with |
| 51 | + amber inward arrows outside the values. Single-MPPT keeps daily kWh right. |
| 52 | + - SOLAR label y -2 → -10; viewBox top 0 → -8 (dot clearance at solar noon). |
| 53 | +v1.3.19 |
| 54 | + Visual: |
| 55 | + - Main SVG viewBox height 487 -> 470: kills the dead band under the battery node (content ends ~463). |
| 56 | + Scales with width, so the phone gap shrinks proportionally. Compact mode unaffected — nothing sits |
| 57 | + below y=470. Also v1.4.7 gap fix used mm by mistake (4mm ~ 15px); now 4px. |
| 58 | +v1.3.18 |
| 59 | + Animation: |
| 60 | + - -T/2 outlet delay now applied to ALL flows leaving the inverter, not just Home: |
| 61 | + battery while charging (fd) and grid while exporting (fl). Discharge/import stay inlet-phased. |
| 62 | +v1.3.17 |
| 63 | + Animation: |
| 64 | + - True pass-through relay: Home outlet delayed -T/2 so its pulse departs the inverter the instant |
| 65 | + the inlet pulse front arrives (was: departed only after inlet fully drained). Home -> EV keeps |
| 66 | + zero delay, which now chains exactly off the pulse arriving at Home. |
| 67 | +v1.3.16 |
| 68 | + Fixes: |
| 69 | + - Dual-color SOC numbers invisible on iOS (WebKit ignores clip-path on SVG <text>, layers cancel out). |
| 70 | + Replaced text clip-paths with nested <svg> viewport cropping — battery + EV pill. Desktop unchanged. |
| 71 | +v1.3.15 |
| 72 | + Visual: |
| 73 | + - Gap between battery node and sparklines reduced 16px -> 8px |
| 74 | +v1.3.14 |
| 75 | + Visual: |
| 76 | + - Power values normalized to ~15px from each icon's visual edge (solar 82->81, grid 268->265) |
| 77 | +v1.3.13 |
| 78 | + Features: |
| 79 | + - New option `grid_threshold` (W, default 0): grid readings below it count as 0 — |
| 80 | + value dims, flow stops, icon goes inactive, autarky unaffected by standby draw |
| 81 | +v1.3.12 |
| 82 | + Visual: |
| 83 | + - Removed green pulse on the battery fill while charging (dimming made the number hard to read); |
| 84 | + solid green fill + bolt remain |
| 85 | +v1.3.11 |
| 86 | + Fixes: |
| 87 | + - Battery no longer shows green charging state at 100% SOC (residual standby draw kept it green) |
| 88 | +v1.3.10 |
| 89 | + Fixes: |
| 90 | + - Battery node alignment: icon group now centers on the pill body (values below no longer look shifted right) |
| 91 | + - Battery power/daily/runtime rows moved up 8px — gap to icon now matches the Home node |
| 92 | +v1.3.9 |
| 93 | + Fixes: |
| 94 | + - Flows/LEDs frozen when the OS has "reduce motion" enabled — v1.4.0 honored it unconditionally. |
| 95 | + Now gated by new config `animations`: 'auto' (default, follow OS) or 'always' (ignore OS). |
| 96 | + Applied via :host(.rm) class instead of a hard @media rule; tween respects the same setting. |
| 97 | +v1.3.8 |
| 98 | + Features: |
| 99 | + - Editor: one-click entity auto-detection (HA Energy Dashboard prefs + power-sensor heuristics) |
| 100 | + - Editor: live entity validation — unknown entity ids get red border + warning |
| 101 | + - Editor: field labels translated in all 8 languages |
| 102 | + - EV SOC displayed as a mini iOS pill (matches battery, green while charging) |
| 103 | + Visual: |
| 104 | + - Smooth count-up tween on all main power values (600ms, cubic ease-out) |
| 105 | + - Sparkline areas now use vertical gradient fills |
| 106 | + Accessibility: |
| 107 | + - prefers-reduced-motion honored: all animations off, values update instantly |
| 108 | + - prefers-color-scheme fallback for theme auto-detection when HA theme info is absent |
| 109 | +v1.3.7 |
| 110 | + Visual: |
| 111 | + - Battery pill height reduced 20 -> 17, number 15 -> 13.5 |
| 112 | + - iOS dual-color number: part covered by the fill is dark, uncovered part inverts to the fill color |
| 113 | + (two clipped text layers synced to the level width) |
| 114 | +v1.3.6 |
| 115 | + Visual: |
| 116 | + - Battery number enlarged 13 -> 15 |
| 117 | +v1.3.5 |
| 118 | + Visual: |
| 119 | + - iOS charging state: white number + white bolt inside the green pill (number shifts left to fit bolt) |
| 120 | +v1.3.4 |
| 121 | + Fixes: |
| 122 | + - Battery number enlarged (10.5 -> 13) and truly centered — dominant-baseline dropped (Safari/iOS |
| 123 | + renders it inconsistently), replaced with fixed baseline offset |
| 124 | +v1.3.3 |
| 125 | + Fixes: |
| 126 | + - Battery nub moved flush against the pill (was 2px gap) |
| 127 | +v1.3.2 |
| 128 | + Visual: |
| 129 | + - Battery icon now true iOS style: solid pill, level fill clipped by rounded shape, plain number (no %) |
| 130 | + - Theme-aware: white fill/dark number on dark theme, inverted on light; state colors green/orange/red kept |
| 131 | +v1.3.1 |
| 132 | + Visual: |
| 133 | + - EV icon replaced with Tesla-style fastback silhouette (single smooth body curve, flush wheels) |
| 134 | +v1.3.0 |
| 135 | + Animation: |
| 136 | + - Relay-synced flows: all lines share one duration and phase — pulses arrive at the inverter, |
| 137 | + and only then does the pulse depart toward Home (Home -> EV chained the same way) |
| 138 | + - Inlet 0.75x speed factor removed (equal duration required for phase sync) |
| 139 | + - All flow animations restart in the same frame on any direction/speed change (phase lock) |
| 140 | +v1.2.9 |
| 141 | + Fixes: |
| 142 | + - Battery node: removed vertical gap between power value and daily charge/discharge row (leftover from removed SOC row) |
| 143 | +v1.2.8 |
| 144 | + Visual: |
| 145 | + - Battery SOC color states: fill + inner % text turn orange at shutdown_soc+15, red at shutdown_soc |
| 146 | + - Charging keeps green fill with white text |
| 147 | +v1.2.7 |
| 148 | + Visual: |
| 149 | + - Battery icon redesigned iPhone-style: SOC percentage rendered inside the icon over the fill level |
| 150 | + - Icon enlarged (scale 1.70 -> 2.05); standalone SOC text row removed; daily/runtime rows moved up |
| 151 | +v1.2.6 |
| 152 | + Features: |
| 153 | + - EV charging node (bottom-right, below Home): car icon, charge power, optional SOC + daily energy |
| 154 | + - New optional entities: ev_power, ev_soc, daily_ev (editor + YAML); node hidden when not configured |
| 155 | + - Animated Home -> EV flow (green), blinking bolt while charging; click opens more-info |
| 156 | +v1.2.5 |
| 157 | + Performance: |
| 158 | + - hass setter now diffs configured entity states — DOM update skipped when nothing relevant changed |
| 159 | + - Updates + history polling paused while tab hidden; instant refresh on return (visibilitychange) |
| 160 | + Fixes: |
| 161 | + - Sparklines: history bucketed by timestamp into 48 uniform 30-min slots — fixes time-axis distortion |
| 162 | + and wrong tooltip times caused by significant_changes_only irregular sampling |
| 163 | + - Editor: identical config echo from HA no longer re-renders (input focus preserved) |
| 164 | + - Autarky >=90% glow implemented via SVG filter (previous CSS box-shadow was dead code on SVG) |
| 165 | + Features: |
| 166 | + - Battery runtime: charging now shows time-to-100% ETA (mirrors discharge estimate) |
| 167 | + - getGridOptions() for HA sections view sizing |
| 168 | +v1.2.4 |
| 169 | + Fixes: |
| 170 | + - Dual-MPPT crash: removed dead branch referencing dS before declaration (ReferenceError blanked the card) |
| 171 | + - Autarky badge label now translated (was hard-coded PT) |
| 172 | + - Build: outputs to dist/ (no longer overwrites source); release workflow uses npm install + uploads dist/ artifact |
| 173 | + Changed: |
| 174 | + - inverter_name HTML-escaped before SVG injection |
| 175 | + - hass-more-info dispatched as CustomEvent |
| 176 | + ──────────────────────────────────────────────────────── */ |
| 177 | + |
| 178 | +/* ════════════════════════════════════════════════════════ |
| 179 | + v1.2.3 |
| 180 | + Fixes: |
| 181 | + - Solis polarity: bat_polarity changed to 'negative' (modbus reports charging as positive, |
| 182 | + same convention as Deye/Sunsynk — no inversion needed) |
| 183 | + - LCD inverter display: now shows load power (home consumption) instead of sum of all flows |
| 184 | + Features: |
| 185 | + v1.2.2: |
| 186 | + - Fix: PV daily/voltage text spacing from sun icon |
| 187 | + - Dual MPPT layout: PV1 left of sun (▸ arrow), PV2 right (◂ arrow), |
| 188 | + each with own voltage below; symmetrical layout |
| 189 | + v1.2.1: |
| 190 | + - Fix: PV1/PV2 + voltage text overlapped sun icon (CSS .vd text-anchor:middle |
| 191 | + overrides SVG presentation attribute; now inline style) |
| 192 | + - Solis/modbus: optional split battery_charge + battery_discharge sensors |
| 193 | + (both positive); card computes discharge-charge, bypasses polarity flag |
| 194 | + - Three-phase grid voltage: optional grid_voltage_l2/l3, shown as L1/L2/L3 V |
| 195 | + - Victron dual MPPT: added pv1_power + pv2_power entity fields in preset; |
| 196 | + Solar node shows per-MPPT power breakdown when both sensors configured |
| 197 | + Visual: |
| 198 | + - Sub-labels font sizes increased: .vc 9.5px→11px, .vd 12px→13px, .vc battery 9.5px→11px |
| 199 | + ════════════════════════════════════════════════════════ */ |
| 200 | + |
| 201 | +/* ──────────────────────────────────────────────────────── |
| 202 | + v1.2.0 |
| 203 | + Visual: |
| 204 | + - Autarky badge moved to top-right corner |
| 205 | + - Badge size reduced 15% (55x40 -> 47x34) |
| 206 | + - Badge green softened — border/fill use low-alpha rgba instead of solid #66BB6A; |
| 207 | + status threshold colors (>=80/50/25%) also toned down |
| 208 | + - Added 8mm spacing between battery data and sparklines row |
| 209 | + Animation: |
| 210 | + - Inlet flows (solar/grid/battery -> inverter) run at 75% of base speed — faster |
| 211 | + - Outlet flow (inverter -> home) runs at base speed — slower |
| 212 | + - Visual effect of energy accumulating at the inverter before flowing out to home |
| 213 | + CSS Custom Properties: |
| 214 | + - --xpf-flow-width flow line stroke width (default: 3) |
| 215 | + - --xpf-dash-size dash segment size (default: 100; low value e.g. 8 = dot effect) |
0 commit comments