mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-16 05:46:30 +00:00
Add blog post for new async_services_for_domain (#2050)
This commit is contained in:
parent
3626c91374
commit
8d6ca7126f
9
blog/2024-01-22-async_services_for_domain.md
Normal file
9
blog/2024-01-22-async_services_for_domain.md
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
author: J. Nick Koston
|
||||
authorURL: https://github.com/bdraco
|
||||
title: Enumerating services
|
||||
---
|
||||
|
||||
In Home Assistant 2024.2, we will introduce `hass.services.async_services_for_domain()`, which is a new way to enumerate services by domain, allowing integrations to inspect which services are available without having to obtain all the services on the system. We found that most integrations are only interested in the services they provide, and it was expensive to enumerate all the services in the system when an integration was only interested in their services.
|
||||
|
||||
Integrations that call `hass.services.async_services()[DOMAIN]` to get services for a specific domain should replace the call with `hass.services.async_services_for_domain(DOMAIN)`.
|
Loading…
x
Reference in New Issue
Block a user