developers.home-assistant/docs/core/integration-quality-scale/rules/async-dependency.md

731 B

title related_rules
Dependency is async
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.

Exceptions

There are no exceptions to this rule.