Edit esp-downstloungeentry.yaml
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-downstloungeentry.yaml
|
||||
#:########################################################################################:#
|
||||
# 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.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
|
||||
@@ -60,7 +61,7 @@ substitutions:
|
||||
|
||||
# Project Naming
|
||||
project_name: "Zemismart Technologies.KS-811 Single"
|
||||
project_version: "v3.9"
|
||||
project_version: "v3.10"
|
||||
|
||||
# Passwords & Secrets
|
||||
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.
|
||||
#:########################################################################################:#
|
||||
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
|
||||
|
||||
# The physical main switch is the sole retained status publisher. This remote
|
||||
# mirror only consumes that authoritative state and publishes commands.
|
||||
on_message:
|
||||
# Mirror remote state onto Relay_1 (only toggle if a change is needed)
|
||||
- topic: "${mqtt_remote_status_topic}"
|
||||
|
||||
Reference in New Issue
Block a user