Skip to content

Conversation

@XiaoLing-git
Copy link
Contributor

Breaking change

Proposed change

Make sure update state once every 10 min

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Dec 9, 2025

Hey there @SeraphicRav, @laurence-presland, @Gigatrappeur, mind taking a look at this pull request as it has been labeled with an integration (switchbot_cloud) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of switchbot_cloud can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign switchbot_cloud Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@daylanKifky
Copy link

Hi Xiaoling-git!

This PR looks like it should fix the related issue. But the title is misleading and the description could be more complete.

  • Were you able to fix it?
  • What local tests did you perform?
  • Can you add an automated test that asserts this bugfix?

@XiaoLing-git XiaoLing-git changed the title Switchbot Cloud: Try Fixed Binary Sensor Not Update Switchbot Cloud: Fixed binary sensors didn't update automatically Dec 11, 2025
@XiaoLing-git
Copy link
Contributor Author

I'm very sorry for confusioning you. I work at Switchbot and have recently received a lot of customer feedback about binary sensors not automatically updating their status. After carefully reviewing the code, I made some modifications that I hope will help. I've already tested the functionality on a contact sensor, and it works.

@daylanKifky
Copy link

Great! Thanks for the clarification. I was able to get the context of the bug by looking at the conversation in the linked issue.

What I mean is: in order for someone to review this, there needs to be a way to verify that this change is working and doesn't break anything. At first glance, it looks like a small, harmless change. But if you could add a specific test to assert the fix, that would be great.

If—because of the nature of this change—this isn't something that can be easily tested, please mention the existing test that covers this part, or (not ideal) describe in detail the local testing you did with the sensor.

@joostlek joostlek added this to the 2025.12.3 milestone Dec 12, 2025
@joostlek joostlek merged commit 0a789f5 into home-assistant:dev Dec 12, 2025
36 checks passed
frenck pushed a commit that referenced this pull request Dec 12, 2025
@frenck frenck mentioned this pull request Dec 12, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants