I have the following 2 automations to turn on the outdoor lighting at an lx below 3 and off again when the value is above 3. Can i combine this to one automation with an else statement and how to do that ?
To turn on
alias: turn on outdoor lighting under 3lx
description: ''
trigger:
- type: illuminance
platform: device
device_id: a7d3761909e2d71a04937f0347894beb
entity_id: sensor.hue_outdoor_motion_sensor_1_illuminance
domain: sensor
below: 3
condition: []
action:
- type: turn_on
device_id: c375c03f6e0e7af9e70e64f7606bd865
entity_id: light.porch_left
domain: light
- type: turn_on
device_id: 1c72235e9b42406cdf9d55c5f4dacce8
entity_id: light.porch_right
domain: light
- type: turn_on
device_id: 9e1a868da357e7a713b2bb1b1ced6baa
entity_id: light.light_garage_left
domain: light
mode: single
To turn off
alias: turn off outdoor lighting above 3lx
description: ''
trigger:
- type: illuminance
platform: device
device_id: a7d3761909e2d71a04937f0347894beb
entity_id: sensor.hue_outdoor_motion_sensor_1_illuminance
domain: sensor
above: 3
condition: []
action:
- type: turn_off
device_id: c375c03f6e0e7af9e70e64f7606bd865
entity_id: light.porch_left
domain: light
- type: turn_off
device_id: 1c72235e9b42406cdf9d55c5f4dacce8
entity_id: light.porch_right
domain: light
- type: turn_off
device_id: 9e1a868da357e7a713b2bb1b1ced6baa
entity_id: light.lamp_garage_left
domain: light
mode: single```