If else in automation based on input

Ik know there are already a bunch of automation topics with if / else questions, but I can’t figure out how I get what I want

I’ve got an input slider fot enabeling the lights based on the sun elevation
input_number.sunset_for_automation

I also got OWM for the cloudieness outside
sensor.openweathermap_condition (cloudy / partlycloudy)

What I want is that lights turn on based on these three conditions

  • When it’s clear outside, I wan’t the automation to run when te input number is met.
  • When it’s partly cloudy, I wan’t it to run 1 hour earlier
  • When it’s cloudy outside, I wan’t it to run 2 hours earlier

How do I get this?

use the “choose:” functionality for you actions based on the conditions you want.