Edit esp-officeduallights.yaml
This commit is contained in:
@@ -241,13 +241,21 @@ mqtt:
|
||||
payload: "On"
|
||||
then:
|
||||
- script.stop: relay_1_timer_script
|
||||
- light.turn_on: light_1
|
||||
- if:
|
||||
condition:
|
||||
lambda: "return !id(relay_1).state;"
|
||||
then:
|
||||
- light.turn_on: light_1
|
||||
|
||||
- topic: "${mqtt_local_command1_topic}"
|
||||
payload: "Off"
|
||||
then:
|
||||
- script.stop: relay_1_timer_script
|
||||
- light.turn_off: light_1
|
||||
- if:
|
||||
condition:
|
||||
lambda: "return id(relay_1).state;"
|
||||
then:
|
||||
- light.turn_off: light_1
|
||||
|
||||
- topic: "${mqtt_local_command1_topic}"
|
||||
then:
|
||||
@@ -279,13 +287,21 @@ mqtt:
|
||||
payload: "On"
|
||||
then:
|
||||
- script.stop: relay_2_timer_script
|
||||
- light.turn_on: light_2
|
||||
- if:
|
||||
condition:
|
||||
lambda: "return !id(relay_2).state;"
|
||||
then:
|
||||
- light.turn_on: light_2
|
||||
|
||||
- topic: "${mqtt_local_command2_topic}"
|
||||
payload: "Off"
|
||||
then:
|
||||
- script.stop: relay_2_timer_script
|
||||
- light.turn_off: light_2
|
||||
- if:
|
||||
condition:
|
||||
lambda: "return id(relay_2).state;"
|
||||
then:
|
||||
- light.turn_off: light_2
|
||||
|
||||
- topic: "${mqtt_local_command2_topic}"
|
||||
then:
|
||||
|
||||
Reference in New Issue
Block a user