Skip to content

Commit

Permalink
Merge pull request home-assistant#2526 from cribbstechnologies/next
Browse files Browse the repository at this point in the history
Updating documentation for mqtt cover
  • Loading branch information
robbiet480 authored Apr 30, 2017
2 parents 0607999 + b0768fc commit 96cef97
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions source/_components/cover.mqtt.markdown
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,40 @@ Configuration variables:
- **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.
- **tilt_command_topic** (*Optional*): The MQTT topic to publish commands to control the cover tilt.
- **tilt_status_topic** (*Optional*): The MQTT topic subscribed to receive tilt status update values.
- **tilt_min** (*Optional*): The minimum tilt value. Default is `0`
- **tilt_max** (*Optional*): The maximum tilt value. Default is `100`
- **tilt_closed_value** (*Optional*): The value that will be sent on a `close_cover_tilt` command. Default is `0`
- **tilt_opened_value** (*Optional*): The value that will be sent on an `open_cover_tilt` command. Default is `100`
- **tilt_status_optimistic** (*Optional*): Flag that determines if tilt works in optimistic mode. Default is `true` if `tilt_status_topic` is not deinfed, else `false`

## {% linkable_title Examples %}

In this section you find some real life examples of how to use this sensor.

### {% linkable_title Full configuration without tilt %}

The example below shows a full configuration for a cover without tilt.

```yaml
# Example configuration.yml entry
cover:
- platform: mqtt
state_topic: "home-assistant/cover"
command_topic: "home-assistant/cover/set"
name: "MQTT Cover"
qos: 0
retain: true
payload_open: "OPEN"
payload_close: "CLOSE"
payload_stop: "STOP"
state_open: "OPEN"
state_closed: "STATE"
optimistic: false
value_template: '{% raw %}{{ value.x }}{% endraw %}'
```

### {% linkable_title Full configuration %}

The example below shows a full configuration for a cover.
Expand All @@ -71,6 +100,12 @@ cover:
state_closed: "STATE"
optimistic: false
value_template: '{% raw %}{{ value.x }}{% endraw %}'
tilt_command_topic: 'home-assistant/cover/tilt'
tilt_status_topic: 'home-assistant/cover/tilt-status'
tilt_min: 0
tilt_max: 180
tilt_closed_value: 70
tilt_opened_value: 180
```

For a check you can use the command line tools `mosquitto_pub` shipped with `mosquitto` to send MQTT messages. This allows you to operate your cover manually:
Expand Down

0 comments on commit 96cef97

Please sign in to comment.