Skip to content

feat(realtime): add MQTT connection retry and fix sensor availability… - #26

Open
stuartp44 wants to merge 8 commits into
mainfrom
stu/add_connection_retry
Open

feat(realtime): add MQTT connection retry and fix sensor availability…#26
stuartp44 wants to merge 8 commits into
mainfrom
stu/add_connection_retry

Conversation

@stuartp44

Copy link
Copy Markdown
Owner

This pull request introduces robust MQTT reconnection logic to the minibrew integration and simplifies the logic for determining sensor availability. The MQTT client will now automatically attempt to reconnect after a disconnect or connection failure, improving reliability. Additionally, redundant or inconsistent available property implementations across sensor entities have been consolidated, standardising the determination of sensor availability.

MQTT Reconnection Improvements:

  • Added automatic reconnection logic to the MQTT client, including a 30-second delay before retrying after disconnects or connection failures. This ensures more reliable real-time updates from devices. [1] [2] [3] [4] [5] [6]

Sensor Availability Logic Simplification:

  • Consolidated and standardised the available property for all sensor entities to consistently check both for successful coordinator updates and the presence of device data, removing redundant or inconsistent checks based on individual sensor values. [1] [2] [3]
  • Removed unnecessary available property overrides in multiple sensor classes, reducing code duplication and potential for errors. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22]

… checks

- Implement automatic reconnect with configurable delay for transient network failures
- Add _schedule_reconnect and _async_reconnect methods to handle MQTT disconnections gracefully
- Fix sensor available properties to require both successful coordinator updates and valid device data
@stuartp44 stuartp44 linked an issue Aug 26, 2026 that may be closed by this pull request
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.

Some sensors not working

1 participant