Help with an Automation, Motion Sensor and Time Management

Hi all,

I have a question whether this is possible or not. Currently I do have a lot of automation which is fine, but with this i had a lot of problems.

So here is what I want to accomplish:

Motion Sensor Calls my 3 Lamps…
From 3 - 8 am my lamps should have an Level of 20 %.
The rest of the Day should be fully 100 Prozent of the light level.

Thanks for any Help

There are definitely more efficient ways of doing this but you could just create 2 automations 1 for each time period and create the conditions in each automation

This will turn my office light on at 20% if motion is detected between 3-8

alias: New Automation
  description: ''
  trigger:
  - type: motion
    platform: device
    device_id: bfa0ff60e28a766ecd15839b0d75236f
    entity_id: binary_sensor.pir_sensor
    domain: binary_sensor
  condition:
  - condition: time
    after: 03:00:00
    before: 08:00:00
    weekday:
    - mon
    - tue
    - wed
    - thu
    - fri
    - sat
    - sun
  action:
  - type: turn_on
    device_id: e65cd1e6b3ab0a977a3391cead07a27f
    entity_id: light.lk_zbt_cctlight_d0106_559bb1fe_level_light_color_on_off
    domain: light
    brightness_pct: 20
  mode: single

Then you can just duplicate this but change the time frame (8-3) and set the brightness to 100%

You can take this a step further by a helper. For example I use a Time of the Day helper called “evening” which is set at 19:00 - 24:00. I then check the condition of the helper in my automations - evening will be on between 19:00-24:00. this means if I want to adjust the timeframe instead of having to edit all my automations I edit the helper and all automations will be impacted.

Sure some else will be along with a much more elegant solution soon but in the interim I hope this helps

1 Like