mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 10:17:23 +00:00
Merge pull request #2526 from cribbstechnologies/next
Updating documentation for mqtt cover
This commit is contained in:
commit
96cef97035
35
source/_components/cover.mqtt.markdown
Normal file → Executable file
35
source/_components/cover.mqtt.markdown
Normal file → Executable file
@ -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.
|
- **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`.
|
- **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.
|
- **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 %}
|
## {% linkable_title Examples %}
|
||||||
|
|
||||||
In this section you find some real life examples of how to use this sensor.
|
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 %}
|
### {% linkable_title Full configuration %}
|
||||||
|
|
||||||
The example below shows a full configuration for a cover.
|
The example below shows a full configuration for a cover.
|
||||||
@ -71,6 +100,12 @@ cover:
|
|||||||
state_closed: "STATE"
|
state_closed: "STATE"
|
||||||
optimistic: false
|
optimistic: false
|
||||||
value_template: '{% raw %}{{ value.x }}{% endraw %}'
|
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:
|
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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user