Aqara b1 automation

Does anyone have a template to automate aqara curtain motors, to close when the sun goes down, and goes up in the morning?

I cannot really find anything

You can start with this:

- alias: 'Open cover at sunrise'
  trigger:
    platform: sun
    event: sunrise
  action:
    service: cover.open_cover
    entity_id: cover.your_cover

- alias: 'Close cover at sunset'
  trigger:
    platform: sun
    event: sunset
  action:
    service: cover.close_cover
    entity_id: cover.your_cover