Add integration quality scale docs (#2457)

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
Joost Lekkerkerker
2024-11-20 17:41:19 +01:00
committed by GitHub
parent a1f286224a
commit cf52c30bc0
62 changed files with 3128 additions and 70 deletions

View File

@@ -0,0 +1,25 @@
---
title: "Dependency is async"
related_rules:
- inject-websession
---
import RelatedRules from './_includes/related_rules.jsx'
## Reasoning
Home Assistant works with asyncio to be efficient when handling tasks.
To avoid switching context between the asyncio event loop and other threads, which is costly performance wise, ideally, your library should also use asyncio.
This results not only in a more efficient system but the code is also more neat.
## Additional resources
More information on how to create a library can be found in the [documentation](../../../api_lib_index).
## Exceptions
There are no exceptions to this rule.
## Related rules
<RelatedRules relatedRules={frontMatter.related_rules}></RelatedRules>