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