Automation Required

I need an automation that will turn the light on and of by motion for a specific time but only between Sunset and Sunrise. Does anyone have some advice to do this?

Use a trigger that will trigger by the motion (probably a state change in a binary sensor) and use a two sunset/rise conditions (one for sunset, the other for sunrise)

I can easily do a Motion Automation through a Motion Blueprint but I need to have the Sunrise and Sunset condition.

Is there a Blueprint for this?

I think I found the Blueprint. I will give it a try.

In the UI, add a condition, select “Or”.
Inside of the “Or”:
Add a condition, select “Sun”, click “After Sunset”
Add another condition, select “Sun”, click “Before Sunrise”

There’s also an example in the documentation page I’ve linked above;

  condition: or
  conditions:
    - condition: sun
      after: sunset
    - condition: sun
      before: sunrise

UI:

The problem with that it turns it on but I also need it to turn off in 30 minutes. I think I found the Blueprint above.