Variables in a script to control lights

I currently have an implementation of light control in appdaemon, but are trying to move my automations to the native ones if possible.

I have an app left, which I can’t seem to find a solution for.

The current implementation is that I have a sensor in HA that defines which part of day it is (morning, evening, night etc.) and then I have an app/script in appdaemon that does the following:

  1. Based on part of day the brightness of a bulb should be X
  2. Then I in the app feed which bulp it is and what settings applies to that particular bulb (kitchen bulb, brightess day = 100, brightness night = 5)

Can I somehow make script that takes the arguments of part of day, which bulb and individual brightness depending on the bulb? If possible I would like a script where bulb and brightness are kind of variables.