Window shades won't open at midnight

Hello everyone. I’m very new to HA and have set up a curtain with a motor that I can control from HA. I can manually open and close the curtain (smartwings Z-wave curtain). I built a simple automation that should open the curtain at midnight so that the morning sun will come in but but when I run it I get this and the curtain won’t open. As I am so new please help me in basic terms. Thank you.

Show your automation configuration. Copy the YAML and paste it here, correctly formatted for the forum.

Thank you for the help. Here is the automation. I use the wizard that is in home assistant to generate it

`alias: Open window covers at midnight
description: “”
trigger:

  • platform: time
    at: “00:00:00”
    condition: []
    action:
  • service: cover.open_cover
    data: {}
    mode: single`

I’m sorry that this isn’t in the proper format. I clicked the " button and pasted in, but it didn’t seem to work. The links don’t have a picture of what to do only text that is hard to follow for me.

Here is a screen shot to hopefully get across what the code is.

image

Thank you for any help

You are missing an entity_id or device_id.

I took a quick shot of an automation I made for my awning to run at midnight.

description: ""
mode: single
trigger:
  - platform: time
    at: "00:00:00"
condition: []
action:
  - service: cover.open_cover
    data: {}
    target:
      entity_id: cover.deck_awning

Thanks for that short video

alias: Open Covers at Sunset
description: ""
trigger:
  - platform: sun
    event: sunset
    offset: 0
condition: []
action:
  - service: cover.open_cover
    data: {}
mode: single

Thank you. I was using the visual editor. Can you tell me where in this I would have entered into the entity_id?

As reotto already pointed it out:

alias: Open Covers at Sunset
description: ""
trigger:
  - platform: sun
    event: sunset
    offset: 0
condition: []
action:
  - service: cover.open_cover
    target:
      entity_id: entity-id-of-your-cover
mode: single

In the visual editor mode choose the entity button (green) or the device button (blue). It should be in the list already of one of those, e.g. when I click entity for me then it only pulls up my awning as that is the only entity that I have that uses the cover.open_cover service. Hopefully that helps.

That was very helpful. Thanks to everyone for their time and help.

1 Like