Edit esp-loungesouthleftswitch.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-25 21:55:17 +12:00
parent f479c67f00
commit 0af2540480
+6 -6
View File
@@ -93,8 +93,8 @@ substitutions:
mqtt_remote_device_name: "garage-corridor-lights" mqtt_remote_device_name: "garage-corridor-lights"
mqtt_remote_command_topic: "${mqtt_command_main_topic}/${mqtt_remote_device_name}" mqtt_remote_command_topic: "${mqtt_command_main_topic}/${mqtt_remote_device_name}"
mqtt_remote_status_topic: "${mqtt_status_main_topic}/${mqtt_remote_device_name}" mqtt_remote_status_topic: "${mqtt_status_main_topic}/${mqtt_remote_device_name}"
mqtt_remote_device_command_ON: "ON" mqtt_remote_device_command_ON: "On"
mqtt_remote_device_command_OFF: "OFF" mqtt_remote_device_command_OFF: "Off"
# Switch Naming # Switch Naming
switch_1_name: "Wall Washer Left" switch_1_name: "Wall Washer Left"
@@ -268,18 +268,18 @@ switch:
on_turn_on: on_turn_on:
- if: - if:
condition: condition:
lambda: 'return !id(relay2_change_origin_remote);' lambda: "return !id(relay2_change_origin_remote);"
then: then:
- mqtt.publish: - mqtt.publish:
topic: "${mqtt_remote_command_topic}" topic: "${mqtt_remote_command_topic}"
payload: "${mqtt_remote_device_command_ON}" payload: "${mqtt_remote_device_command_ON}"
- lambda: 'id(relay2_change_origin_remote) = false;' - lambda: "id(relay2_change_origin_remote) = false;"
on_turn_off: on_turn_off:
- if: - if:
condition: condition:
lambda: 'return !id(relay2_change_origin_remote);' lambda: "return !id(relay2_change_origin_remote);"
then: then:
- mqtt.publish: - mqtt.publish:
topic: "${mqtt_remote_command_topic}" topic: "${mqtt_remote_command_topic}"
payload: "${mqtt_remote_device_command_OFF}" payload: "${mqtt_remote_device_command_OFF}"
- lambda: 'id(relay2_change_origin_remote) = false;' - lambda: "id(relay2_change_origin_remote) = false;"