good afternoon ladies and gentlemen
I’m trying to setup an automation for an outside light where:
1 - When the light turn at a specific time for the brightness to be at 100%
2 - After let say 30mins for the brightness to be at 30%
3 - If there is motion while the light is on and brightness at 30%; i need the
brightness to go up to 100% and when motion is off, for the brightness should go back down to 30% until the time for the light to be off.
Any idea on how i can start such automation.
Please follow Questions Guidelines #9-11 by sharing what you have tried (properly formatted), and describe what did and didn’t work the way you expected.
i’m sorry about that, here is what i got so far
alias: TEST ADVANCE AUTOMATION LIGHTS
description: TEST ADVANCE AUTOMATION LIGHTS
triggers:
- trigger: time
at: "16:45:00"
conditions: []
actions:
- action: light.turn_on
target:
entity_id: light.hallway_lights_light
data:
brightness_pct: 100
- condition: state
entity_id: light.hallway_lights_light
state: "on"
for:
hours: 1
minutes: 0
seconds: 0
- device_id: 44a28ee31883839bf5351c1282685bb5
domain: light
entity_id: 5f07655ef343dc33ad8678b213107abc
type: brightness_decrease
- condition: state
entity_id: binary_sensor.test_sim_motion_window
state: "on"
for:
hours: 0
minutes: 0
seconds: 2
- device_id: 44a28ee31883839bf5351c1282685bb5
domain: light
entity_id: 5f07655ef343dc33ad8678b213107abc
type: brightness_increase
- condition: state
entity_id: binary_sensor.test_sim_motion_window
state: "off"
for:
hours: 0
minutes: 0
seconds: 5
- device_id: 44a28ee31883839bf5351c1282685bb5
domain: light
entity_id: 5f07655ef343dc33ad8678b213107abc
type: brightness_decrease
- condition: time
after: "17:00:00"
mode: single
This might help you as a starting point:
description: ""
mode: single
triggers:
- trigger: state
entity_id:
- binary_sensor.your_own_motion_sensor
to: "on"
id: motion_on
alias: Movement detected
- trigger: state
entity_id:
- binary_sensor.your_own_motion_sensor
to: "off"
id: motion_off
alias: No movement detected
- trigger: time
at: "16:45:00"
id: time_on
alias: Time of day on
- trigger: time
at: "23:30:00"
id: time_off
alias: Time of day off
conditions: []
actions:
- alias: Lights on by time
if:
- condition: trigger
id:
- time_on
then:
- action: light.turn_on
target:
entity_id: light.your_own_light
data:
brightness_pct: 100
- delay:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
- action: light.turn_on
target:
entity_id: light.your_own_light
data:
brightness_pct: 30
- alias: Lights level up/down by motion
if:
- condition: and
conditions:
- condition: trigger
id:
- motion_on
- condition: state
entity_id: light.your_own_light
attribute: brightness
state: "30"
then:
- action: light.turn_on
target:
entity_id: light.your_own_light
data:
brightness_pct: 100
else:
- action: light.turn_on
target:
entity_id: light.your_own_light
data:
brightness_pct: 30
- alias: Lights off by time
if:
- condition: trigger
id:
- time_off
then:
- action: light.turn_off
target:
entity_id:
- light.your_own_light
data: {}
thank you very much for the your input; i will give this a try