From 9f9e707e839470a80b105bcff1e9c5eb4e20d4f0 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Mon, 9 Mar 2020 10:36:05 +0100 Subject: [PATCH] Document MQTT schemas (#12222) * Document MQTT schemas * Update source/_integrations/light.mqtt.markdown Co-Authored-By: Franck Nijhof * Update light.mqtt.markdown Co-authored-by: Franck Nijhof --- source/_integrations/light.mqtt.markdown | 17 ++++++++++++++++- source/_integrations/vacuum.mqtt.markdown | 6 +++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/source/_integrations/light.mqtt.markdown b/source/_integrations/light.mqtt.markdown index e34d38da473..2712d5d1a78 100644 --- a/source/_integrations/light.mqtt.markdown +++ b/source/_integrations/light.mqtt.markdown @@ -8,7 +8,7 @@ ha_release: 0.8 ha_domain: mqtt --- -The `mqtt` light platform lets you control your MQTT enabled lights through one of the supported message schemas. +The `mqtt` light platform lets you control your MQTT enabled lights through one of the supported message schemas, `default`, `json` or `template`. ## Comparison of light MQTT schemas @@ -214,6 +214,11 @@ rgb_value_template: description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the RGB value." required: false type: string +schema: + description: The schema to use. Must be `default` or omitted to select the default schema". + required: false + type: string + default: default state_topic: description: The MQTT topic subscribed to receive state updates. required: false @@ -501,6 +506,11 @@ rgb: required: false type: boolean default: false +schema: + description: The schema to use. Must be `json` to select the JSON schema". + required: false + type: string + default: default state_topic: description: The MQTT topic subscribed to receive state updates. required: false @@ -784,6 +794,11 @@ red_template: description: "[Template](/docs/configuration/templating/#processing-incoming-data) to extract red color from the state payload value." required: false type: string +schema: + description: The schema to use. Must be `template` to select the template schema". + required: false + type: string + default: default state_template: description: "[Template](/docs/configuration/templating/#processing-incoming-data) to extract state from the state payload value." required: false diff --git a/source/_integrations/vacuum.mqtt.markdown b/source/_integrations/vacuum.mqtt.markdown index 7e64f0f0795..a3417ae0069 100644 --- a/source/_integrations/vacuum.mqtt.markdown +++ b/source/_integrations/vacuum.mqtt.markdown @@ -8,7 +8,7 @@ ha_domain: mqtt --- The `mqtt` vacuum integration allows you to control your MQTT-enabled vacuum. -There are two possible message schemas - `legacy` and `state`. +There are two possible message schemas - `legacy` and `state`, chosen by setting the `schema` configuration parameter. New installations should use the `state` schema as `legacy` is deprecated and might be removed someday in the future. The `state` schema is preferred because the vacuum will then be represented as a `StateVacuumDevice` which is the preferred parent vacuum entity. @@ -158,7 +158,7 @@ retain: type: boolean default: false schema: - description: The schema to use. + description: The schema to use. Must be `legacy` or omitted to select the legacy schema". required: false type: string default: legacy @@ -336,7 +336,7 @@ retain: type: boolean default: false schema: - description: The schema to use. + description: The schema to use. Must be `state` to select the state schema". required: false type: string default: legacy