Edit esp-masterbdrmsouth.yaml
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-masterbdrmsouth.yaml
|
||||
#:########################################################################################:#
|
||||
# VERSIONS:
|
||||
# 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.
|
||||
# Relay 1 on both switches = North Lights virtual/Tasmota control.
|
||||
# Relay 2 on both switches = South Lights control; WEST Relay 2 is physical load.
|
||||
@@ -55,7 +56,7 @@
|
||||
# NOTE: TOGGLE is intentionally not handled here to avoid double-toggle if both switches receive it.
|
||||
#
|
||||
# - North Lights retained status/sync topic:
|
||||
# ${mqtt_local_status_topic1}/state
|
||||
# ${mqtt_local_status_topic1}
|
||||
# Payload "On" / "Off" mirrors the actual North Lights state.
|
||||
#
|
||||
# - South Lights local command topic:
|
||||
@@ -65,7 +66,7 @@
|
||||
# NOTE: TOGGLE is intentionally not handled here to avoid ambiguous multi-device toggles.
|
||||
#
|
||||
# - South Lights retained status/sync topic:
|
||||
# ${mqtt_local_status_topic2}/state
|
||||
# ${mqtt_local_status_topic2}
|
||||
# Payload "On" / "Off" mirrors the actual South Lights state.
|
||||
#:########################################################################################:#
|
||||
# OFFLINE NOTES:
|
||||
@@ -87,7 +88,6 @@
|
||||
# - Accurate time is NOT needed (SNTP not needed).
|
||||
#:########################################################################################:#
|
||||
|
||||
|
||||
#:########################################################################################:#
|
||||
# SUBSTITUTIONS: Specific device variable substitutions
|
||||
# If NOT using a secrets file, just replace these with the passwords etc (in quotes)
|
||||
@@ -101,7 +101,7 @@ substitutions:
|
||||
|
||||
# Project Naming
|
||||
project_name: "Zemismart Technologies.KS-811 Triple"
|
||||
project_version: "v1.3"
|
||||
project_version: "v1.4"
|
||||
|
||||
# Passwords & Secrets
|
||||
api_key: !secret esp-api_key
|
||||
@@ -218,22 +218,22 @@ globals:
|
||||
- id: north_update_from_sync
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: 'false'
|
||||
initial_value: "false"
|
||||
|
||||
- id: south_update_from_sync
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: 'false'
|
||||
initial_value: "false"
|
||||
|
||||
- id: north_lights_state
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: 'false'
|
||||
initial_value: "false"
|
||||
|
||||
- id: south_lights_state
|
||||
type: bool
|
||||
restore_value: false
|
||||
initial_value: 'false'
|
||||
initial_value: "false"
|
||||
|
||||
#:########################################################################################:#
|
||||
# MQTT: Device-specific MQTT command + retained status/sync triggers
|
||||
@@ -275,7 +275,7 @@ mqtt:
|
||||
}
|
||||
|
||||
# Retained North status is a secondary mirror/sync path.
|
||||
- topic: "${mqtt_local_status_topic1}/state"
|
||||
- topic: "${mqtt_local_status_topic1}"
|
||||
then:
|
||||
- lambda: |-
|
||||
if (x == "On" || x == "ON" || x == "on") {
|
||||
@@ -291,7 +291,7 @@ mqtt:
|
||||
# retained status after the physical Relay 2 changes, and this switch mirrors
|
||||
# that status onto its local Relay 2.
|
||||
# -------------------------------------------------------------------------
|
||||
- topic: "${mqtt_local_status_topic2}/state"
|
||||
- topic: "${mqtt_local_status_topic2}"
|
||||
then:
|
||||
- lambda: |-
|
||||
if (x == "On" || x == "ON" || x == "on") {
|
||||
@@ -410,7 +410,7 @@ script:
|
||||
id(north_update_from_sync) = true;
|
||||
- switch.turn_on: relay_1
|
||||
- mqtt.publish:
|
||||
topic: "${mqtt_local_status_topic1}/state"
|
||||
topic: "${mqtt_local_status_topic1}"
|
||||
payload: "On"
|
||||
retain: true
|
||||
- lambda: |-
|
||||
@@ -424,7 +424,7 @@ script:
|
||||
id(north_update_from_sync) = true;
|
||||
- switch.turn_off: relay_1
|
||||
- mqtt.publish:
|
||||
topic: "${mqtt_local_status_topic1}/state"
|
||||
topic: "${mqtt_local_status_topic1}"
|
||||
payload: "Off"
|
||||
retain: true
|
||||
- lambda: |-
|
||||
|
||||
Reference in New Issue
Block a user