frenck / spook

Spook 👻 Your homie
https://spook.boo
MIT License
360 stars 34 forks source link

Make cloud switch entity `_update_state` function a coro #647

Closed jpbede closed 1 month ago

jpbede commented 1 month ago

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 https://github.com/home-assistant/core/issues/111797. I applied this change on my prod system and the log went away.

Screenshots (if appropriate):

Types of changes

Checklist

sonarcloud[bot] commented 1 month ago

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