Edit esp-officeduallights.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-25 13:13:54 +12:00
parent e74ac70ef0
commit d5bf32a37d
+22
View File
@@ -365,6 +365,28 @@ mqtt:
then:
- light.turn_off: light_2
# Mirror shared overhead status from esp-officelights onto light_2. This handles the
# case where the main lightswitch's overhead timer finishes and turns off the overhead.
# State guards prevent ping-pong with the command topic handlers above.
- topic: "${mqtt_shared_overhead_status_topic}"
payload: "${mqtt_command_on}"
then:
- if:
condition:
lambda: "return !id(relay_2).state;"
then:
- light.turn_on: light_2
- topic: "${mqtt_shared_overhead_status_topic}"
payload: "${mqtt_command_off}"
then:
- script.stop: relay_2_timer_script
- if:
condition:
lambda: "return id(relay_2).state;"
then:
- light.turn_off: light_2
#:########################################################################################:#
# SCRIPT COMPONENT:
# Independent per-relay timer scripts