Add documentation for entity and device filters (#26145)

This commit is contained in:
Paul Bottein 2023-03-09 12:43:02 +01:00 committed by GitHub
parent ddc3cb6bd2
commit 10253cfd3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -115,8 +115,9 @@ area:
device: device:
description: > description: >
When device options are provided, the list of areas is filtered by areas When device options are provided, the list of areas is filtered by areas
that at least provide one device that matches the given conditions. that at least provide one device that matches the given conditions. Can be
type: map either a object or a list of object.
type: list
keys: keys:
integration: integration:
description: > description: >
@ -140,8 +141,9 @@ device:
entity: entity:
description: > description: >
When entity options are provided, the list of areas is filtered by areas When entity options are provided, the list of areas is filtered by areas
that at least provide one entity that matches the given conditions. that at least provide one entity that matches the given conditions. Can be
type: map either a object or a list of object.
type: list
required: false required: false
keys: keys:
integration: integration:
@ -162,8 +164,10 @@ entity:
device_class: device_class:
description: > description: >
Limits the list of areas to areas that have entities with a certain Limits the list of areas to areas that have entities with a certain
device class, for example, `motion` or `window`. device class(es), for example, `motion` or `window`. Can be either a string
type: device_class with a single device_class, or a list of string device_class to limit
the selection to.
type: [device_class, list]
required: false required: false
multiple: multiple:
description: > description: >
@ -208,10 +212,9 @@ integration. Multiple areas can be selected.
area: area:
multiple: true multiple: true
device: device:
multiple: true - integration: deconz
integration: deconz manufacturer: IKEA of Sweden
manufacturer: IKEA of Sweden model: TRADFRI remote control
model: TRADFRI remote control
``` ```
## Attribute selector ## Attribute selector
@ -354,28 +357,12 @@ device:
``` ```
{% configuration device %} {% configuration device %}
integration:
description: >
Can be set to an integration domain. Limits the list of devices to devices
provided by the set integration domain.
type: string
required: false
manufacturer:
description: >
When set, it limits the list of devices to devices provided by the set
manufacturer name.
type: string
required: false
model:
description: >
When set, it limits the list of devices to devices that have the set model.
type: string
required: false
entity: entity:
description: > description: >
When entity options are provided, the list of devices is filtered by devices When entity options are provided, the list of devices is filtered by devices
that at least provide one entity that matches the given conditions. that at least provide one entity that matches the given conditions. Can be
type: map either a object or a list of object.
type: list
required: false required: false
keys: keys:
integration: integration:
@ -397,8 +384,35 @@ entity:
device_class: device_class:
description: > description: >
Limits the list of entities to entities that have a certain device Limits the list of entities to entities that have a certain device
class, for example, `motion` or `window`. class(es), for example, `motion` or `window`. Can be either a string
type: device_class with a single device_class, or a list of string device_class to limit
the selection to.
type: [device_class, list]
required: false
filter:
description: >
When filter options are provided, the list of devices is filtered by devices
that at least provide one entity that matches the given conditions. Can be either
a object or a list of object.
type: list
required: false
keys:
integration:
description: >
Can be set to an integration domain. Limits the list of devices to devices
provided by the set integration domain.
type: string
required: false
manufacturer:
description: >
When set, it limits the list of devices to devices provided by the set
manufacturer name.
type: string
required: false
model:
description: >
When set, it limits the list of devices to devices that have the set model.
type: string
required: false required: false
multiple: multiple:
description: > description: >
@ -433,12 +447,13 @@ And this is what is looks like in YAML:
```yaml ```yaml
device: device:
integration: deconz filter:
manufacturer: Philips - integration: deconz
model: RWL021 manufacturer: Philips
model: RWL021
entity: entity:
domain: sensor - domain: sensor
device_class: battery device_class: battery
``` ```
## Duration selector ## Duration selector
@ -499,28 +514,37 @@ include_entities:
description: List of entity IDs to limit the selectable list to. description: List of entity IDs to limit the selectable list to.
type: list type: list
required: false required: false
integration: filter:
description: > description: >
Can be set to an integration domain. Limits the list of entities to entities When filter options are provided, the entities are limited by entities
provided by the set integration domain, for example, that at least match the given conditions. Can be either a object or a list of object.
[`zha`](/integrations/zha). Can be either a object or a list of object.
type: string type: list
required: false
domain:
description: >
Limits the list of entities to entities of a certain domain(s), for example,
[`light`](/integrations/light) or
[`binary_sensor`](/integrations/binary_sensor). Can be either a string
with a single domain, or a list of string domains to limit the selection
to.
type: [string, list]
required: false
device_class:
description: >
Limits the list of entities to entities that have a certain device class,
for example, `motion` or `window`.
type: device_class
required: false required: false
keys:
integration:
description: >
Can be set to an integration domain. Limits the list of entities to entities
provided by the set integration domain, for example,
[`zha`](/integrations/zha).
type: string
required: false
domain:
description: >
Limits the list of entities to entities of a certain domain(s), for example,
[`light`](/integrations/light) or
[`binary_sensor`](/integrations/binary_sensor). Can be either a string
with a single domain, or a list of string domains to limit the selection
to.
type: [string, list]
required: false
device_class:
description: >
Limits the list of entities to entities that have a certain device class(es),
for example, `motion` or `window`. Can be either a string with a single device_class,
or a list of string device_class to limit the selection to.
type: [device_class, list]
required: false
multiple: multiple:
description: > description: >
Allows selecting multiple entities. If set to `true`, the resulting value of Allows selecting multiple entities. If set to `true`, the resulting value of
@ -556,9 +580,10 @@ And this is what it looks like in YAML:
```yaml ```yaml
entity: entity:
multiple: true multiple: true
integration: zha filter:
domain: binary_sensor - integration: zha
device_class: motion domain: binary_sensor
device_class: motion
``` ```
## Icon selector ## Icon selector
@ -895,8 +920,9 @@ target:
device: device:
description: > description: >
When device options are provided, the targets are limited by devices When device options are provided, the targets are limited by devices
that at least match the given conditions. that at least match the given conditions. Can be either a object or a list
type: map of object.
type: list
keys: keys:
integration: integration:
description: > description: >
@ -918,8 +944,9 @@ device:
entity: entity:
description: > description: >
When entity options are provided, the targets are limited by entities When entity options are provided, the targets are limited by entities
that at least match the given conditions. that at least match the given conditions. Can be either a object or a list
type: map of object.
type: list
required: false required: false
keys: keys:
integration: integration:
@ -940,9 +967,10 @@ entity:
required: false required: false
device_class: device_class:
description: > description: >
Limits the targets to entities with a certain Limits the targets to entities with a certain device class(es), for example,
device class, for example, `motion` or `window`. `motion` or `window`. Can be either a string with a single device_class,
type: device_class or a list of string device_class to limit the selection to.
type: [device_class, list]
required: false required: false
{% endconfiguration %} {% endconfiguration %}
@ -967,8 +995,8 @@ or more lights, provided by the [ZHA](/integrations/zha) integration.
```yaml ```yaml
target: target:
entity: entity:
integration: zha - integration: zha
domain: light domain: light
``` ```
Another example using the target selector, which only shows targets that Another example using the target selector, which only shows targets that
@ -978,9 +1006,9 @@ provide one or more remote controls, provided by the
```yaml ```yaml
target: target:
device: device:
integration: deconz - integration: deconz
manufacturer: IKEA of Sweden manufacturer: IKEA of Sweden
model: TRADFRI remote control model: TRADFRI remote control
``` ```
## Template selector ## Template selector