Edit esp-downstloungeentry.yaml
This commit is contained in:
@@ -163,6 +163,15 @@ logger:
|
|||||||
# This adds device-specific MQTT command triggers to the common MQTT configuration.
|
# This adds device-specific MQTT command triggers to the common MQTT configuration.
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
mqtt:
|
mqtt:
|
||||||
|
# Republish current mirror state whenever MQTT reconnects so the remote device
|
||||||
|
# knows our view of the state.
|
||||||
|
on_connect:
|
||||||
|
- mqtt.publish:
|
||||||
|
topic: "${mqtt_remote_status_topic}"
|
||||||
|
payload: !lambda |-
|
||||||
|
return id(Relay_1).state ? "${mqtt_remote_device_command_on}" : "${mqtt_remote_device_command_off}";
|
||||||
|
retain: true
|
||||||
|
|
||||||
on_message:
|
on_message:
|
||||||
# Mirror remote state onto Relay_1 (only toggle if a change is needed)
|
# Mirror remote state onto Relay_1 (only toggle if a change is needed)
|
||||||
- topic: "${mqtt_remote_status_topic}"
|
- topic: "${mqtt_remote_status_topic}"
|
||||||
|
|||||||
Reference in New Issue
Block a user