How to set cover position within a scene?

Does anyone know how to set the cover position within a scene? Since the state is a required parameter, all I’m able to do is full open or closed, but I’d like to set a percentage opened or closed instead.

2 Likes

My memory is a little rusty. I know you could do this in the past, but I recall the developers made changes that removed this capability. Myself and others have converted over to using scripts instead of scenes. You can set the position using a script.

Thanks, @wmaker. Is this something you can provide an example of?

I don’t have a specific example of using a script to open the covers to a set position, but here is an example of a script that opens my back blinds and shades.
If you want, you could add other things like lights, etc. to the script.

configuration.yaml

....
script: !include scripts.yaml
....

scripts.yaml

scripts:
  open_back_blinds:
    alias: Open Back Blinds
    sequence:
      - service: cover.open_cover_tilt
        data:
          entity_id: >
            cover.nook_blinds, cover.deck_blinds,
            cover.fireplace_blinds
      - service: cover.open_cover
        data:
          entity_id: >
            cover.kitchen_sink_shade,
            cover.nook_sky_shades

In your case, where you want to set the position of your covers, instead of using the service cover.open_cover you would use the service cover.set_cover_position
If you go to the developers tool, you can actually set this up and see what the yaml looks like.
It should look something like:

service: cover.set_cover_position
target:
  entity_id: cover.my_cover
data:
  position: 33
1 Like