From 5bb498db038889762ecc977fc55f2f42d62a7e46 Mon Sep 17 00:00:00 2001 From: Brian Cribbs Date: Fri, 28 Apr 2017 13:14:20 -0400 Subject: [PATCH 1/3] updating documentation for mqtt cover --- source/_components/cover.mqtt.markdown | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) mode change 100644 => 100755 source/_components/cover.mqtt.markdown diff --git a/source/_components/cover.mqtt.markdown b/source/_components/cover.mqtt.markdown old mode 100644 new mode 100755 index d70dc6ed88e..6e12254ea83 --- a/source/_components/cover.mqtt.markdown +++ b/source/_components/cover.mqtt.markdown @@ -46,11 +46,39 @@ 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` ## {% 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. @@ -71,6 +99,12 @@ cover: state_closed: "STATE" optimistic: false value_template: '{% raw %}{{ value.x }}{% endraw %}' + tilt_command_topic: '' + tilt_status_topic: '' + 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: From a3fe52135b776a59e770b07d4b9ebacf832e2a57 Mon Sep 17 00:00:00 2001 From: Brian Cribbs Date: Fri, 28 Apr 2017 21:46:04 -0400 Subject: [PATCH 2/3] updating docs to match schema changes --- source/_components/cover.mqtt.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/_components/cover.mqtt.markdown b/source/_components/cover.mqtt.markdown index 6e12254ea83..a64346d8c2e 100755 --- a/source/_components/cover.mqtt.markdown +++ b/source/_components/cover.mqtt.markdown @@ -99,12 +99,12 @@ cover: state_closed: "STATE" optimistic: false value_template: '{% raw %}{{ value.x }}{% endraw %}' - tilt_command_topic: '' - tilt_status_topic: '' - tilt_min: '0' - tilt_max: '180' - tilt_closed_value: '70' - tilt_opened_value: '180' + 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: From b0768fc772cff04af93be4e452a7632602731e6e Mon Sep 17 00:00:00 2001 From: Brian Cribbs Date: Sat, 29 Apr 2017 19:29:09 -0400 Subject: [PATCH 3/3] updating documentation --- source/_components/cover.mqtt.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/source/_components/cover.mqtt.markdown b/source/_components/cover.mqtt.markdown index a64346d8c2e..60e10391dab 100755 --- a/source/_components/cover.mqtt.markdown +++ b/source/_components/cover.mqtt.markdown @@ -52,6 +52,7 @@ Configuration variables: - **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 %}