From 9026d0ad20ae76366f49c5fe2e0cf44dc7f4cbb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Mind=C3=AAllo=20de=20Andrade?= Date: Thu, 9 Mar 2023 18:32:43 -0300 Subject: [PATCH] List all areas with templating (#26303) --- source/_docs/configuration/templating.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/_docs/configuration/templating.markdown b/source/_docs/configuration/templating.markdown index a6264397712..0905b2e59b8 100644 --- a/source/_docs/configuration/templating.markdown +++ b/source/_docs/configuration/templating.markdown @@ -369,6 +369,7 @@ The same thing can also be expressed as a test: ### Areas +- `areas()` returns the full list of area IDs - `area_id(lookup_value)` returns the area ID for a given device ID, entity ID, or area name. Can also be used as a filter. - `area_name(lookup_value)` returns the area name for a given device ID, entity ID, or area ID. Can also be used as a filter. - `area_entities(area_name_or_id)` returns the list of entity IDs tied to a given area ID or name. Can also be used as a filter. @@ -378,6 +379,10 @@ The same thing can also be expressed as a test: {% raw %} +```text +{{ areas() }} # ['area_id'] +``` + ```text {{ area_id('Living Room') }} # 'deadbeefdeadbeefdeadbeefdeadbeef' ```