[goingforstudying-ctrl](/goingforstudying-ctrl)wants to merge 3 commits into
[fix(smartthings): avoid race when turning on Samsung AC before setting mode](#top)#173465[goingforstudying-ctrl](/goingforstudying-ctrl) wants to merge 3 commits into
[fix(smartthings): avoid race when turning on Samsung AC before setting mode](#top)#173465
[goingforstudying-ctrl](/goingforstudying-ctrl)wants to merge 3 commits into
Conversation #
Breaking change #
Proposed change #
When turning a Samsung AC from OFF to COOL (or any mode), async_set_hvac_mode
gathers async_turn_on()
and SET_AIR_CONDITIONER_MODE
together. Some AC units reject the mode command while still transitioning from OFF, causing a SmartThingsCommandError
with BAD_REQUEST.
The fix awaits turn_on
first, then sends the mode command sequentially. async_set_temperature
was also updated to avoid a double ON when both temp and mode change while the device is off.
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 #
- This PR fixes or closes issue: fixes
[[BUG] SmartThings climate show error when turn on #172410](https://github.com/home-assistant/core/issues/172410) - This PR is related to issue:
[SmartThings climate show error when turn on #124336](https://github.com/home-assistant/core/issues/124336) - Link to documentation pull request:
-
Link to developer documentation pull request:
-
Link to frontend pull request:
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](https://developers.home-assistant.io/docs/development_checklist/) - I have followed the
[perfect PR recommendations](https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr) - 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:
- Documentation added/updated for
[www.home-assistant.io](https://github.com/home-assistant/home-assistant.io)
If the code communicates with devices, web services, or third-party tools:
- The manifest filehas 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 diff between library versions and ideally a link to the changelog/release notes is added to the PR description.
To help with the load of incoming pull requests:
- I have reviewed two other open pull requestsin this repository.
previously requested changes
home-assistantBotJun 10, 2026
** **home-assistant Bot left a comment
left a comment
home-assistantBot There was a problem hiding this comment.
It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request.
Thanks!
[home-assistant](/apps/home-assistant)Bot added
[cla-needed](/home-assistant/core/issues?q=state%3Aopen%20label%3Acla-needed)
[integration: smartthings](/home-assistant/core/issues?q=state%3Aopen%20label%3A%22integration%3A%20smartthings%22)
[small-pr](/home-assistant/core/issues?q=state%3Aopen%20label%3Asmall-pr)
[Top 100](/home-assistant/core/issues?q=state%3Aopen%20label%3A%22Top%20100%22)
[Top 200](/home-assistant/core/issues?q=state%3Aopen%20label%3A%22Top%20200%22)
Jun 10, 2026
| Hey there ## Code owner commandsCode owners of |
| Please take a look at the requested changes, and use the |
** **Copilot AI left a comment
left a comment
CopilotAI There was a problem hiding this comment.
Pull request overview #
Note
Copilot was unable to run its full agentic suite in this review.
This PR converts concurrent command execution (asyncio.gather
) to sequential await
calls in the SmartThings climate integration to fix issues where Samsung AC units reject mode commands sent concurrently with the power on command.
Changes:
- Replaced
asyncio.gather
with sequentialawait
inasync_set_hvac_mode
to ensure the device is powered on before sending mode changes. - Replaced
asyncio.gather
with sequentialawait
inasync_set_temperature
, restructuring the control flow with an early return for the OFF case.
homeassistant/components/smartthings/climate.py
[home-assistant](/apps/home-assistant)Bot added
[cla-recheck](/home-assistant/core/issues?q=state%3Aopen%20label%3Acla-recheck)
[cla-signed](/home-assistant/core/issues?q=state%3Aopen%20label%3Acla-signed)and removed
[cla-recheck](/home-assistant/core/issues?q=state%3Aopen%20label%3Acla-recheck)
[cla-needed](/home-assistant/core/issues?q=state%3Aopen%20label%3Acla-needed)labels
Jun 10, 2026
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/07e49424a09333327bf873dbf0e05bff0d82d98e..388cc478ae3b0914ef333504fabeab28ca4e3997)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/07e49424a09333327bf873dbf0e05bff0d82d98e)
07e4942
388cc47
June 10, 2026 21:36
** **Copilot AI left a comment
left a comment
CopilotAI There was a problem hiding this comment.
Pull request overview #
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
homeassistant/components/smartthings/climate.py
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/c8e0802e86dfd56e539ad4aff904e324eb49a1c1..d8cb7dfc8b5b38bf72a861e242497127e9f1a2c4)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/c8e0802e86dfd56e539ad4aff904e324eb49a1c1)
c8e0802
d8cb7df
June 11, 2026 04:29
** **Copilot AI left a comment
left a comment
CopilotAI There was a problem hiding this comment.
Pull request overview #
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/d8cb7dfc8b5b38bf72a861e242497127e9f1a2c4..e1e0f2eda318906f54972c6c676b7444a2fb3614)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/d8cb7dfc8b5b38bf72a861e242497127e9f1a2c4)
d8cb7df
e1e0f2e
June 11, 2026 04:52
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/e1e0f2eda318906f54972c6c676b7444a2fb3614..feb0ad2275e835d311e3ce1b534a0d18e0602db8)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/e1e0f2eda318906f54972c6c676b7444a2fb3614)
e1e0f2e
feb0ad2
June 11, 2026 07:13
** **Copilot AI left a comment
left a comment
CopilotAI There was a problem hiding this comment.
Pull request overview #
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
| The check is failing because this PR is missing one of the required labels (breaking-change, bugfix, code-quality, dependency, deprecation, new-feature, new-integration). Since this is a bug fix for a race condition, could a maintainer please add the label? Thanks! |
| Hi maintainers, two quick items: Thanks! |
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/c8f0f20530dbd22808a4c9f1a7d10612ee54faf1..63b4b5db129ee7c43363e3cb30e0f9c24cfdf745)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/c8f0f20530dbd22808a4c9f1a7d10612ee54faf1)
c8f0f20
63b4b5d
June 13, 2026 04:33
** **Copilot AI left a comment
left a comment
CopilotAI There was a problem hiding this comment.
Pull request overview #
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
| Did you read my last comment? |
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/63b4b5db129ee7c43363e3cb30e0f9c24cfdf745..595ce306c27cba0a70446174bb1ca866473c92e0)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/63b4b5db129ee7c43363e3cb30e0f9c24cfdf745)
63b4b5d
595ce30
June 13, 2026 07:04
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/595ce306c27cba0a70446174bb1ca866473c92e0..5b1229f6b4a496b8fdf6781c718387699aa662ff)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/595ce306c27cba0a70446174bb1ca866473c92e0)
595ce30
5b1229f
June 13, 2026 09:16
** **Copilot AI left a comment
left a comment
CopilotAI There was a problem hiding this comment.
Pull request overview #
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/5b1229f6b4a496b8fdf6781c718387699aa662ff..ab4bbbc12f80d5596ea685555970751f5c6c4684)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/5b1229f6b4a496b8fdf6781c718387699aa662ff)
5b1229f
ab4bbbc
June 13, 2026 12:05
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/ab4bbbc12f80d5596ea685555970751f5c6c4684..1ca960a5360046d5ca392aac6a89c67825d95f13)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/ab4bbbc12f80d5596ea685555970751f5c6c4684)
ab4bbbc
1ca960a
June 13, 2026 14:24
** **Copilot AI left a comment
left a comment
CopilotAI There was a problem hiding this comment.
Pull request overview #
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/1ca960a5360046d5ca392aac6a89c67825d95f13..8821ed02ab99e26ae2e0ebffa12a48d928d8a1a2)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/1ca960a5360046d5ca392aac6a89c67825d95f13)
1ca960a
8821ed0
June 13, 2026 16:06
** **Copilot AI left a comment
left a comment
CopilotAI There was a problem hiding this comment.
Pull request overview #
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/8821ed02ab99e26ae2e0ebffa12a48d928d8a1a2..33d528b2c7a9fc6bb43f910bc974efb3bd349381)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/8821ed02ab99e26ae2e0ebffa12a48d928d8a1a2)
8821ed0
33d528b
June 13, 2026 17:20
| Hi |
| Hi maintainers — this PR fixes a bug ( |
| Hi Now, could you please add the |
[goingforstudying-ctrl](/goingforstudying-ctrl)
[force-pushed](/home-assistant/core/compare/33d528b2c7a9fc6bb43f910bc974efb3bd349381..6f03190dd86cda1ee7c1336cac445a1a19a540db)the fix/smartthings-ac-turn-on-race branch from
[to](/home-assistant/core/commit/33d528b2c7a9fc6bb43f910bc974efb3bd349381)
33d528b
6f03190
June 13, 2026 22:07
** **Copilot AI left a comment
left a comment
CopilotAI There was a problem hiding this comment.
Pull request overview #
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
| Hi maintainers, the prek check requires a type label to be set. This PR is a bugfix (race condition fix for Samsung AC). Could someone please add the |
|
AI Contribution Form #
|
|
AI Contribution Form #
The PR itself is a straightforward bugfix (race condition fix for Samsung AC |
| |
Learn more about bidirectional Unicode characters