Edit esp-masterbdrmsouth.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-26 19:37:29 +12:00
parent f07a0d9292
commit edda2027cb
+17 -5
View File
@@ -6,6 +6,7 @@
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-masterbdrmsouth.yaml # https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-masterbdrmsouth.yaml
#:########################################################################################:# #:########################################################################################:#
# VERSIONS: # 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.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.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. # v1.3 2026-06-12 Reassigned logical controls after live wiring checks.
@@ -102,7 +103,7 @@ substitutions:
# Project Naming # Project Naming
project_name: "Zemismart Technologies.KS-811 Triple" project_name: "Zemismart Technologies.KS-811 Triple"
project_version: "v1.5" project_version: "v1.6"
# Passwords & Secrets # Passwords & Secrets
api_key: !secret esp-api_key api_key: !secret esp-api_key
@@ -193,6 +194,11 @@ esphome:
project: project:
name: "${project_name}" name: "${project_name}"
version: "${project_version}" version: "${project_version}"
on_boot:
priority: -100
then:
- delay: 5s
- lambda: "id(command_callbacks_ready) = true;"
#:########################################################################################:# #:########################################################################################:#
# ESP PLATFORM AND FRAMEWORK # ESP PLATFORM AND FRAMEWORK
@@ -216,6 +222,12 @@ logger:
# Used to suppress MQTT/HA feedback loops and hold the last known remote states. # Used to suppress MQTT/HA feedback loops and hold the last known remote states.
#:########################################################################################:# #:########################################################################################:#
globals: 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 - id: north_update_from_sync
type: bool type: bool
restore_value: false restore_value: false
@@ -567,12 +579,12 @@ switch:
restore_mode: RESTORE_DEFAULT_OFF restore_mode: RESTORE_DEFAULT_OFF
on_turn_on: on_turn_on:
- lambda: |- - lambda: |-
if (!id(north_update_from_sync)) { if (id(command_callbacks_ready) && !id(north_update_from_sync)) {
id(request_north_lights_on).execute(); id(request_north_lights_on).execute();
} }
on_turn_off: on_turn_off:
- lambda: |- - lambda: |-
if (!id(north_update_from_sync)) { if (id(command_callbacks_ready) && !id(north_update_from_sync)) {
id(request_north_lights_off).execute(); id(request_north_lights_off).execute();
} }
@@ -584,12 +596,12 @@ switch:
restore_mode: RESTORE_DEFAULT_OFF restore_mode: RESTORE_DEFAULT_OFF
on_turn_on: on_turn_on:
- lambda: |- - lambda: |-
if (!id(south_update_from_sync)) { if (id(command_callbacks_ready) && !id(south_update_from_sync)) {
id(request_south_lights_on).execute(); id(request_south_lights_on).execute();
} }
on_turn_off: on_turn_off:
- lambda: |- - lambda: |-
if (!id(south_update_from_sync)) { if (id(command_callbacks_ready) && !id(south_update_from_sync)) {
id(request_south_lights_off).execute(); id(request_south_lights_off).execute();
} }