Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cloud switch entity _update_state function a coro #647

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

jpbede
Copy link
Contributor

@jpbede jpbede commented Mar 1, 2024

Description

Make the _update_state function of the cloud switch entities a coro.

Motivation and Context

The async_listen_updates of the cloud client requires the function to be a coro, as the function uses the async_create_catching_coro logging helper of core, which (in some nested functions) always awaits.

How has this been tested?

This appeared while beta testing home-assistant/core#111797.
I applied this change on my prod system and the log went away.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link

sonarcloud bot commented Mar 1, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@jpbede jpbede changed the title Make cloud switch _update_state function a coro Make cloud switch entity _update_state function a coro Mar 1, 2024
@frenck frenck added the bugfix Inconsistencies or issues which will cause a problem for users or implementors. label Mar 6, 2024
Copy link
Owner

@frenck frenck left a comment

Choose a reason for hiding this comment

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

Thanks, @jpbede 👍

../Frenck

@frenck frenck merged commit a4b4e74 into frenck:main Mar 6, 2024
6 of 7 checks passed
@jpbede jpbede deleted the cloud-switch-update-coro branch March 7, 2024 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants