Correct mqtt config template option type (#27120)

This commit is contained in:
Jan Bouwhuis 2023-04-24 14:34:32 +02:00 committed by GitHub
parent 782918aeae
commit f89569b964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 50 additions and 50 deletions

View File

@ -98,7 +98,7 @@ code_trigger_required:
command_template:
description: "The [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) used for the command payload. Available variables: `action` and `code`."
required: false
type: string
type: template
default: action
command_topic:
description: The MQTT topic to publish commands to change the alarm state.

View File

@ -202,7 +202,7 @@ unique_id:
value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) that returns a string to be compared to `payload_on`/`payload_off` or an empty string, in which case the MQTT message will be removed. Remove this option when `payload_on` and `payload_off` are sufficient to match your payloads (i.e no pre-processing of original message is required)."
required: false
type: string
type: template
{% endconfiguration %}
## Examples

View File

@ -290,7 +290,7 @@ preset_mode_state_topic:
preset_mode_value_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the `preset_mode` value from the payload received on `preset_mode_state_topic`.
required: false
type: string
type: template
preset_modes:
description: List of preset modes this climate is supporting. Common examples include `eco`, `away`, `boost`, `comfort`, `home`, `sleep` and `activity`.
required: false
@ -342,7 +342,7 @@ target_humidity_state_topic:
target_humidity_state_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a value for the climate `target_humidity` state.
required: false
type: string
type: template
temperature_command_template:
description: A template to render the value sent to the `temperature_command_topic` with.
required: false

View File

@ -207,7 +207,7 @@ position_open:
position_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) that can be used to extract the payload for the `position_topic` topic. Within the template the following variables are available: `entity_id`, `position_open`; `position_closed`; `tilt_min`; `tilt_max`. The `entity_id` can be used to reference the entity's attributes with help of the [states](/docs/configuration/templating/#states) template function;"
required: false
type: string
type: template
position_topic:
description: The MQTT topic subscribed to receive cover position messages.
required: false
@ -225,7 +225,7 @@ retain:
set_position_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to define the position to be sent to the `set_position_topic` topic. Incoming position value is available for use in the template `{% raw %}{{ position }}{% endraw %}`. Within the template the following variables are available: `entity_id`, `position`, the target position in percent; `position_open`; `position_closed`; `tilt_min`; `tilt_max`. The `entity_id` can be used to reference the entity's attributes with help of the [states](/docs/configuration/templating/#states) template function;"
required: false
type: string
type: template
set_position_topic:
description: "The MQTT topic to publish position commands to. You need to set position_topic as well if you want to use position topic. Use template if position topic wants different values than within range `position_closed` - `position_open`. If template is not defined and `position_closed != 100` and `position_open != 0` then proper position value is calculated from percentage position."
required: false
@ -267,7 +267,7 @@ tilt_closed_value:
tilt_command_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) that can be used to extract the payload for the `tilt_command_topic` topic. Within the template the following variables are available: `entity_id`, `tilt_position`, the target tilt position in percent; `position_open`; `position_closed`; `tilt_min`; `tilt_max`. The `entity_id` can be used to reference the entity's attributes with help of the [states](/docs/configuration/templating/#states) template function;"
required: false
type: string
type: template
tilt_command_topic:
description: The MQTT topic to publish commands to control the cover tilt.
required: false
@ -295,7 +295,7 @@ tilt_optimistic:
tilt_status_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) that can be used to extract the payload for the `tilt_status_topic` topic. Within the template the following variables are available: `entity_id`, `position_open`; `position_closed`; `tilt_min`; `tilt_max`. The `entity_id` can be used to reference the entity's attributes with help of the [states](/docs/configuration/templating/#states) template function;"
required: false
type: string
type: template
tilt_status_topic:
description: The MQTT topic subscribed to receive tilt status update values.
required: false
@ -307,7 +307,7 @@ unique_id:
value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) that can be used to extract the payload for the `state_topic` topic."
required: false
type: string
type: template
{% endconfiguration %}
<div class="note">

View File

@ -221,7 +221,7 @@ target_humidity_state_topic:
target_humidity_state_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a value for the humidifier `target_humidity` state.
required: false
type: string
type: template
mode_command_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to generate the payload to send to `mode_command_topic`.
required: false
@ -237,7 +237,7 @@ mode_state_topic:
mode_state_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a value for the humidifier `mode` state.
required: false
type: string
type: template
modes:
description: List of available modes this humidifier is capable of running at. Common examples include `normal`, `eco`, `away`, `boost`, `comfort`, `home`, `sleep`, `auto` and `baby`. These examples offer built-in translations but other custom modes are allowed as well. This attribute ust be configured together with the `mode_command_topic` attribute.
required: false
@ -260,7 +260,7 @@ state_topic:
state_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a value from the state."
required: false
type: string
type: template
unique_id:
description: An ID that uniquely identifies this humidifier. If two humidifiers have the same unique ID, Home Assistant will raise an exception.
required: false

