Document MQTT schemas (#12222)

* Document MQTT schemas

* Update source/_integrations/light.mqtt.markdown

Co-Authored-By: Franck Nijhof <frenck@frenck.nl>

* Update light.mqtt.markdown

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Erik Montnemery 2020-03-09 10:36:05 +01:00 committed by GitHub
parent 886721f317
commit 9f9e707e83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 4 deletions

View File

@ -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

View File

@ -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