mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Document optional MQTT cover options (#17971)
* Document optional MQTT cover options * Fix missing quote Co-authored-by: Franck Nijhof <git@frenck.dev> Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
a81fa58d6c
commit
7fef154549
@ -422,6 +422,45 @@ cover:
|
|||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
|
### Configuration for disabling cover commands
|
||||||
|
|
||||||
|
The example below shows a configuration for a cover that does not have a close command.
|
||||||
|
Setting `payload_close` empty or to `null` disables the close command and will not show the close button.
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
cover:
|
||||||
|
- platform: mqtt
|
||||||
|
payload_open: "on"
|
||||||
|
payload_close:
|
||||||
|
payload_stop: "on"
|
||||||
|
```
|
||||||
|
|
||||||
|
{% endraw %}
|
||||||
|
The following commands can be disabled: `open`, `close`, `stop` by overriding their payloads: `payload_open`, `payload_close`, `payload_stop`
|
||||||
|
|
||||||
|
For auto discovery message the payload needs to be set to `null`, example for cover without close command:
|
||||||
|
{% raw %}
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"cover": [
|
||||||
|
{
|
||||||
|
"platform": "mqtt",
|
||||||
|
"payload_open": "on",
|
||||||
|
"payload_close": null,
|
||||||
|
"payload_stop": "on"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
|
### Testing your configuration
|
||||||
|
|
||||||
To test, you can use the command line tool `mosquitto_pub` shipped with `mosquitto` or the `mosquitto-clients` package to send MQTT messages. This allows you to operate your cover manually:
|
To test, you can use the command line tool `mosquitto_pub` shipped with `mosquitto` or the `mosquitto-clients` package to send MQTT messages. This allows you to operate your cover manually:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user