(Solved)Cover: Automation help needed

Hi, i have a cover setup for a door, it works perfectly on the overview page, i want to setup an automation that opens the door at sunrise and closes at sunset, i think either my service or entity id is not correct, any help will be appreciated. (code adapted from Dr ZZZ)

Config.yaml

cover:
  - platform: mqtt
    name: "Sonoff Coop"
    state_topic: "cmnd/coopstate/POWER2"
    command_topic: "cmnd/sonoffcoop/power1"
    payload_open: "ON"
    payload_close: "OFF"
    payload_stop: "ON"
    state_open: "ON"
    state_closed: "OFF"
    optimistic: false

Automation.yaml

- alias: 'coop_on'
  trigger:
    platform: sun
    event: sunrise
    offset: '+00:00:00'
  action:
    service: switch.turn_on
    entity_id: cover.sonoffcoop

- alias: 'coop_off'
  trigger:
    platform: sun
    event: sunset
    offset: '+00:00:00'
  action:
    service: switch.turn_off
    entity_id: cover.sonoffcoop

To open and close a cover the service calls are:
cover.open_cover
cover.close_cover

Documentation: Cover Service Calls.

  1. Replace switch.turn_on with cover.open_cover
  2. Replace switch.turn_off with cover.close_cover

Thank you, sorted.