Tweak service filter blog post (#1828)

* Tweak service filter blog post

* Update 2023-06-28-service-description-filters.md
This commit is contained in:
Erik Montnemery 2023-07-05 14:20:56 +02:00 committed by GitHub
parent 635b69a2bc
commit 4f7b8d076b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,11 @@ authorURL: https://github.com/emontnemery
title: "Service call description filters" title: "Service call description filters"
--- ---
Service call fields now support filtering, to avoid showing service call parameters that are not supported by an entity to the user. For example, the `brightness` service call parameter for `light.turn_on` will only be shown if the light supports brightness. Service call descriptions have been changed to support filtering.
It's possible to add a filter to a service call to not show entities which do not support the service call, it's also possible to add a filter to a service call field to not show fields which are not supported by a selected entity to the user.
This is an extension of the previously supported possibility to filter out entities that don't support a certain service call. For example:
- The `brightness` service call parameter for `light.turn_on` will only be shown if the light supports brightness.
- The `climate.set_aux_heat` service call will only allow picking a climate entity which supports auxiliary heat.
This features was introduced in core [PR #86162](https://github.com/home-assistant/core/pull/86162) and is documented [here](/docs/dev_101_services#filtering-service-fields). This features was introduced in core [PR #86162](https://github.com/home-assistant/core/pull/86162) and is documented [here](/docs/dev_101_services#filtering-service-fields).