Skip to content

Commit fad9cfa

Browse files
authored
Update cover.mqtt.markdown
1 parent 216f5a4 commit fad9cfa

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

source/_components/cover.mqtt.markdown

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,31 @@ cover:
3030
state_topic: "home-assistant/cover"
3131
command_topic: "home-assistant/cover/set"
3232
name: "MQTT Sensor"
33-
optimistic: false
3433
qos: 0
3534
retain: true
35+
payload_open: "PAYLOAD_OPEN"
36+
payload_close: "PAYLOD__CLOSE"
37+
payload_stop: "PAYLOAD_STOP"
3638
state_open: "STATE_OPEN"
3739
state_closed: "STATE_CLOSED"
38-
service_open: "SERVICE_OPEN"
39-
service_close: "SERVICE_CLOSE"
40+
optimistic: false
41+
retain: false
4042
value_template: '{% raw %}{{ value.x }}{% endraw %}'
4143
```
4244
4345
Configuration variables:
4446
4547
- **state_topic** (*Required*): The MQTT topic subscribed to receive sensor values.
48+
- **command_topic** (*Required*): The MQTT topic to publish commands to control the rollershutter.
4649
- **name** (*Optional*): The name of the sensor. Default is "MQTT Sensor".
50+
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
51+
- **retain** (*Optional*): If the published message should have the retain flag on or not.
52+
- **payload_open** (*Optional*): The payload that opens the cover. Default is "UP"
53+
- **payload_close** (*Optional*): The payload that closes the cover. Default is "DOWN"
54+
- **payload_stop** (*Optional*): The payload that stops the rollershutter. default is "STOP"
4755
- **state_open** (*Optional*): The payload that represents open state. Default is"STATE_OPEN"
4856
- **state_closed** (*Optional*): The payload that represents closed state. Default is "STATE_CLOSED"
49-
- **service_open** (*Optional*): The payload that represents open state in service mode. Default is"SERVICE_OPEN"
50-
- **service_close** (*Optional*): The payload that represents closed state in service mode. Default is "SERVICE_CLOSE"
5157
- **optimistic** (*Optional*): Flag that defines if switch works in optimistic mode. Default is `true` if no state topic defined, else `false`.
52-
- **qos** (*Optional*): The maximum QoS level of the state topic. Default is 0 and will also be used to publishing messages.
53-
- **retain** (*Optional*): If the published message should have the retain flag on or not.
5458
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
5559

5660
For a quick check you can use the commandline tools shipped with `mosquitto` to send MQTT messages. Set the state of your sensor manually:

0 commit comments

Comments
 (0)