Hi
as the code below I try to turn off the relay switch when my all light goes off after 1m but is not work
any help
thanks
light:
- platform: rgb
name: "$devicename Right Strip"
id: right_strip_rgb
red: right_strip_red
green: right_strip_green
blue: right_strip_blue
on_turn_on:
- switch.turn_on: relay
on_turn_off:
- if:
condition:
- light.is_off: "right_strip_rgb"
- light.is_off: "lift_strip_rgb"
- light.is_off: "down_strip_rgb"
- light.is_off: "top_strip_ww"
- light.is_off: "down_strip_ww"
then:
- delay: 60s
- switch.turn_off: relay
- platform: rgb
name: "$devicename Lift Strip"
id: lift_strip_rgb
red: lift_strip_red
green: lift_strip_green
blue: lift_strip_blue
on_turn_on:
- switch.turn_on: relay
on_turn_off:
- if:
condition:
- light.is_off: "right_strip_rgb"
- light.is_off: "lift_strip_rgb"
- light.is_off: "down_strip_rgb"
- light.is_off: "top_strip_ww"
- light.is_off: "down_strip_ww"
then:
- delay: 60s
- switch.turn_off: relay
- platform: rgb
name: "$devicename Down Strip"
id: down_strip_rgb
red: down_strip_red
green: down_strip_green
blue: down_strip_blue
on_turn_on:
- switch.turn_on: relay
on_turn_off:
- if:
condition:
- light.is_off: "right_strip_rgb"
- light.is_off: "lift_strip_rgb"
- light.is_off: "down_strip_rgb"
- light.is_off: "top_strip_ww"
- light.is_off: "down_strip_ww"
then:
- delay: 60s
- switch.turn_off: relay
- platform: monochromatic
name: "$devicename Top W W"
id: top_strip_ww
output: top_w_w
on_turn_on:
- switch.turn_on: relay
on_turn_off:
- if:
condition:
- light.is_off: "right_strip_rgb"
- light.is_off: "lift_strip_rgb"
- light.is_off: "down_strip_rgb"
- light.is_off: "top_strip_ww"
- light.is_off: "down_strip_ww"
then:
- delay: 60s
- switch.turn_off: relay
- platform: monochromatic
name: "$devicename Down W W"
id: down_strip_ww
output: down_w_w
on_turn_on:
- switch.turn_on: relay
on_turn_off:
- if:
condition:
- light.is_off: "right_strip_rgb"
- light.is_off: "lift_strip_rgb"
- light.is_off: "down_strip_rgb"
- light.is_off: "top_strip_ww"
- light.is_off: "down_strip_ww"
then:
- delay: 60s
- switch.turn_off: relay