Edit esp-loungesouthleftswitch.yaml
This commit is contained in:
@@ -93,8 +93,8 @@ substitutions:
|
||||
mqtt_remote_device_name: "garage-corridor-lights"
|
||||
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_device_command_ON: "ON"
|
||||
mqtt_remote_device_command_OFF: "OFF"
|
||||
mqtt_remote_device_command_ON: "On"
|
||||
mqtt_remote_device_command_OFF: "Off"
|
||||
|
||||
# Switch Naming
|
||||
switch_1_name: "Wall Washer Left"
|
||||
@@ -268,18 +268,18 @@ switch:
|
||||
on_turn_on:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return !id(relay2_change_origin_remote);'
|
||||
lambda: "return !id(relay2_change_origin_remote);"
|
||||
then:
|
||||
- mqtt.publish:
|
||||
topic: "${mqtt_remote_command_topic}"
|
||||
payload: "${mqtt_remote_device_command_ON}"
|
||||
- lambda: 'id(relay2_change_origin_remote) = false;'
|
||||
- lambda: "id(relay2_change_origin_remote) = false;"
|
||||
on_turn_off:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return !id(relay2_change_origin_remote);'
|
||||
lambda: "return !id(relay2_change_origin_remote);"
|
||||
then:
|
||||
- mqtt.publish:
|
||||
topic: "${mqtt_remote_command_topic}"
|
||||
payload: "${mqtt_remote_device_command_OFF}"
|
||||
- lambda: 'id(relay2_change_origin_remote) = false;'
|
||||
- lambda: "id(relay2_change_origin_remote) = false;"
|
||||
|
||||
Reference in New Issue
Block a user