Skip to content

Commit

Permalink
Sort MQTT config (home-assistant#12199)
Browse files Browse the repository at this point in the history
  • Loading branch information
emontnemery authored Feb 28, 2020
1 parent a985a2b commit 1dc5a07
Show file tree
Hide file tree
Showing 11 changed files with 1,064 additions and 1,072 deletions.
144 changes: 72 additions & 72 deletions source/_integrations/alarm_control_panel.mqtt.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,57 +34,10 @@ alarm_control_panel:
```
{% configuration %}
name:
description: The name of the alarm.
required: false
type: string
default: MQTT Alarm
unique_id:
description: An ID that uniquely identifies this alarm panel. If two alarm panels have the same unique ID, Home Assistant will raise an exception.
required: false
type: string
state_topic:
description: The MQTT topic subscribed to receive state updates.
required: true
type: string
command_topic:
description: The MQTT topic to publish commands to change the alarm state.
required: true
type: string
command_template:
description: "The [template](/docs/configuration/templating/#processing-incoming-data) used for the command payload. Available variables: `action` and `code`."
required: false
type: string
default: action
value_template:
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the value."
required: false
type: template
qos:
description: The maximum QoS level of the state topic.
required: false
type: integer
default: 0
payload_disarm:
description: The payload to disarm your Alarm Panel.
required: false
type: string
default: DISARM
payload_arm_home:
description: The payload to set armed-home mode on your Alarm Panel.
required: false
type: string
default: ARM_HOME
payload_arm_away:
description: The payload to set armed-away mode on your Alarm Panel.
required: false
type: string
default: ARM_AWAY
payload_arm_night:
description: The payload to set armed-night mode on your Alarm Panel.
availability_topic:
description: The MQTT topic subscribed to receive availability (online/offline) updates.
required: false
type: string
default: ARM_NIGHT
code:
description: If defined, specifies a code to enable or disable the alarm in the frontend.
required: false
Expand All @@ -99,41 +52,28 @@ code_disarm_required:
required: false
type: boolean
default: true
availability_topic:
description: The MQTT topic subscribed to receive availability (online/offline) updates.
required: false
type: string
payload_available:
description: The payload that represents the available state.
required: false
type: string
default: online
payload_not_available:
description: The payload that represents the unavailable state.
command_template:
description: "The [template](/docs/configuration/templating/#processing-incoming-data) used for the command payload. Available variables: `action` and `code`."
required: false
type: string
default: offline
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](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation.
required: false
default: action
command_topic:
description: The MQTT topic to publish commands to change the alarm state.
required: true
type: string
json_attributes_template:
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation."
required: false
type: template
device:
description: 'Information about the device this alarm panel 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
type: map
keys:
identifiers:
description: 'A list of IDs that uniquely identify the device. For example a serial number.'
required: false
type: [list, string]
connections:
description: 'A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`. For example the MAC address of a network interface: `"connections": [["mac", "02:5b:26:a8:dc:12"]]`.'
required: false
type: list
identifiers:
description: 'A list of IDs that uniquely identify the device. For example a serial number.'
required: false
type: [list, string]
manufacturer:
description: 'The manufacturer of the device.'
required: false
Expand All @@ -150,4 +90,64 @@ device:
description: 'The firmware version of the device.'
required: false
type: string
json_attributes_template:
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation."
required: false
type: template
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](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation.
required: false
type: string
name:
description: The name of the alarm.
required: false
type: string
default: MQTT Alarm
payload_arm_away:
description: The payload to set armed-away mode on your Alarm Panel.
required: false
type: string
default: ARM_AWAY
payload_arm_home:
description: The payload to set armed-home mode on your Alarm Panel.
required: false
type: string
default: ARM_HOME
payload_arm_night:
description: The payload to set armed-night mode on your Alarm Panel.
required: false
type: string
default: ARM_NIGHT
payload_available:
description: The payload that represents the available state.
required: false
type: string
default: online
payload_disarm:
description: The payload to disarm your Alarm Panel.
required: false
type: string
default: DISARM
payload_not_available:
description: The payload that represents the unavailable state.
required: false
type: string
default: offline
qos:
description: The maximum QoS level of the state topic.
required: false
type: integer
default: 0
state_topic:
description: The MQTT topic subscribed to receive state updates.
required: true
type: string
unique_id:
description: An ID that uniquely identifies this alarm panel. If two alarm panels have the same unique ID, Home Assistant will raise an exception.
required: false
type: string
value_template:
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the value."
required: false
type: template
{% endconfiguration %}
132 changes: 66 additions & 66 deletions source/_integrations/binary_sensor.mqtt.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,69 @@ binary_sensor:
```
{% configuration %}
state_topic:
description: The MQTT topic subscribed to receive sensor values.
required: true
type: string
name:
description: The name of the binary sensor.
availability_topic:
description: "The MQTT topic subscribed to receive birth and LWT messages from the MQTT device. If `availability_topic` is not defined, the binary sensor availability state will always be `available`. If `availability_topic` is defined, the binary sensor availability state will be `unavailable` by default."
required: false
type: string
default: MQTT Binary Sensor
payload_on:
description: The payload that represents the on state.
device:
description: "Information about the device this binary sensor 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
type: map
keys:
connections:
description: "A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`. For example the MAC address of a network interface: `'connections': ['mac', '02:5b:26:a8:dc:12']`."
required: false
type: [list, map]
identifiers:
description: A list of IDs that uniquely identify the device. For example a serial number.
required: false
type: [list, string]
manufacturer:
description: The manufacturer of the device.
required: false
type: string
model:
description: The model of the device.
required: false
type: string
name:
description: The name of the device.
required: false
type: string
sw_version:
description: The firmware version of the device.
required: false
type: string
device_class:
description: Sets the [class of the device](/integrations/binary_sensor/#device-class), changing the device state and icon that is displayed on the frontend.
required: false
type: string
default: "ON"
payload_off:
description: The payload that represents the off state.
expire_after:
description: "Defines the number of seconds after the value expires if it's not updated. After expiry, the value is cleared, and the availability is set to false"
required: false
type: integer
force_update:
description: Sends update events even if the value hasn't changed. Useful if you want to have meaningful value graphs in history.
required: false
type: boolean
default: false
json_attributes_template:
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation."
required: false
type: template
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](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation.
required: false
type: string
default: "OFF"
availability_topic:
description: "The MQTT topic subscribed to receive birth and LWT messages from the MQTT device. If `availability_topic` is not defined, the binary sensor availability state will always be `available`. If `availability_topic` is defined, the binary sensor availability state will be `unavailable` by default."
name:
description: The name of the binary sensor.
required: false
type: string
default: MQTT Binary Sensor
off_delay:
description: "For sensors that only sends `On` state updates, this variable sets a delay in seconds after which the sensor state will be updated back to `Off`."
required: false
type: integer
payload_available:
description: The payload that represents the online state.
required: false
Expand All @@ -65,73 +105,33 @@ payload_not_available:
required: false
type: string
default: offline
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](/integrations/sensor.mqtt/#json-attributes-topic-configuration) documentation.
payload_off:
description: The payload that represents the off state.
required: false
type: string
json_attributes_template:
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract the JSON dictionary from messages received on the `json_attributes_topic`. Usage example can be found in [MQTT sensor](/integrations/sensor.mqtt/#json-attributes-template-configuration) documentation."
default: "OFF"
payload_on:
description: The payload that represents the on state.
required: false
type: template
type: string
default: "ON"
qos:
description: The maximum QoS level to be used when receiving messages.
required: false
type: integer
default: 0
state_topic:
description: The MQTT topic subscribed to receive sensor values.
required: true
type: string
unique_id:
description: An ID that uniquely identifies this sensor. If two sensors have the same unique ID, Home Assistant will raise an exception.
required: false
type: string
device_class:
description: Sets the [class of the device](/integrations/binary_sensor/#device-class), changing the device state and icon that is displayed on the frontend.
required: false
type: string
expire_after:
description: "Defines the number of seconds after the value expires if it's not updated. After expiry, the value is cleared, and the availability is set to false"
required: false
type: integer
value_template:
description: "Defines a [template](/docs/configuration/templating/#processing-incoming-data) to extract a value from the payload. Available variables: `entity_id`. Remove this option when 'payload_on' and 'payload_off' are sufficient to match your payloads."
required: false
type: string
force_update:
description: Sends update events even if the value hasn't changed. Useful if you want to have meaningful value graphs in history.
required: false
type: boolean
default: false
off_delay:
description: "For sensors that only sends `On` state updates, this variable sets a delay in seconds after which the sensor state will be updated back to `Off`."
required: false
type: integer
device:
description: "Information about the device this binary sensor 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
type: map
keys:
identifiers:
description: A list of IDs that uniquely identify the device. For example a serial number.
required: false
type: [list, string]
connections:
description: "A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`. For example the MAC address of a network interface: `'connections': ['mac', '02:5b:26:a8:dc:12']`."
required: false
type: [list, map]
manufacturer:
description: The manufacturer of the device.
required: false
type: string
model:
description: The model of the device.
required: false
type: string
name:
description: The name of the device.
required: false
type: string
sw_version:
description: The firmware version of the device.
required: false
type: string
{% endconfiguration %}

## Examples
Expand Down
32 changes: 16 additions & 16 deletions source/_integrations/camera.mqtt.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,19 @@ camera:
```
{% configuration %}
topic:
description: The MQTT topic to subscribe to.
required: true
type: string
name:
description: The name of the camera.
required: false
type: string
unique_id:
description: An ID that uniquely identifies this camera. If two cameras have the same unique ID Home Assistant will raise an exception.
required: false
type: string
device:
description: "Information about the device this camera 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
type: map
keys:
identifiers:
description: 'A list of IDs that uniquely identify the device. For example a serial number.'
required: false
type: [list, string]
connections:
description: 'A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`. For example the MAC address of a network interface: `"connections": ["mac", "02:5b:26:a8:dc:12"]`.'
required: false
type: list
identifiers:
description: 'A list of IDs that uniquely identify the device. For example a serial number.'
required: false
type: [list, string]
manufacturer:
description: The manufacturer of the device.
required: false
Expand All @@ -65,4 +53,16 @@ device:
description: The firmware version of the device.
required: false
type: string
name:
description: The name of the camera.
required: false
type: string
topic:
description: The MQTT topic to subscribe to.
required: true
type: string
unique_id:
description: An ID that uniquely identifies this camera. If two cameras have the same unique ID Home Assistant will raise an exception.
required: false
type: string
{% endconfiguration %}
Loading

0 comments on commit 1dc5a07

Please sign in to comment.