feat(realtime): add MQTT connection retry and fix sensor availability… - #26
Open
stuartp44 wants to merge 8 commits into
Open
feat(realtime): add MQTT connection retry and fix sensor availability…#26stuartp44 wants to merge 8 commits into
stuartp44 wants to merge 8 commits into
Conversation
… 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
Closed
…tion in data updates
…ailability handling
…p sensors with caching
…connected binary sensors with serial-based IDs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces robust MQTT reconnection logic to the
minibrewintegration 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 inconsistentavailableproperty implementations across sensor entities have been consolidated, standardising the determination of sensor availability.MQTT Reconnection Improvements:
Sensor Availability Logic Simplification:
availableproperty 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]availableproperty 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]