Edit esp-officelights.yaml

This commit is contained in:
ESPHome Device Builder
2026-08-16 17:19:31 +12:00
parent b3345cf9f6
commit 85a177b3b7
+7 -11
View File
@@ -6,6 +6,8 @@
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-officelights.yaml
#:########################################################################################:#
# VERSIONS:
# v3.1 2026-08-16 Makes the Sonoff Dual the sole overhead status authority. Removes the
# bidirectional shared retained-status topic that could chatter during reconnects.
# v3.0 2026-07-25 Refactored MQTT sync to use template HA switch actions; physical button and
# HA control now publish command topics to officeduallights; relay callbacks
# publish status only to prevent command ping-pong/chattering. 2-way sync with
@@ -79,7 +81,7 @@ substitutions:
# Project Naming
project_name: "Zemismart Technologies.KS-811 Triple"
project_version: "v3.0"
project_version: "v3.1"
# Passwords & Secrets
api_key: !secret esp-api_key
@@ -109,23 +111,17 @@ substitutions:
mqtt_this_device_status_topic_bunker: "${mqtt_status_main_topic}/${mqtt_this_device_function_bunker}"
# MQTT LOCAL Controls - Overhead Lights
# Command topics: this device publishes here when Button 2 or HA toggles overhead.
# Status topics: this device publishes retained status here on virtual relay state changes.
# esp-officeduallights subscribes to mirror remote overhead state.
# Commands from Button 2 or HA are sent to the Sonoff Dual, which is the
# sole physical relay and status authority for this circuit.
mqtt_this_device_function_overhead: "office-main-lights-right"
mqtt_this_device_command_topic_overhead: "${mqtt_command_main_topic}/${mqtt_this_device_function_overhead}"
mqtt_this_device_status_topic_overhead: "${mqtt_status_main_topic}/${mqtt_this_device_function_overhead}"
mqtt_dual_status_overhead_function: "office-dual-lights-left"
mqtt_dual_status_overhead_topic: "${mqtt_status_main_topic}/${mqtt_dual_status_overhead_function}"
# MQTT Status/Command payloads
mqtt_command_on: "On"
mqtt_command_off: "Off"
# MQTT Overhead Status - shared topic for overhead state sync
# Both this device and esp-officeduallights publish and subscribe to this topic so
# whichever device's timer finishes first keeps the other in sync.
mqtt_shared_overhead_status_function: "office-overhead-status"
mqtt_shared_overhead_status_topic: "${mqtt_status_main_topic}/${mqtt_shared_overhead_status_function}"
# Switch/Relay/Button Naming
switch_1_name: "Bunker Lights" # Physical relay (GPIO13) connected to bunker light load
switch_2_name: "Overhead Lights" # Virtual mirror of esp-officeduallights overhead state