View File

@ -95,7 +95,7 @@ brightness_command_topic:
brightness_command_template:
description: "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `brightness_command_topic`. Available variables: `value`."
required: false
type: string
type: template
brightness_scale:
description: "Defines the maximum brightness value (i.e., 100%) of the MQTT device."
required: false
@ -108,7 +108,7 @@ brightness_state_topic:
brightness_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the brightness value."
required: false
type: string
type: template
color_mode_state_topic:
description: "The MQTT topic subscribed to receive color mode updates. If this is not configured, `color_mode` will be automatically set according to the last received valid color or color temperature"
required: false
@ -116,11 +116,11 @@ color_mode_state_topic:
color_mode_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the color mode."
required: false
type: string
type: template
color_temp_command_template:
description: "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `color_temp_command_topic`. Available variables: `value`."
required: false
type: string
type: template
color_temp_command_topic:
description: The MQTT topic to publish commands to change the lights color temperature state. The color temperature command slider has a range of 153 to 500 mireds (micro reciprocal degrees).
required: false
@ -132,7 +132,7 @@ color_temp_state_topic:
color_temp_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the color temperature value."
required: false
type: string
type: template
command_topic:
description: The MQTT topic to publish commands to change the switch state.
required: true
@ -204,7 +204,7 @@ effect_command_topic:
effect_command_template:
description: "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `effect_command_topic`. Available variables: `value`."
required: false
type: string
type: template
effect_list:
description: The list of effects the light supports.
required: false
@ -216,11 +216,11 @@ effect_state_topic:
effect_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the effect value."
required: false
type: string
type: template
hs_command_template:
description: "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `hs_command_topic`. Available variables: `hue` and `sat`."
required: false
type: string
type: template
hs_command_topic:
description: "The MQTT topic to publish commands to change the light's color state in HS format (Hue Saturation).
Range for Hue: 0° .. 360°, Range of Saturation: 0..100.
@ -235,7 +235,7 @@ hs_state_topic:
hs_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the HS value."
required: false
type: string
type: template
icon:
description: "[Icon](/docs/configuration/customizing-devices/#icon) for the entity."
required: false
@ -307,7 +307,7 @@ retain:
rgb_command_template:
description: "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `rgb_command_topic`. Available variables: `red`, `green` and `blue`."
required: false
type: string
type: template
rgb_command_topic:
description: "The MQTT topic to publish commands to change the light's RGB state."
required: false
@ -319,11 +319,11 @@ rgb_state_topic:
rgb_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the RGB value."
required: false
type: string
type: template
rgbw_command_template:
description: "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `rgbw_command_topic`. Available variables: `red`, `green`, `blue` and `white`."
required: false
type: string
type: template
rgbw_command_topic:
description: "The MQTT topic to publish commands to change the light's RGBW state."
required: false
@ -335,11 +335,11 @@ rgbw_state_topic:
rgbw_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the RGBW value."
required: false
type: string
type: template
rgbww_command_template:
description: "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `rgbww_command_topic`. Available variables: `red`, `green`, `blue`, `cold_white` and `warm_white`."
required: false
type: string
type: template
rgbww_command_topic:
description: "The MQTT topic to publish commands to change the light's RGBWW state."
required: false
@ -351,7 +351,7 @@ rgbww_state_topic:
rgbww_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the RGBWW value."
required: false
type: string
type: template
schema:
description: The schema to use. Must be `default` or omitted to select the default schema.
required: false
@ -364,7 +364,7 @@ state_topic:
state_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the state value. The template should match the payload `on` and `off` values, so if your light uses `power on` to turn on, your `state_value_template` string should return `power on` when the switch is on. For example if the message is just `on`, your `state_value_template` should be `power {{ value }}`."
required: false
type: string
type: template
unique_id:
description: An ID that uniquely identifies this light. If two lights have the same unique ID, Home Assistant will raise an exception.
required: false
@ -381,7 +381,7 @@ white_scale:
xy_command_template:
description: "Defines a [template](/docs/configuration/templating/) to compose message which will be sent to `xy_command_topic`. Available variables: `x` and `y`."
required: false
type: string
type: template
xy_command_topic:
description: "The MQTT topic to publish commands to change the light's XY state."
required: false
@ -393,7 +393,7 @@ xy_state_topic:
xy_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the XY value."
required: false
type: string
type: template
{% endconfiguration %}
<div class='note warning'>
@ -928,23 +928,23 @@ availability_topic:
blue_template:
description: "[Template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract blue color from the state payload value. Expected result of the template is an integer from 0-255 range."
required: false
type: string
type: template
brightness_template:
description: "[Template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract brightness from the state payload value. Expected result of the template is an integer from 0-255 range."
required: false
type: string
type: template
color_temp_template:
description: "[Template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract color temperature from the state payload value. Expected result of the template is an integer representing mired units."
required: false
type: string
type: template
command_off_template:
description: "The [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) for *off* state changes. Available variables: `state` and `transition`."
required: true
type: string
type: template
command_on_template:
description: "The [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) for *on* state changes. Available variables: `state`, `brightness`, `color_temp`, `red`, `green`, `blue`, `flash`, `transition` and `effect`. Values `red`, `green`, `blue`, `brightness` are provided as integers from range 0-255. Value of `color_temp` is provided as integer representing mired units."
required: true
type: string
type: template
command_topic:
description: The MQTT topic to publish commands to change the lights state.
required: true
@ -1004,11 +1004,11 @@ effect_list:
effect_template:
description: "[Template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract effect from the state payload value."
required: false
type: string
type: template
green_template:
description: "[Template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract green color from the state payload value. Expected result of the template is an integer from 0-255 range."
required: false
type: string
type: template
icon:
description: "[Icon](/docs/configuration/customizing-devices/#icon) for the entity."
required: false
@ -1061,7 +1061,7 @@ qos:
red_template:
description: "[Template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract red color from the state payload value. Expected result of the template is an integer from 0-255 range."
required: false
type: string
type: template
schema:
description: The schema to use. Must be `template` to select the template schema.
required: false
@ -1070,7 +1070,7 @@ schema:
state_template:
description: "[Template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract state from the state payload value."
required: false
type: string
type: template
state_topic:
description: The MQTT topic subscribed to receive state updates.
required: false

