How to set cover position in Blinds

Hey guys!

I have this template cover for my blinds but one of the buttons is always inactive, depending on what button I used last. This means I can’t use it to operate the blind half way down and then down again:

imagem

I think I need to use set_cover_position, right? but how do I do that?

This is what I have now:

cover:
  - platform: template
    covers:
      lroom_blind_cover:
        friendly_name: "Living Room Blind"
        open_cover:
          service: switch.turn_on
          data:
            entity_id: switch.lroom_blind_up
        close_cover:
          service: switch.turn_on
          data:
            entity_id: switch.lroom_blind_down
        stop_cover:
          service: switch.turn_on
          data:
            entity_id: switch.lroom_blind_stop
        device_class: blind
        icon_template:  mdi:window-closed-variant

If I had set_cover_postion: 50 I get this error:

Configuration invalid

Invalid config for [cover.template]: [set_cover_postion] is an invalid option for [cover.template]. Check: cover.template->covers->lroom_blind_cover->set_cover_postion. (See ?, line ?).

Any help would be greatly appreciated.

Thanks!

How do you set the position to e.g. 50% when you are setting it without the template cover? Do you have a sensor or something that shows the current position of the blinds?

oh, ok. So I also need a sensor.
I don’t really need to know the actual position of the blinds cause the hardware of the switch prevents it from going up once fully up or down when fully down. So I only really need to pretend the blind is at 50%.

Having said that, I don’t think this switch has a sensor like that. This is what I have on that switch:

do I create a random sensor and add it to my yaml? and then set_cover_position as well?

Thanks so much for the help so far.

But you do need it for home assistant otherwise the sliders won’t work. A fake position will not work because the slider will always jump around.

My configuration doesn’t have a slider so I would only really need the greyed out arrow not to be greyed out.
How would I do that?

No slider? if you just click on the name or icon on the card, and get this screen, don´t you see the slider at the bottom like this?

Skjermbilde

nope. :slight_smile:
imagem

Like I mentioned, all good. I don’t really need the slider. I just don’t know how to make both arrows active as opposed to only one at a time as seen above.

That arrow will only appear when you are at the opposite state. It has nothing to do with position. That’s just the open button. Notice how your state is ‘open’? When you click the down arrow, it will close. Then your open button will be available.

To get the buttons to behave, you need to get the state of the door into home assistant using the value_template field for the template cover.

Lastly, if you really want to just fake it out (may not work), use a position template of 50. But, there’s 3 caveats to this:

  1. Your cover will never produce the correct state. Ever. It will always be ‘open’.
  2. Your slider will not work.
  3. If you interface this with Alexa or Google Home, both will complain because the states you ask it to move to will never be met. Example: Alexa - open blinds, response - It doesn’t look like blinds are responding, please blah blah blah blah. But your blinds will open.
position_template: '{{ 50 }}'

Mine do “out of the box”, i can click arrow down, then stop when i want. And later continue to click down if i want to.
For some reason it seems like your “current_Position” (0-100) is not registered in your HA.

I have Ikea blinds with latest firmware, i do not know what brand and gateway you are using.

Skjermbilde

if you look at his template, he doesn’t have a value_template or position_template so the cover has a default state of always open and doesn’t know how/when to provide the up and down arrows. This is 100% expected.

Template entities cannot function without knowing the state of what it’s controlling. Period.

Thank you so much @petro and everyone!
The position template worked like a charm and now I can close the blinds a bit and close them again.

I know this was just workaround with some big caveats and not really the proper way to do it but I think this will work for my basic usage.

If I need the slider or the actual position I might have to retrace all my steps back to the initial tasmota configuration as I might have done something wrong there.

1 Like

Hi rodri2566 - can you share your automation for the position template ?

1 Like