From 22890299de9d82f3e565ee2953bcc80c5eecaf9d Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Wed, 24 Aug 2022 18:07:04 +0200 Subject: [PATCH] Add `this` object to MQTT templates (#23845) --- source/_docs/configuration/templating.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_docs/configuration/templating.markdown b/source/_docs/configuration/templating.markdown index 198fc626dd8..77d92cf3504 100644 --- a/source/_docs/configuration/templating.markdown +++ b/source/_docs/configuration/templating.markdown @@ -857,7 +857,7 @@ With given payload: Template {% raw %}```{{ value_json.temperature | round(1) }}```{% endraw %} renders to `21.9`. -Additional the MQTT entity attributes `entity_id` and `name` can be used as variables in the template. +Additional the MQTT entity attributes `entity_id`, `name` and `this` can be used as variables in the template. The `this` attribute refers to the [entity state](/docs/configuration/state_object) of the MQTT item. @@ -877,7 +877,7 @@ With given value `21.9` template {% raw %}```{"temperature": {{ value }} }```{% } ``` -Additional the MQTT entity attributes `entity_id` and `name` can be used as variables in the template. +Additional the MQTT entity attributes `entity_id`, `name` and `this` can be used as variables in the template. The `this` attribute refers to the [entity state](/docs/configuration/state_object) of the MQTT item.