View File

@ -238,7 +238,7 @@ unique_id:
value_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract a state value from the payload.
required: false
type: string
type: template
{% endconfiguration %}
<div class='note warning'>

View File

@ -150,7 +150,7 @@ json_attributes_topic:
last_reset_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract the last_reset. Available variables: `entity_id`. The `entity_id` can be used to reference the entity's attributes."
required: false
type: string
type: template
name:
description: The name of the MQTT sensor.
required: false

View File

@ -216,7 +216,7 @@ state_topic:
state_value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's state from the `state_topic`. To determine the siren's state result of this template will be compared to `state_on` and `state_off`. Alternatively `value_template` can be used to render to a valid JSON payload."
required: false
type: string
type: template
support_duration:
description: Set to `true` if the MQTT siren supports the `duration` service turn on parameter and enables the `duration` state attribute.
required: false

View File

@ -212,7 +212,7 @@ unique_id:
value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to extract device's state from the `state_topic`. To determine the switches's state result of this template will be compared to `state_on` and `state_off`."
required: false
type: string
type: template
{% endconfiguration %}
<div class='note warning'>

View File

@ -23,7 +23,7 @@ topic:
value_template:
description: "Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) that returns a tag ID."
required: false
type: string
type: template
device:
description: "Information about the device this device trigger is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). At least one of identifiers or connections must be present to identify the device."
required: true

View File

@ -72,7 +72,7 @@ availability_topic:
battery_level_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to define the battery level of the vacuum. This is required if `battery_level_topic` is set.
required: false
type: string
type: template
battery_level_topic:
description: The MQTT topic subscribed to receive battery level values from the vacuum.
required: false
@ -80,7 +80,7 @@ battery_level_topic:
charging_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to define the charging state of the vacuum. This is required if `charging_topic` is set.
required: false
type: string
type: template
charging_topic:
description: The MQTT topic subscribed to receive charging state values from the vacuum.
required: false
@ -88,7 +88,7 @@ charging_topic:
cleaning_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to define the cleaning state of the vacuum. This is required if `cleaning_topic` is set.
required: false
type: string
type: template
cleaning_topic:
description: The MQTT topic subscribed to receive cleaning state values from the vacuum.
required: false
@ -100,7 +100,7 @@ command_topic:
docked_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to define the docked state of the vacuum. This is required if `docked_topic` is set.
required: false
type: string
type: template
docked_topic:
description: The MQTT topic subscribed to receive docked state values from the vacuum.
required: false
@ -123,7 +123,7 @@ entity_category:
error_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to define potential error messages emitted by the vacuum. This is required if `error_topic` is set.
required: false
type: string
type: template
error_topic:
description: The MQTT topic subscribed to receive error messages from the vacuum.
required: false
@ -135,7 +135,7 @@ fan_speed_list:
fan_speed_template:
description: Defines a [template](/docs/configuration/templating/#using-templates-with-the-mqtt-integration) to define the fan speed of the vacuum. This is required if `fan_speed_topic` is set.
required: false
type: string
type: template
fan_speed_topic:
description: The MQTT topic subscribed to receive fan speed values from the vacuum.
required: false