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,8 +212,7 @@ 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
``` ```
@ -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,11 +447,12 @@ And this is what is looks like in YAML:
```yaml ```yaml
device: device:
integration: deconz filter:
- integration: deconz
manufacturer: Philips manufacturer: Philips
model: RWL021 model: RWL021
entity: entity:
domain: sensor - domain: sensor
device_class: battery device_class: battery
``` ```
@ -499,14 +514,22 @@ 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: >
When filter options are provided, the entities are limited by entities
that at least match the given conditions. Can be either a object or a list of object.
Can be either a object or a list of object.
type: list
required: false
keys:
integration:
description: > description: >
Can be set to an integration domain. Limits the list of entities to entities Can be set to an integration domain. Limits the list of entities to entities
provided by the set integration domain, for example, provided by the set integration domain, for example,
[`zha`](/integrations/zha). [`zha`](/integrations/zha).
type: string type: string
required: false required: false
domain: domain:
description: > description: >
Limits the list of entities to entities of a certain domain(s), for example, Limits the list of entities to entities of a certain domain(s), for example,
[`light`](/integrations/light) or [`light`](/integrations/light) or
@ -515,11 +538,12 @@ domain:
to. to.
type: [string, list] type: [string, list]
required: false required: false
device_class: device_class:
description: > description: >
Limits the list of entities to entities that have a certain device class, Limits the list of entities to entities that have a certain device class(es),
for example, `motion` or `window`. for example, `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
multiple: multiple:
description: > description: >
@ -556,7 +580,8 @@ And this is what it looks like in YAML:
```yaml ```yaml
entity: entity:
multiple: true multiple: true
integration: zha filter:
- integration: zha
domain: binary_sensor domain: binary_sensor
device_class: motion device_class: motion
``` ```
@ -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,7 +995,7 @@ or more lights, provided by the [ZHA](/integrations/zha) integration.
```yaml ```yaml
target: target:
entity: entity:
integration: zha - integration: zha
domain: light domain: light
``` ```
@ -978,7 +1006,7 @@ 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
``` ```