Cover position slider

BTW, why not introduce such a slider to the regular cover widget? Its’s a very common feature and I was a little bit frustrated it isn’t already there. I guess its just up to a little frontend cover component modification to include such a slider when cover position data is available? I’ll take a look little bit later.

Have you find the solution?

No… :confused:

@blackgear

A solution is to check the state of the slider and cover position before setting.

If they are equal, don’t set. Add that in every automation and it will remove the feedback loop.

  - alias: "Setta posizione tenda soggiorno"
    trigger:
      platform: state
      entity_id: input_number.posizione_tenda_soggiorno
    condition:
      - condition: template
        value_template: "{{ states('input_number.posizione_tenda_soggiorno') | int != state_attr('cover.fibaro_system_fgrm222_roller_shutter_controller_2_level', 'position') | int }}"
    action:
      service: cover.set_cover_position
      data_template:
        entity_id: cover.fibaro_system_fgrm222_roller_shutter_controller_2_level
        position: "{{ states('input_number.posizione_tenda_soggiorno') | int }}"

EDIT: To clarify, on pass 1 when you first move the slider or change the position, they aren’t equal and it will set the position / move the slider. On the feedback loop where the slider now moves because the position moved, they will be equal and the position will not be set.

2 Likes

Petro,
Is this a theoretical solution or do you have this working? I’d like to get a slider for my curtains…

It works as a volume slider. I would assume it would be the same way for a cover as long as the cover reports a position.

I’ve got it running on 11 Shutters.

The only minor niggle is that the slider does not update until the timer stops.

Otherwise it works very nicely.

Well done @petro.

1 Like

Is there a possibility to update the slider when the curtain state changes?

My covers are controlled by Sonoff Duals and running ESPHome now (no MQTT) and the sliders update while moving.

I’ve used:

and

All work well. It depends on what you like.

2 Likes

How did you get your slider to update as the cover moves? For me it only updates when the movement has stopped.

I also cant update the location using the slider. It seemingly isnt sending the data to the motor to action. I think i need to use the position_action and load in where it is, where it needs to go and then depending on what the value is turn on the motor clockwise or anti clockwise until the rotary encoder reads the right value.

Did you use stepper motors in your instance? I am using a DC motor with rotary encoder so is a bit different to a lot of implementations others are using.

I used


And

The shutter motors are tubular type with built in end stops.
I’ll send the config later when power is restored to my street.

Hey everyone,

I read the whole thread but i admit i got lost at some point.
Is there a way to present a card with sliders (vertical or horizontal) that would update live as the covers move?

I am about to install 11 of them and looking to have the ui ready :slight_smile:

Thank you.

Edit: I tried slider-entity-row and it does exactly this.

Add a pause before updating the slider position. It takes the pause time before the slider will be updated corresponding to the actual position, but in the meantime the cover will reach its final position.