Skip to content

Comments

[meross] Fix cloud fallback not being called#19536

Merged
lsiepel merged 1 commit intoopenhab:mainfrom
mherwege:meross
Oct 24, 2025
Merged

[meross] Fix cloud fallback not being called#19536
lsiepel merged 1 commit intoopenhab:mainfrom
mherwege:meross

Conversation

@mherwege
Copy link
Contributor

Fixes #19501

When local communication fails handling a command, the binding should fall back to the cloud mqtt broker connection. This was never happening.

@fabgio Please have a look.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
@lsiepel lsiepel requested a review from Copilot October 24, 2025 08:40
@lsiepel lsiepel added the bug An unexpected problem or unintended behavior of an add-on label Oct 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where the Meross binding failed to fall back to cloud MQTT when local device communication failed. The logic was inverted, causing the cloud fallback to execute when local communication succeeded instead of when it failed.

Key changes:

  • Inverted the conditional logic to correctly trigger cloud fallback on local communication failure
  • Moved cloud fallback logging outside the try-catch block for accurate error reporting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@lsiepel lsiepel merged commit a787714 into openhab:main Oct 24, 2025
3 checks passed
@lsiepel lsiepel added this to the 5.1 milestone Oct 24, 2025
@mherwege mherwege deleted the meross branch October 24, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An unexpected problem or unintended behavior of an add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[meross] Reimplement lighting's channel ON/OFF management in accordance with the new binding architecture

2 participants