Releases: bareli/dud_shemesh
Release list
v0.4.12
Apply panel fixes to the Lovelace card
The fixes shipped in 0.4.5–0.4.10 only touched the sidebar panel (panel.js); the Lovelace card (card.js) still polled every 5 s with no live ticker, no state_changed subscription, no re-attach handling, and no visibility wake-up.
All of the same logic is now ported to the card:
- Per-second
Ends incountdown with server clock skew correction. - Immediate refresh on heater entity
state_changed(matches the way other Lovelace cards stay in sync). - Restart of timers and subscriptions when the card is re-attached to the DOM (HA detaches/reattaches custom elements on navigation).
- Force-refresh when the browser tab returns to foreground (browsers throttle
setIntervalin background tabs).
Also removed the diagnostic console.log calls added in 0.4.11 from panel.js.
After upgrading: HACS update → restart Home Assistant → hard-refresh browser (Ctrl+Shift+R).
v0.4.11
Diagnostic logging
Adds console.log calls to verify the panel actually subscribes to the heater entity's state_changed events and that the 1-second tick handler is firing. Logs prefixed [dud_shemesh]. Diagnostic only — will be cleaned up once the upstream issue is identified.
v0.4.10
Subscribe to raw state_changed events
Replaced the subscribe_trigger WS message (which proved unreliable in panel_custom-hosted custom elements) with a direct subscribeEvents("state_changed") subscription. The callback filters by entity_id and triggers an immediate _refresh() whenever the heater entity changes — same mechanism Lovelace cards rely on, so panel state stays in sync with any external toggle.
After upgrading: HACS update → restart Home Assistant → hard-refresh browser (Ctrl+Shift+R). Verify the panel header shows v0.4.10 next to the title.
v0.4.9
Visibility handling + panel version pill
visibilitychangelistener: when the browser tab returns to foreground (browsers throttlesetIntervalin background tabs), the panel forces an immediate_refresh()plus a countdown tick so the UI is current within a frame.- Header now shows the panel.js version (
vX.Y.Znext to the title) so it's possible to verify which build the browser actually loaded — useful when diagnosing cache issues after upgrades.
After upgrading: restart Home Assistant, then hard-refresh the browser (Ctrl+Shift+R / Cmd+Shift+R). Look at the panel header — if it doesn't show v0.4.9, the browser served a cached panel.js.
v0.4.8
Restart timers and subscriptions on panel re-attach
This is the actual root cause behind the v0.4.5–v0.4.7 attempts. HA detaches and re-attaches the panel custom-element when navigating between sidebar entries. Previous code cleared timers in disconnectedCallback but the _init guard (if (!_initialized)) prevented re-setup on re-attach. Result: no 5 s poll, no 1 s countdown ticker, no heater state subscription — UI froze until a full page reload (F5).
connectedCallbacknow restarts timers and re-subscribes to the heater entity even when already initialized;_initis still only called the first time.- Fixes both: external heater toggle UI sync, and live "Heating ends in" countdown.
After upgrading: restart Home Assistant, then hard-refresh the browser (Ctrl+Shift+R / Cmd+Shift+R) so the new panel.js is fetched once. After that no more refreshing should be needed.
v0.4.7
Live "Heating ends in" countdown
- "Heating ends in" pill now ticks every second client-side instead of only refreshing on the 5 s WS poll.
- Format is
MM:SSwhile under an hour,Hh MMmabove. - Server-client clock skew is corrected on every poll.
- When the timer hits 0, panel refreshes immediately to pick up the heat-finished state.
After upgrading: restart Home Assistant, then hard-refresh the browser (Ctrl+Shift+R / Cmd+Shift+R) so the new panel.js is fetched.
v0.4.6
Subscribe to heater state changes via WS trigger
- Panel registers a
subscribe_triggerWebSocket subscription on the configured heater entity. When the entity changes state, HA pushes a trigger message and the panel calls_refresh()150 ms later. - Doesn't depend on
set hass()semantics orpanel_customreactive updates which proved unreliable. - Fixes the case where the heater is toggled externally (custom button, another automation) and the panel UI continued to show "STOP HEATING" until the next 5 s poll.
After upgrading: restart Home Assistant, then hard-refresh the browser (Ctrl+Shift+R / Cmd+Shift+R) so the new panel.js is fetched.
v0.4.5
Refresh panel on heater entity state change
- Panel watches the configured heater entity directly via
set hass()(called by HA on every state update). When the entity transitions on↔off, panel triggers an immediate_refresh(). - Replaces the v0.4.4 event-bus subscription which relied on backend events being dispatched and required an HA restart to pick up; this approach reacts to the entity state itself.
- Closes the visible lag where toggling the heater externally still showed "STOP HEATING" until the next 5 s poll.
v0.4.4
Instant panel refresh on heater events
- Panel subscribes to HA event bus (
dud_shemesh_heat_started,heat_finished,target_reached,boost_extended) and refreshes UI immediately instead of waiting up to 5 s for the next poll. - Closes the visible lag where a heater turned off externally still showed "STOP HEATING" until the next tick.
Backend already dispatched these events via hass.bus.async_fire since v0.4.3 (state-change listener); v0.4.4 wires the panel to listen for them.
v0.4.3
0.4.3 — sync with external heater state changes
- Listens to the heater entity's state. When it transitions to off/closed/unavailable while integration thinks it's heating (e.g. user turned it off via a custom button or another automation), the active session is closed cleanly with status
external_stop. Panel and reports stay in sync.