Skip to content

Mark Gateway/Solar devices unavailable when their energy site is missing#15

Merged
Bre77 merged 1 commit into
mainfrom
fm/homey-r3-init-failure
Jul 22, 2026
Merged

Mark Gateway/Solar devices unavailable when their energy site is missing#15
Bre77 merged 1 commit into
mainfrom
fm/homey-r3-init-failure

Conversation

@Bre77

@Bre77 Bre77 commented Jul 22, 2026

Copy link
Copy Markdown
Member

Intent

  • Fix Gateway and Solar devices staying "available" after a failed bind: when the energy site isn't found on init, they only logged the error and returned, leaving the device looking healthy while dead
    • Vehicle and Powerwall already call setUnavailable(...) in this exact path; bring Gateway and Solar in line with that pattern
    • Added a test per driver in test/device-oninit-no-product.test.ts alongside the existing Vehicle/Powerwall coverage
  • Confirmed Wall Connector's unknown wall_connector_state handling already surfaces via this.log (no change needed there)

Init-failure paths are otherwise awkward to exercise end-to-end (no live Teslemetry site to fail against), so coverage here is limited to the device-stub unit tests already used for Vehicle/Powerwall.

…battery

Gateway and Solar devices logged and silently returned when their energy
site wasn't found on init, leaving the device looking available but dead.
Vehicle and Powerwall already called setUnavailable in the equivalent
path; align Gateway and Solar with that pattern.
@Bre77
Bre77 merged commit e84532e into main Jul 22, 2026
2 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.

1 participant