Automate Light bulb Brightness based on time

Hey Folks,

I have set one of my Bathroom light bulb to turn on based on Motion detection…
my requirement is the Light bulb brightness should be very minal post 12AM and should reset back to normal brightness post 7AM everyday…

How do I get this done? need help pls, I am noob in this matter, I read few article about adaptive lighting integration but I could understand it one bit… pls help

I was trying to do something similar and what I setup was 2 scenes for the bulb with the set color/brightness that I wanted and then I call that scene based on the time of day. There may be some other way to do this but it’s what I got working. What I also do was when I have the daytime brightness/color going when you turn off the light I have it first call my scene with the nighttime color/brightness then turn off so that when the light is turned on at night I don’t get an initial bright light then have it turned down. During the day I don’t mind having the light darker initially and then get turned up. This may be unique to my WiFi bulbs but is something is had to do so that at night there wouldn’t end up being a bright flash of light at first before being turned to the darker nighttime setting.

2 Likes

If I were you, I’d do the adaptive lighting and I’d be able to help you through it but if you only have one light, it’s overkill. Here’s an automation that will turn the bulb on to a different brightrness based on time:

alias: New Automation
description: ''
trigger:
  - type: motion
    platform: device
    device_id: f79e37a0f0e524d47ca63601157f00df
    entity_id: binary_sensor.bathroom_1_motion_sensor
    domain: binary_sensor
condition: []
action:
  - if:
      - type: is_motion
        condition: device
        device_id: f79e37a0f0e524d47ca63601157f00df
        entity_id: binary_sensor.bathroom_1_motion_sensor
        domain: binary_sensor
      - condition: time
        before: '07:00:00'
        after: '00:00:00'
    then:
      - service: light.turn_on
        data:
          brightness_pct: 1
        target:
          entity_id: light.bathroom_1_vanity
  - if:
      - type: is_motion
        condition: device
        device_id: f79e37a0f0e524d47ca63601157f00df
        entity_id: binary_sensor.bathroom_1_motion_sensor
        domain: binary_sensor
      - condition: time
        before: '00:00:00'
        after: '07:00:00'
    then:
      - service: light.turn_on
        data:
          brightness_pct: 100
        target:
          entity_id: light.bathroom_1_vanity
mode: single
1 Like

One advantage of using a scene is that you can adjust it and reuse it beyond a single automation.

1 Like

Thanks a ton, this helped a lot… I tweaked it a little and my requirement is now working… Cheers

1 Like

I made a blueprint that changes the brightness as a function of time of day:

2 Likes