Setting a min step for a cover - is it possible?

Hi there,

is it possible to set a minimal step increment for a cover?
My goal is to have only the steps 10%, 20%, 30% … 90%, 100% as valid values.
As I’m controlling the covers via a homeassistant dashboard and furthermore via the Apple Home App, I haven’t been able to find a solution.
I’ve found, that theoretically in Homekit there is a option for “minStep” with covers. But I am unable to set this value via homeassistant.
Can anybody help me?

you can do this in HA with some logic and the following service:

service: cover.set_cover_position
data:
  position: 10 # this sets 10% open.  Replace this with a template or input_number that increments in 10%s
target:
  entity_id: cover.your_cover_here

If I understand you correctly, then I would have to create a ‘dummy’ cover in Homeassistant for every cover I have, because homekit directly calls to the service with intermediate values.
Did I understand you correctly?

No dummies are needed at all - I’ve clearly not explained myself very well or I didn’t understand your real question.

Do you:

  • want to set all covers to the same position (incrementing in 10%)
  • set a single cover (incrementing in 10%)

Either way, this can be done without you needing to create double anything (my example above wasn’t a dummy) it was just the command to open the shade called your_cover_here to 10%.

Okay I misinterpreted your point :slight_smile:

My goal is to control the covers via the Apple Home App. In the attached picture you can see that I am able to set every value between 0-100%.
Sadly my covers only work in increments of 10%. Which isn’t a problem, when I control them via the service in automations but if I’m controlling them from the app, it is very hard to be so precise. And if I’m only one percent off, the covers don’t follow.
HomeBridge/Homekit itself has the ability to set a ‘minStep’ floor covers.
But this value doesn’t seem to be controlled or set but homeassistant.
Maybe this isn’t possible (yet)?

OK, I get your reference to a dummy cover now. Yes, that is what you need to do …sort of.

Do as I wrote and also create an up and down button and share with Apple HomeKit.

Have an automation in HA that when those buttons are pressed (in HomeKit) it triggers the following (from above):

service: cover.set_cover_position
data:
  position: 10 # this sets 10% open.  Replace this with a template or input_number that increments in 10%s
target:
  entity_id: cover.your_cover_here

using the input_number that increments/decrements in steps of 10

So, for example, say your real cover is called my_cover. You might* do something. like:

input_button:
  my_dummy_up:
    name: Open My Cover by 10%
    #icon: mdi:...
  my_dummy_down:
    name: Close My Cover by 10%
    #icon: mdi:...

input_number:
  my_cover_opening:
    name: "My cover opening"
    min: 0
    max: 100
    step: 10
    #initial: # this would set the cover to be closed
    #icon: mdi:...

automation:
  - alias "My Cover open/close control"
    mode: single
    trigger:
      - platform: state
        entity_id: input_button.my_dummy_up
        id: up
      - platform: state
        entity_id: input_button.my_dummy_down
        id: down
    action:
      - choose:
          - conditions:
              - "{{ trigger.id == 'up' }}"
            sequence:
              - service: input_number.increment
                target:
                  entity_id: input_number.my_cover_opening
              - service: cover.set_cover_position
                data:
                  position: "{{ states('input_number.my_cover_opening}}"
                target:
                  entity_id: my_cover
          - conditions:
              - "{{ trigger.id == 'down' }}"
            sequence:
              ...

notes:

  • This example may be full of typos and errors as I am just trying to give you an idea and haven’t checked it
  • this will increment/decrement until it gets to the top/bottom. You could have other buttons for full-open and full-close
  • you only* need to expose both input_button.xxx to HomeKit

[edit: typos*]