-
-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Use config_entry.unique_id in Linky #31051
Conversation
def _show_setup_form(self, user_input=None, errors=None): | ||
pass | ||
|
||
async def _show_setup_form(self, user_input=None, errors=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why make it async ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's async in adguard
, icloud
, twentemilieu
and also not a callback
(but not async) in elgato
and wled
.
Don't know exactly which is the best, but can fix other components if needed.
- No callback no async
- No callback async
- Callback no async
- Callback async
Getting confused, it's not homogen in the code 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's best to not define coroutines if we don't need to. There's an overhead to awaiting a coroutine compared to running a callback in the event loop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Breaking Change:
None
Description:
Use config_entry.unique_id in Linky
Checklist:
tox
. Your PR cannot be merged unless tests pass