From 4b5cfcb6852285abe35f02ae8c90507bd40f557f Mon Sep 17 00:00:00 2001 From: emontnemery Date: Sun, 27 Jan 2019 10:35:51 +0100 Subject: [PATCH 1/3] Document json_attributes_topic --- source/_components/switch.mqtt.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/_components/switch.mqtt.markdown b/source/_components/switch.mqtt.markdown index 461785439d61..7b6fed14304a 100644 --- a/source/_components/switch.mqtt.markdown +++ b/source/_components/switch.mqtt.markdown @@ -103,6 +103,10 @@ value_template: description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload." required: false type: string +json_attributes_topic: + description: The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Example used can be found in [MQTT sensor](/docs/components/sensor.mqtt/#json-attributes-topic-configuration) documentation. + required: false + type: string device: description: "Information about the device this switch is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). Only works through [MQTT discovery](/docs/mqtt/discovery/) and when [`unique_id`](#unique_id) is set." required: false From b2c75dbfebfb16ee6b408350b9124138cb755d70 Mon Sep 17 00:00:00 2001 From: emontnemery Date: Sun, 27 Jan 2019 11:00:37 +0100 Subject: [PATCH 2/3] Update switch.mqtt.markdown --- source/_components/switch.mqtt.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/switch.mqtt.markdown b/source/_components/switch.mqtt.markdown index 7b6fed14304a..296c1db84568 100644 --- a/source/_components/switch.mqtt.markdown +++ b/source/_components/switch.mqtt.markdown @@ -104,7 +104,7 @@ value_template: required: false type: string json_attributes_topic: - description: The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Example used can be found in [MQTT sensor](/docs/components/sensor.mqtt/#json-attributes-topic-configuration) documentation. + description: The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/docs/components/sensor.mqtt/#json-attributes-topic-configuration) documentation. required: false type: string device: From 20630420b4a5b8f38bdbfb2ed0ae325741783c11 Mon Sep 17 00:00:00 2001 From: emontnemery Date: Sun, 27 Jan 2019 12:45:13 +0100 Subject: [PATCH 3/3] Update switch.mqtt.markdown --- source/_components/switch.mqtt.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/switch.mqtt.markdown b/source/_components/switch.mqtt.markdown index 296c1db84568..8e45fba36ce8 100644 --- a/source/_components/switch.mqtt.markdown +++ b/source/_components/switch.mqtt.markdown @@ -104,7 +104,7 @@ value_template: required: false type: string json_attributes_topic: - description: The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/docs/components/sensor.mqtt/#json-attributes-topic-configuration) documentation. + description: The MQTT topic subscribed to receive a JSON dictionary payload and then set as sensor attributes. Usage example can be found in [MQTT sensor](/components/sensor.mqtt/#json-attributes-topic-configuration) documentation. required: false type: string device: