@@ -30,27 +30,31 @@ cover:
30
30
state_topic : " home-assistant/cover"
31
31
command_topic : " home-assistant/cover/set"
32
32
name : " MQTT Sensor"
33
- optimistic : false
34
33
qos : 0
35
34
retain : true
35
+ payload_open : " PAYLOAD_OPEN"
36
+ payload_close : " PAYLOD__CLOSE"
37
+ payload_stop : " PAYLOAD_STOP"
36
38
state_open : " STATE_OPEN"
37
39
state_closed : " STATE_CLOSED"
38
- service_open : " SERVICE_OPEN "
39
- service_close : " SERVICE_CLOSE "
40
+ optimistic : false
41
+ retain : false
40
42
value_template : ' {% raw %}{{ value.x }}{% endraw %}'
41
43
` ` `
42
44
43
45
Configuration variables:
44
46
45
47
- **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.
46
49
- **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"
47
55
- **state_open** (*Optional*): The payload that represents open state. Default is"STATE_OPEN"
48
56
- **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"
51
57
- **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.
54
58
- **value_template** (*Optional*): Defines a [template](/topics/templating/) to extract a value from the payload.
55
59
56
60
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