From 4d44e2f98753b070601aedd6128ca50689b4cab1 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Sat, 20 Nov 2021 23:47:22 +0100 Subject: [PATCH] add integration entities helper (#20371) Co-authored-by: Paulus Schoutsen --- .../_docs/configuration/templating.markdown | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source/_docs/configuration/templating.markdown b/source/_docs/configuration/templating.markdown index 37d0e034e50..eee936ff4e8 100644 --- a/source/_docs/configuration/templating.markdown +++ b/source/_docs/configuration/templating.markdown @@ -278,6 +278,25 @@ The same thing can also be expressed as a filter: {% endraw %} +### Integrations + +- `integration_entities(integration)` returns a list of entities that are associated with a given integration, such as `hue` or `zwave_js`. +- `integration_entities(title)` if you have multiple instances set-up for an integration, you can also use the title you've set for the integration in case you only want to target a specific device bridge. + +#### Integrations examples + +{% raw %} + +```text +{{ integration_entities('hue') }} # ['light.hue_light_upstairs', 'light.hue_light_downstairs'] +``` + +```text +{{ integration_entities('Hue bridge downstairs') }} # ['light.hue_light_downstairs'] +``` + +{% endraw %} + ### Time `now()` and `utcnow()` are not supported in [limited templates](#limited-templates).