Edit esp-masterbdrmwest.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-26 19:37:29 +12:00
parent 126ef9c4aa
commit f07a0d9292
+15 -3
View File
@@ -6,6 +6,7 @@
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-masterbdrmwest.yaml
#:########################################################################################:#
# VERSIONS:
# v1.6 2026-07-26 Suppressed command-producing mirror callbacks during startup
# v1.5 2026-07-25 Standardized MQTT payloads: "ON"/"OFF" → "On"/"Off"
# v1.4 2026-07-20 Flattened retained North and South MQTT status topics to the device roots.
# v1.3 2026-06-12 Reassigned logical controls after live wiring checks.
@@ -103,7 +104,7 @@ substitutions:
# Project Naming
project_name: "Zemismart Technologies.KS-811 Triple"
project_version: "v1.5"
project_version: "v1.6"
# Passwords & Secrets
api_key: !secret esp-api_key
@@ -192,6 +193,11 @@ esphome:
project:
name: "${project_name}"
version: "${project_version}"
on_boot:
priority: -100
then:
- delay: 5s
- lambda: "id(command_callbacks_ready) = true;"
#:########################################################################################:#
# ESP PLATFORM AND FRAMEWORK
@@ -215,6 +221,12 @@ logger:
# Used to suppress MQTT/HA feedback loops and hold the last known remote states.
#:########################################################################################:#
globals:
# Prevent restored/default mirror states from issuing commands during startup.
- id: command_callbacks_ready
type: bool
restore_value: false
initial_value: "false"
- id: north_update_from_sync
type: bool
restore_value: false
@@ -532,12 +544,12 @@ switch:
restore_mode: RESTORE_DEFAULT_OFF
on_turn_on:
- lambda: |-
if (!id(north_update_from_sync)) {
if (id(command_callbacks_ready) && !id(north_update_from_sync)) {
id(request_north_lights_on).execute();
}
on_turn_off:
- lambda: |-
if (!id(north_update_from_sync)) {
if (id(command_callbacks_ready) && !id(north_update_from_sync)) {
id(request_north_lights_off).execute();
}