Document mqtt state updates with empty or None values (#32864)

This commit is contained in:
Jan Bouwhuis 2024-05-25 01:30:26 +02:00 committed by GitHub
parent 9a88181362
commit 6e96b63b9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 19 additions and 19 deletions

View File

@ -246,7 +246,7 @@ retain:
type: boolean type: boolean
default: false default: false
state_topic: state_topic:
description: The MQTT topic subscribed to receive state updates. description: The MQTT topic subscribed to receive state updates. A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: true required: true
type: string type: string
supported_features: supported_features:

View File

@ -29,8 +29,8 @@ action_template:
type: template type: template
action_topic: action_topic:
description: >- description: >-
The MQTT topic to subscribe for changes of the current action. If this is set, the climate graph uses the value received as data source. The MQTT topic to subscribe for changes of the current action. If this is set, the climate graph uses the value received as data source. A "None" payload resets the current action state. An empty payload is ignored.
Valid values: `off`, `heating`, `cooling`, `drying`, `idle`, `fan`. Valid action values: `off`, `heating`, `cooling`, `drying`, `idle`, `fan`.
required: false required: false
type: string type: string
availability: availability:
@ -161,7 +161,7 @@ fan_mode_state_template:
required: false required: false
type: template type: template
fan_mode_state_topic: fan_mode_state_topic:
description: The MQTT topic to subscribe for changes of the HVAC fan mode. If this is not set, the fan mode works in optimistic mode (see below). description: The MQTT topic to subscribe for changes of the HVAC fan mode. If this is not set, the fan mode works in optimistic mode (see below). A "None" payload resets the fan mode state. An empty payload is ignored.
required: false required: false
type: string type: string
fan_modes: fan_modes:
@ -216,7 +216,7 @@ mode_state_template:
required: false required: false
type: template type: template
mode_state_topic: mode_state_topic:
description: The MQTT topic to subscribe for changes of the HVAC operation mode. If this is not set, the operation mode works in optimistic mode (see below). description: The MQTT topic to subscribe for changes of the HVAC operation mode. If this is not set, the operation mode works in optimistic mode (see below). A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
modes: modes:

View File

@ -257,7 +257,7 @@ state_stopped:
type: string type: string
default: stopped default: stopped
state_topic: state_topic:
description: The MQTT topic subscribed to receive cover state messages. State topic can only read (`open`, `opening`, `closed`, `closing` or `stopped`) state. description: The MQTT topic subscribed to receive cover state messages. State topic can only read (`open`, `opening`, `closed`, `closing` or `stopped`) state. A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
tilt_closed_value: tilt_closed_value:

View File

@ -170,7 +170,7 @@ source_type:
required: false required: false
type: string type: string
state_topic: state_topic:
description: The MQTT topic subscribed to receive device tracker state changes. The states defined in `state_topic` override the location states defined by the `json_attributes_topic`. This state override is turned inactive if the `state_topic` receives a message containing `payload_reset`. The `state_topic` can only be omitted if `json_attributes_topic` is used. description: The MQTT topic subscribed to receive device tracker state changes. The states defined in `state_topic` override the location states defined by the `json_attributes_topic`. This state override is turned inactive if the `state_topic` receives a message containing `payload_reset`. The `state_topic` can only be omitted if `json_attributes_topic` is used. An empty payload is ignored.
required: false required: false
type: string type: string
unique_id: unique_id:

View File

@ -291,7 +291,7 @@ speed_range_min:
type: integer type: integer
default: 1 default: 1
state_topic: state_topic:
description: The MQTT topic subscribed to receive state updates. description: The MQTT topic subscribed to receive state updates. A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
state_value_template: state_value_template:

View File

@ -273,7 +273,7 @@ retain:
type: boolean type: boolean
default: true default: true
state_topic: state_topic:
description: The MQTT topic subscribed to receive state updates. description: The MQTT topic subscribed to receive state updates. A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
state_value_template: state_value_template:

View File

@ -359,7 +359,7 @@ schema:
type: string type: string
default: default default: default
state_topic: state_topic:
description: The MQTT topic subscribed to receive state updates. description: The MQTT topic subscribed to receive state updates. A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
state_value_template: state_value_template:
@ -706,7 +706,7 @@ schema:
type: string type: string
default: default default: default
state_topic: state_topic:
description: The MQTT topic subscribed to receive state updates. description: The MQTT topic subscribed to receive state updates. A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
supported_color_modes: supported_color_modes:
@ -1069,7 +1069,7 @@ state_template:
required: false required: false
type: template type: template
state_topic: state_topic:
description: The MQTT topic subscribed to receive state updates. description: The MQTT topic subscribed to receive state updates. A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
unique_id: unique_id:

View File

@ -223,7 +223,7 @@ state_locking:
type: string type: string
default: LOCKING default: LOCKING
state_topic: state_topic:
description: The MQTT topic subscribed to receive state updates. It accepts states configured with `state_jammed`, `state_locked`, `state_unlocked`, `state_locking` or `state_unlocking`. description: The MQTT topic subscribed to receive state updates. It accepts states configured with `state_jammed`, `state_locked`, `state_unlocked`, `state_locking` or `state_unlocking`. A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
state_unlocked: state_unlocked:

View File

@ -181,7 +181,7 @@ retain:
type: boolean type: boolean
default: false default: false
state_topic: state_topic:
description: The MQTT topic subscribed to receive number values. description: The MQTT topic subscribed to receive number values. An empty payload is ignored.
required: false required: false
type: string type: string
step: step:

View File

@ -173,7 +173,7 @@ retain:
type: boolean type: boolean
default: false default: false
state_topic: state_topic:
description: The MQTT topic subscribed to receive update of the selected option. description: The MQTT topic subscribed to receive update of the selected option. A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
unique_id: unique_id:

View File

@ -211,7 +211,7 @@ state_on:
type: string type: string
default: "`payload_on` if defined, else `'ON'`" default: "`payload_on` if defined, else `'ON'`"
state_topic: state_topic:
description: "The MQTT topic subscribed to receive state updates. The state update may be either JSON or a simple string. When a JSON payload is detected, the `state` value of the JSON payload should supply the `payload_on` or `payload_off` defined payload to turn the siren on or off. Additionally, the state attributes `duration`, `tone` and `volume_level` can be updated. Use `value_template` to transform the received state udpate to a compliant JSON payload. Attributes will only be set if the function is supported by the device and a valid value is supplied. When a non JSON payload is detected, it should be either of the `payload_on` or `payload_off` defined payloads or `None` to reset the siren's state to `unknown`. The initial state will be `unknown`. The state will be reset to `unknown` if a `None` payload or `null` JSON value is received as a state update." description: "The MQTT topic subscribed to receive state updates. The state update may be either JSON or a simple string. When a JSON payload is detected, the `state` value of the JSON payload should supply the `payload_on` or `payload_off` defined payload to turn the siren on or off. Additionally, the state attributes `duration`, `tone` and `volume_level` can be updated. Use `value_template` to transform the received state update to a compliant JSON payload. Attributes will only be set if the function is supported by the device and a valid value is supplied. When a non JSON payload is detected, it should be either of the `payload_on` or `payload_off` defined payloads or `None` to reset the siren's state to `unknown`. The initial state will be `unknown`. The state will be reset to `unknown` if a `None` payload or `null` JSON value is received as a state update."
required: false required: false
type: string type: string
state_value_template: state_value_template:

View File

@ -202,7 +202,7 @@ state_on:
type: string type: string
default: "`payload_on` if defined, else ON" default: "`payload_on` if defined, else ON"
state_topic: state_topic:
description: The MQTT topic subscribed to receive state updates. description: The MQTT topic subscribed to receive state updates. A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
unique_id: unique_id:

View File

@ -264,7 +264,7 @@ state_opening:
type: string type: string
default: opening default: opening
state_topic: state_topic:
description: The MQTT topic subscribed to receive valve state messages. State topic accepts a state payload (`open`, `opening`, `closed`, or `closing`) or, if `reports_position` is supported, a numeric value representing the position. In a JSON format with variables `state` and `position` both values can received together. description: The MQTT topic subscribed to receive valve state messages. State topic accepts a state payload (`open`, `opening`, `closed`, or `closing`) or, if `reports_position` is supported, a numeric value representing the position. In a JSON format with variables `state` and `position` both values can received together. A "None" state value resets to an `unknown` state. An empty string is ignored.
required: false required: false
type: string type: string
unique_id: unique_id:

View File

@ -167,7 +167,7 @@ mode_state_template:
required: false required: false
type: template type: template
mode_state_topic: mode_state_topic:
description: The MQTT topic to subscribe for changes of the water heater operation mode. If this is not set, the operation mode works in optimistic mode (see below). description: The MQTT topic to subscribe for changes of the water heater operation mode. If this is not set, the operation mode works in optimistic mode (see below). A "None" payload resets to an `unknown` state. An empty payload is ignored.
required: false required: false
type: string type: string
modes: modes: