Skip to content

fan: handle bridge errors as HomeAssistantError#137

Merged
michaelarnauts merged 1 commit into
michaelarnauts:masterfrom
jensihnow:fix/fan-bridge-error-handling
Apr 22, 2026
Merged

fan: handle bridge errors as HomeAssistantError#137
michaelarnauts merged 1 commit into
michaelarnauts:masterfrom
jensihnow:fix/fan-bridge-error-handling

Conversation

@jensihnow

Copy link
Copy Markdown
Contributor

Wrap set_speed() and set_mode() bridge calls with exception handlers for ComfoConnectNotConnected and ComfoConnectRmiError, re-raising both as HomeAssistantError. This surfaces bridge rejections (e.g. RMI_ERROR) as a user-facing HA notification instead of an unhandled exception in the logs.

This is improving the experience reports in #126 but not solving the underlying issue.

Wrap set_speed() and set_mode() bridge calls with exception handlers
for ComfoConnectNotConnected and ComfoConnectRmiError, re-raising both
as HomeAssistantError. This surfaces bridge rejections (e.g. RMI_ERROR)
as a user-facing HA notification instead of an unhandled exception in
the logs.
@jensihnow

Copy link
Copy Markdown
Contributor Author

The fix wraps async_set_percentage and async_set_preset_mode with exception handling. async_turn_on and async_turn_off are covered transitively since they delegate to those two methods.

@michaelarnauts michaelarnauts merged commit e4f5d12 into michaelarnauts:master Apr 22, 2026
1 check 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