Increasing brightness/volume for alarm clock automation?

Does anyone have an example of increasing brightness over time, perhaps with a loop?

I’ve created a basic alarm clock automation and although everything works having the light come on full brightness and volume at full it’s not quite the peaceful wake up call i’d hoped for!

paste it for your automation
for brightness example

brightness Number between 0…255 indicating brightness. 120
brightness_pct Number between 0…100 indicating percentage of full brightness. 47
  action:
    service: light.turn_on
    entity_id: your.light.entity.id
    data:
      brightness_pct: 100

for volume example:

  action:
    - service: media_player.volume_set
      data_template:
        entity_id: media_player.entity.id
        volume_level: 0.3
    - service: tts.google_say
      entity_id: media_player.entity.id
      data_template:
        message: "your message."

Sorry, I should have mentioned, this is in Node Red.

I had it working with native automation but i’m trying to replicate in node red.

Ohh, sorry, not familiar with Node Red

This article should help you with the loop.

https://diyfuturism.com/index.php/2018/01/18/going-further-with-home-automations-in-node-red/