Edit esp-officeduallights.yaml
This commit is contained in:
@@ -241,13 +241,21 @@ mqtt:
|
|||||||
payload: "On"
|
payload: "On"
|
||||||
then:
|
then:
|
||||||
- script.stop: relay_1_timer_script
|
- 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}"
|
- topic: "${mqtt_local_command1_topic}"
|
||||||
payload: "Off"
|
payload: "Off"
|
||||||
then:
|
then:
|
||||||
- script.stop: relay_1_timer_script
|
- 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}"
|
- topic: "${mqtt_local_command1_topic}"
|
||||||
then:
|
then:
|
||||||
@@ -279,13 +287,21 @@ mqtt:
|
|||||||
payload: "On"
|
payload: "On"
|
||||||
then:
|
then:
|
||||||
- script.stop: relay_2_timer_script
|
- 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}"
|
- topic: "${mqtt_local_command2_topic}"
|
||||||
payload: "Off"
|
payload: "Off"
|
||||||
then:
|
then:
|
||||||
- script.stop: relay_2_timer_script
|
- 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}"
|
- topic: "${mqtt_local_command2_topic}"
|
||||||
then:
|
then:
|
||||||
|
|||||||
Reference in New Issue
Block a user