Set Light to Max brightness First turn_on of the day

I’m looking for a good way to automatically set brightness to MAX the first time a light comes on in a day (maybe after certain threshold, like first time after 6am). The problem I’m running into is the brightness is set lower at night and in the morning when it gets switched on it is reverting to the last setting… Wife Acceptance Factor is low with that solution… would like to automate it.

Has anyone created anything similar? Any recommendations on how to approach with AD?

Does it need to be in Appdaemon?

Should be relatively easy to achieve in HA.

Create an input boolean called first_light. An automation that triggers at 6am to switch the boolean on, and an automation that triggers when the light comes on, conditional that first_light is on, switch the light on full and switch off first_light.

Was hoping to eliminate the need to create an input Boolean for each light I want too have this automated for

in AD i see that as quite simple.

in the initialize you create a boolean like

self.fullbrightness = False

with an listen_state listen to if a light is switched on:

self.listen_state(self.callback,"light.your_light", state="on")

and with a rundaily set fullbrightness to True at the desired time


in the light callback set the brightnes from the light to full and the fullbrightness boolean to False

def callback(self,entity,attributes,old,new,kwargs):
  if self.fullbrightness:
    self.fullbrightness = False
    self.turn_on("light.yourlight",brightness=100) # or any way how you set brightness to max

other callback would look like:

def othercallback(self,kwargs):
  self.fullbrightness = True

i this app you could set a listen_state for all desired lights (or lights in general)
and in turn_on you would need to replace “light.yourlight” with entity

listen_state(self.callback,"lights", state="on")



oeps that wont work. with 1 boolean.
you could create a dictionary for all lights and set that to true and false, or call the app from the config for every light.