Conversation
There was a problem hiding this comment.
Hello @zerzhang,
When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).
The commits that are missing a linked GitHub account are the following:
-
acbaafa613b0a58e5918a50a5a16faae30070438- This commit has something that looks like an email address (zhangpeng@onero.com). Maybe try linking that to GitHub?. -
d5f3b4b8a61c0037e59f3285dd781528a80737ef- This commit has something that looks like an email address (zhangpeng@onero.com). Maybe try linking that to GitHub?.
Unfortunately, we are unable to accept this pull request until this situation is corrected.
Here are your options:
-
If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.
-
If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.
- If you only made a single commit you should be able to run
(substituting "Author Name" and "
git commit --amend --author="Author Name <email@address.com>"email@address.com" for your actual information) to set the authorship information. - If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
- You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
- You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
- Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.
- If you only made a single commit you should be able to run
We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.
Thanks, I look forward to checking this PR again soon! ❤️
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
Hey there @Danielhiversen, @RenierM26, @murtas, @Eloston, @dsypniewski, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Pull request overview
Updates the Switchbot integration to use PySwitchbot 2.0.0, including adopting the new region-specific air purifier model identifiers and adjusting tests accordingly.
Changes:
- Bump PySwitchbot dependency to
2.0.0(manifest + generated requirements files). - Replace legacy air purifier model identifiers with region-specific variants (
*_JP/*_US) in integration constants and platform/class mappings. - Update Switchbot fan tests to use the new model strings and import
SwitchbotOperationErrorfrom the top-levelswitchbotpackage.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/switchbot/manifest.json |
Bumps integration requirement to PySwitchbot 2.0.0. |
requirements_all.txt |
Updates pinned PySwitchbot version used by the project. |
requirements_test_all.txt |
Updates pinned PySwitchbot version for test environment. |
homeassistant/components/switchbot/const.py |
Renames supported air purifier models to new region-specific identifiers and updates model mappings. |
homeassistant/components/switchbot/__init__.py |
Updates platform/class routing for the new air purifier model identifiers. |
tests/components/switchbot/test_fan.py |
Updates tests to use new model strings and adjusts SwitchbotOperationError import. |
You can also share your feedback on Copilot code review. Take the survey.
| "loggers": ["switchbot"], | ||
| "quality_scale": "gold", | ||
| "requirements": ["PySwitchbot==1.1.0"] | ||
| "requirements": ["PySwitchbot==2.0.0"] |
| AIR_PURIFIER_JP = "air_purifier_jp" | ||
| AIR_PURIFIER_US = "air_purifier_us" | ||
| AIR_PURIFIER_TABLE_JP = "air_purifier_table_jp" | ||
| AIR_PURIFIER_TABLE_US = "air_purifier_table_us" |
d5f3b4b to
2a976dc
Compare
There was a problem hiding this comment.
Hello @zerzhang,
When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).
The commits that are missing a linked GitHub account are the following:
acbaafa613b0a58e5918a50a5a16faae30070438- This commit has something that looks like an email address (zhangpeng@onero.com). Maybe try linking that to GitHub?.
Unfortunately, we are unable to accept this pull request until this situation is corrected.
Here are your options:
-
If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.
-
If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.
- If you only made a single commit you should be able to run
(substituting "Author Name" and "
git commit --amend --author="Author Name <email@address.com>"email@address.com" for your actual information) to set the authorship information. - If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
- You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
- You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
- Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.
- If you only made a single commit you should be able to run
We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.
Thanks, I look forward to checking this PR again soon! ❤️
There was a problem hiding this comment.
Hello @zerzhang,
When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).
The commits that are missing a linked GitHub account are the following:
acbaafa613b0a58e5918a50a5a16faae30070438- This commit has something that looks like an email address (zhangpeng@onero.com). Maybe try linking that to GitHub?.
Unfortunately, we are unable to accept this pull request until this situation is corrected.
Here are your options:
-
If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.
-
If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.
- If you only made a single commit you should be able to run
(substituting "Author Name" and "
git commit --amend --author="Author Name <email@address.com>"email@address.com" for your actual information) to set the authorship information. - If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
- You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
- You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
- Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.
- If you only made a single commit you should be able to run
We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.
Thanks, I look forward to checking this PR again soon! ❤️
There was a problem hiding this comment.
Pull request overview
Updates the Home Assistant SwitchBot integration to use PySwitchbot 2.0.0, aligning model identifiers and error imports with the upstream library changes.
Changes:
- Bump PySwitchbot from 1.1.0 to 2.0.0 across integration manifest and requirements files.
- Replace legacy air purifier model identifiers with new region-specific variants (JP/US) throughout the integration and tests.
- Update
SwitchbotOperationErrorimports to use the top-levelswitchbotpackage export.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| homeassistant/components/switchbot/init.py | Update platform/class mappings for region-specific air purifier model strings |
| homeassistant/components/switchbot/const.py | Replace air purifier model enums/mappings with JP/US variants |
| homeassistant/components/switchbot/entity.py | Import SwitchbotOperationError from top-level switchbot |
| homeassistant/components/switchbot/select.py | Import SwitchbotOperationError from top-level switchbot |
| homeassistant/components/switchbot/manifest.json | Bump integration requirement to PySwitchbot 2.0.0 |
| requirements_all.txt | Bump PySwitchbot to 2.0.0 |
| requirements_test_all.txt | Bump PySwitchbot to 2.0.0 |
| tests/components/switchbot/test_fan.py | Update air purifier sensor_type strings to JP/US variants; update error import |
| tests/components/switchbot/test_cover.py | Update SwitchbotOperationError import |
| tests/components/switchbot/test_humidifier.py | Update SwitchbotOperationError import |
| tests/components/switchbot/test_light.py | Update SwitchbotOperationError import |
| tests/components/switchbot/test_lock.py | Update SwitchbotOperationError import |
| tests/components/switchbot/test_switch.py | Update SwitchbotOperationError import |
You can also share your feedback on Copilot code review. Take the survey.
| SupportedModels.AIR_PURIFIER_JP.value: [Platform.FAN, Platform.SENSOR], | ||
| SupportedModels.AIR_PURIFIER_US.value: [Platform.FAN, Platform.SENSOR], | ||
| SupportedModels.AIR_PURIFIER_TABLE_JP.value: [Platform.FAN, Platform.SENSOR], | ||
| SupportedModels.AIR_PURIFIER_TABLE_US.value: [Platform.FAN, Platform.SENSOR], |
There was a problem hiding this comment.
Hello @zerzhang,
When attempting to inspect the commits of your pull request for CLA signature status among all authors we encountered commit(s) which were not linked to a GitHub account, thus not allowing us to determine their status(es).
The commits that are missing a linked GitHub account are the following:
acbaafa613b0a58e5918a50a5a16faae30070438- This commit has something that looks like an email address (zhangpeng@onero.com). Maybe try linking that to GitHub?.
Unfortunately, we are unable to accept this pull request until this situation is corrected.
Here are your options:
-
If you had an email address set for the commit that simply wasn't linked to your GitHub account you can link that email now and it will retroactively apply to your commits. The simplest way to do this is to click the link to one of the above commits and look for a blue question mark in a blue circle in the top left. Hovering over that bubble will show you what email address you used. Clicking on that button will take you to your email address settings on GitHub. Just add the email address on that page and you're all set. GitHub has more information about this option in their help center.
-
If you didn't use an email address at all, it was an invalid email, or it's one you can't link to your GitHub, you will need to change the authorship information of the commit and your global Git settings so this doesn't happen again going forward. GitHub provides some great instructions on how to change your authorship information in their help center.
- If you only made a single commit you should be able to run
(substituting "Author Name" and "
git commit --amend --author="Author Name <email@address.com>"email@address.com" for your actual information) to set the authorship information. - If you made more than one commit and the commit with the missing authorship information is not the most recent one you have two options:
- You can re-create all commits missing authorship information. This is going to be the easiest solution for developers that aren't extremely confident in their Git and command line skills.
- You can use this script that GitHub provides to rewrite history. Please note: this should be used only if you are very confident in your abilities and understand its impacts.
- Whichever method you choose, I will come by to re-check the pull request once you push the fixes to this branch.
- If you only made a single commit you should be able to run
We apologize for this inconvenience, especially since it usually bites new contributors to Home Assistant. We hope you understand the need for us to protect ourselves and the great community we all have built legally. The best thing to come out of this is that you only need to fix this once and it benefits the entire Home Assistant and GitHub community.
Thanks, I look forward to checking this PR again soon! ❤️
How can we avoid this? Because we can't just break it for everyone with such device. Can we detect the mode of the device? |
Due to changes in device naming conventions, all users are required to re-add their devices after upgrading their HA version. In response to user requests, future Pull Requests will introduce support for functions specific to various device types. |
|
This device comes in four variants; the original two types were insufficient in scope and presented functional conflicts. |
|
Right, but how do we know what type the user has? We know via the Bluetooth service info right? Can't we migrate this then |
Yes, device types are indeed determined based on service data. Previously, I had merged the US and JP types into a single category; however, there are actually slight differences between the two. This update further distinguishes between them to facilitate the integration of future features. |
|
So what stops us from redefining the model users have? |
Originally, US and JP were treated as a single type, and TABLE_US and TABLE_JP were treated as a single type. |
|
That's not what I mean. When we set up the device, we can recognize the type of the device the user is using. We don't need to have the user fill this in. Are we able to have logic that during setup checks if it's a deprecated type, and if it is, check again what type of device it is, and update it directly? This way the user doesn't know anything and we can have this logic before connecting |
Breaking change
None for end users. Existing config entries using the old sensor type strings (air_purifier, air_purifier_table) are replaced by region-specific values; affected users will need to reconfigure.
Proposed change
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: