Edit esp-downstloungeentry.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-26 19:35:07 +12:00
parent 5b13bc4350
commit 126ef9c4aa
+4 -10
View File
@@ -6,6 +6,7 @@
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-downstloungeentry.yaml # https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-downstloungeentry.yaml
#:########################################################################################:# #:########################################################################################:#
# VERSIONS: # VERSIONS:
# v3.10 2026-07-26 Made the physical main switch the sole retained status publisher
# v3.9 2026-07-25 Added on_connect republish and state guards for reliable two-way sync # v3.9 2026-07-25 Added on_connect republish and state guards for reliable two-way sync
# v3.8 2026-07-20 Updated remote MQTT topics for the flattened downstairs lounge main lights topic # v3.8 2026-07-20 Updated remote MQTT topics for the flattened downstairs lounge main lights topic
# v3.7 2026-02-25 Updated yaml to zorruno layout V1.1 # v3.7 2026-02-25 Updated yaml to zorruno layout V1.1
@@ -60,7 +61,7 @@ substitutions:
# Project Naming # Project Naming
project_name: "Zemismart Technologies.KS-811 Single" project_name: "Zemismart Technologies.KS-811 Single"
project_version: "v3.9" project_version: "v3.10"
# Passwords & Secrets # Passwords & Secrets
api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names api_key: !secret esp-api_key # unfortunately you can't use substitutions inside secrets names
@@ -163,15 +164,8 @@ 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 # The physical main switch is the sole retained status publisher. This remote
# knows our view of the state. # mirror only consumes that authoritative state and publishes commands.
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}"