Skip to content

fix: refresh clock sensors on Home Assistant restart - #86

Merged
dougrathbone merged 2 commits into
masterfrom
dougrathbone/clock-ha-restart-resync-678d
Aug 24, 2026
Merged

fix: refresh clock sensors on Home Assistant restart#86
dougrathbone merged 2 commits into
masterfrom
dougrathbone/clock-ha-restart-resync-678d

Conversation

@dougrathbone

Copy link
Copy Markdown
Owner

Summary

Fixes the follow-up on #66: after a Home Assistant restart, C-Bus clock date/time sensors went unknown even though lighting and security resynced, and C-Gate’s clock request_refresh echo was logged as an unparsed clock line.

Changes

  • Ask C-Gate for a clock refresh on the same HA-restart / MQTT-reconnect resync path as lighting getall and security status.
  • Consume clock request_refresh event-port echoes (the captured sourceunit=0 line) so they are not logged as unparsed.
  • Patch release 1.30.1.

Closes the remaining #66 follow-up from #66 (comment).

Test plan

  • npm test passes locally with no failures
  • New unit coverage for request_refresh recognition, silent consume, and resync calling clock refresh
  • Existing tests were not broken or removed without justification

Checklist

  • Version bumped in package.json and homeassistant-addon/config.yaml (if releasing)
  • CHANGELOG.md updated (if releasing)
  • No sensitive data or credentials included
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 24, 2026 11:53
Clock date and time went unknown after an HA restart because resync
requested lighting levels and security status but never asked C-Gate
for a clock refresh. Include that refresh on the same path, and consume
the REQUEST_REFRESH event-port echo so it is not logged as unparsed.

Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
Co-authored-by: Doug Rathbone <dougrathbone@users.noreply.github.com>
@dougrathbone
dougrathbone marked this pull request as ready for review August 24, 2026 11:58
@dougrathbone
dougrathbone merged commit 08a70e1 into master Aug 24, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants