Update configuration example (fix #192)

This commit is contained in:
Fabian Affolter 2016-02-09 12:11:48 +01:00
parent 1196414387
commit 4735114d53

View File

@ -12,20 +12,22 @@ ha_category: Rollershutter
--- ---
This platform enables the possibility to control an MQTT rollershutter. The device state will be updated only after receiving the a new state from `state_topic`. If these messages are published with RETAIN flag, the MQTT device will receive an instant state update after subscription and will start with correct state. Otherwise, the initial state will be `unknown`. The `mqtt` rollershutter platform enables the possibility to control an MQTT rollershutter. The device state will be updated only after receiving the a new state from `state_topic`. If these messages are published with RETAIN flag, the MQTT device will receive an instant state update after subscription and will start with correct state. Otherwise, the initial state will be `unknown`.
There is a state attribute that stores the relative position of the device, where 0% means the device is `closed` and all other intermediate positions means the device is `open`. There is a state attribute that stores the relative position of the device, where 0% means the device is `closed` and all other intermediate positions means the device is `open`.
To enable this platform, add the following lines to your `configuration.yaml`:
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
motor: rollershutter:
platform: mqtt platform: mqtt
name: "Bedroom Rollershutter" name: "Bedroom Rollershutter"
state_topic: "home/bedroom/rollershutter" state_topic: "home/bedroom/rollershutter"
command_topic: "home/bedroom/rollershutter/set" command_topic: "home/bedroom/rollershutter/set"
qos: 0 qos: 0
payload_open: "OPEN" payload_up: "OPEN"
payload_close: "CLOSE" payload_down: "CLOSE"
payload_stop: "STOP" payload_stop: "STOP"
value_template: '{% raw %}{{ value.x }}{% endraw %}' value_template: '{% raw %}{{ value.x }}{% endraw %}'
``` ```
@ -37,7 +39,7 @@ Configuration variables:
- **name** (*Optional*): The name of the rollershutter. Default is 'MQTT Rollershutter'. - **name** (*Optional*): The name of the rollershutter. Default is 'MQTT Rollershutter'.
- **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates. If not defined, the rollershutter will be stateless, that is, no information about current position or open/closed. If defined, the received payload must be a integer between 0 and 100, that represents the percentage for fully closed and fully open, respectively. - **state_topic** (*Optional*): The MQTT topic subscribed to receive state updates. If not defined, the rollershutter will be stateless, that is, no information about current position or open/closed. If defined, the received payload must be a integer between 0 and 100, that represents the percentage for fully closed and fully open, respectively.
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0. This QoS will also be used to publishing messages. - **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0. This QoS will also be used to publishing messages.
- **payload_open** (*Optional*): The payload to open the rollershutter. Default is "OPEN". - **payload_up** (*Optional*): The payload to open the rollershutter. Default is "OPEN".
- **payload_close** (*Optional*): The payload to close the rollershutter. Default is "CLOSE". - **payload_down** (*Optional*): The payload to close the rollershutter. Default is "CLOSE".
- **payload_stop** (*Optional*): The payload to stop the rollershutter. Default is "STOP". - **payload_stop** (*Optional*): The payload to stop the rollershutter. Default is "STOP".
- **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload. - **value_template** (*Optional*): Defines a [template](/getting-started/templating/) to extract a value from the payload.