Fix mqtt cover config info (#1007)

This commit is contained in:
Martin Hjelmare 2016-09-30 20:54:00 +02:00 committed by Fabian Affolter
parent 6534b28193
commit 72293a3d0e

View File

@ -2,7 +2,7 @@
layout: page
title: "MQTT Cover"
description: "Instructions how to integrate MQTT covers into Home Assistant."
date: 2016-06-28 17:30
date: 2016-09-28 17:30
sidebar: true
comments: false
sharing: true
@ -27,34 +27,33 @@ To use your MQTT cover in your installation, add the following to your `configur
# Example configuration.yml entry
cover:
- platform: mqtt
name: "MQTT Cover"
state_topic: "home-assistant/cover"
command_topic: "home-assistant/cover/set"
name: "MQTT Sensor"
qos: 0
retain: true
payload_open: "PAYLOAD_OPEN"
payload_close: "PAYLOAD_CLOSE"
payload_stop: "PAYLOAD_STOP"
state_open: "STATE_OPEN"
state_closed: "STATE_CLOSED"
optimistic: false
qos: 0
retain: false
value_template: '{% raw %}{{ value.x }}{% endraw %}'
```
Configuration variables:
- **state_topic** (*Required*): The MQTT topic subscribed to receive sensor values.
- **name** (*Optional*): The name of the sensor. Default is `MQTT Cover`.
- **state_topic** (*Optional*): The MQTT topic subscribed to receive sensor values.
- **command_topic** (*Required*): The MQTT topic to publish commands to control the rollershutter.
- **name** (*Optional*): The name of the sensor. Default is "MQTT Sensor".
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
- **retain** (*Optional*): If the published message should have the retain flag on or not.
- **payload_open** (*Optional*): The payload that opens the cover. Default is "UP"
- **payload_close** (*Optional*): The payload that closes the cover. Default is "DOWN"
- **payload_stop** (*Optional*): The payload that stops the rollershutter. default is "STOP"
- **state_open** (*Optional*): The payload that represents open state. Default is"STATE_OPEN"
- **state_closed** (*Optional*): The payload that represents closed state. Default is "STATE_CLOSED"
- **payload_open** (*Optional*): The payload that opens the cover. Default is `OPEN`.
- **payload_close** (*Optional*): The payload that closes the cover. Default is `CLOSE`.
- **payload_stop** (*Optional*): The payload that stops the rollershutter. default is `STOP`.
- **state_open** (*Optional*): The payload that represents open state. Default is `open`.
- **state_closed** (*Optional*): The payload that represents closed state. Default is `closed`.
- **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is `true` if no state topic defined, else `false`.
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is `0`. Will also be used when publishing messages.
- **retain** (*Optional*): If the published message should have the retain flag on or not. Default is `false`.
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
For a quick check you can use the commandline tools shipped with `mosquitto` to send MQTT messages. Set the state of your sensor manually:
@ -62,4 +61,3 @@ For a quick check you can use the commandline tools shipped with `mosquitto` to
```bash
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/cover/set -m "PAYLOAD_CLOSE"
```