Dynamic offset for sunset on trigger

I am using currently the following trigger to turn on the lights:

trigger:
  platform: sun
  event: sunset
  offset: '-01:00:00'

Is it possible to have it more dynamic that for example if it is clear it is -01:00:00 but anything else would make it -1:30:00 ?

1 Like

you mean if the weather is clear?

Sorry yes, if the sensor.weather state is clear (have 1 hour before) and with anything else (rainy, cloudy, etc) to 1:30 before.

maybe you can make 2 automations and make a light sensor turn them on or off.