Skip to content

fix: abort setup when no WiFi-connected fireplaces found#60

Merged
deviantintegral merged 2 commits intomainfrom
fix/no-wifi-fireplaces-abort
Mar 20, 2026
Merged

fix: abort setup when no WiFi-connected fireplaces found#60
deviantintegral merged 2 commits intomainfrom
fix/no-wifi-fireplaces-abort

Conversation

@deviantintegral
Copy link
Owner

Summary

  • During config flow setup, after successful authentication, validates that at least one fireplace has a valid WiFi overview before creating the config entry
  • If no WiFi fireplaces are found, aborts with a message explaining the fireplace may be Bluetooth-only and not compatible
  • Adds defensive TypeError/KeyError handling in the coordinator's _async_update_data() to gracefully skip fires with null WifiFireOverview

Closes #55

Test plan

  • Test config flow with account that has WiFi fireplaces — should complete normally
  • Test config flow with account that has only Bluetooth fireplaces — should abort with no_wifi_fireplaces message
  • Test config flow with account that has no fireplaces — should abort with no_wifi_fireplaces message
  • Test that existing setups with mixed WiFi/Bluetooth fireplaces continue to poll successfully, skipping Bluetooth-only fires
  • Verify translation string renders correctly in the HA UI

🤖 Generated with Claude Code

deviantintegral and others added 2 commits March 16, 2026 15:18
During initial config flow setup, after successful authentication, verify
that at least one fireplace has a valid WiFi overview before creating the
config entry. If none are found, abort with a user-friendly message
explaining that their fireplace may be Bluetooth-only.

Also adds defensive TypeError/KeyError handling in the coordinator's
_async_update_data() to gracefully skip fires whose WifiFireOverview is
null in the API response.

Closes #55

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…andling

- New test_validate_fireplaces.py: tests for the validate_fireplaces
  validator covering success, no fires, all-Bluetooth (TypeError/KeyError),
  mixed WiFi+Bluetooth, and early-return short-circuit cases
- Config flow tests: abort on no WiFi fireplaces, connection errors during
  fireplace check, updated happy path to mock _validate_fireplaces
- Coordinator tests: TypeError and KeyError handling in _async_update_data

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@deviantintegral deviantintegral marked this pull request as ready for review March 20, 2026 00:00
@deviantintegral
Copy link
Owner Author

Static review looks good to me. I'm not willing to reset my account to test the error cases right now, but given that those cases mean that the integration will never work anyways I'm OK with that!

@deviantintegral deviantintegral merged commit 89586db into main Mar 20, 2026
8 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.

TypeError: 'NoneType' object is not subscriptable

1 participant