Shutter (cover) not completely correct

I was trying to add a mygekko cover to ha. the comands ( up, down and stop) the slider are working fine ( left is fully open). But if the posistion is 0 ( slider left) I can’t send the command down - the same with 100 - > I can’t say up. The icon a already changed that its work correctly.

Has somebody an idea what I’m doing wrong

shell_command:
  shutter_up:        "curl 'http://192.168.178.33/api/v1/var/blinds/item{{ device_id }}/scmd/set?value=1'"
  shutter_down:      "curl 'http://192.168.178.33/api/v1/var/blinds/item{{ device_id }}/scmd/set?value=-1'"
  shutter_stop:      "curl 'http://192.168.178.33/api/v1/var/blinds/item{{ device_id }}/scmd/set?value=0'"
  shutter_position:  "curl 'http://192.168.178.33/api/v1/var/blinds/item{{ device_id }}/scmd/set?value=P{{ position }}"


cover:
  - platform: template
    covers:
      shutter_living_window:
        friendly_name: "Shutter - Living Room (window)"
        device_class: shutter
        position_template: "{{ states('sensor.window') }}"
        open_cover:
          service: shell_command.shutter_up
          data: 
            device_id: 6
        close_cover:
          service: shell_command.shutter_down
          data: 
            device_id: 6
        stop_cover:
          service: shell_command.shutter_stop
          data: 
            device_id: 6
        set_cover_position:
          service: shell_command.shutter_position
          data_template: 
            device_id: 6
            position: "{{ position }}"
        icon_template: >-
          {% if states('sensor.window')|float > 0 %}
            mdi:garage
          {% else %}
            mdi:garage-open
          {% endif %}

I think HA does not know what position the shutter is at; hence the arrows are greyed out. I use the value_template instead of the position_template. This is my cover.

  - platform: template
    covers:
      computer_room_curtains:
        device_class: curtain
        friendly_name: "Computer Room Curtains"
        value_template: >-
          {% if states('sensor.cr_curtain_left_position')|float < 90 %}
            open
          {% else %}
            closed
          {% endif %}
        open_cover:
          service: switch.turn_on
          data:
            entity_id: switch.computer_room_curtains
        close_cover:
          service: switch.turn_off
          data:
            entity_id: switch.computer_room_curtains
        stop_cover:
          service: shell_command.computer_room_curtains_stop
        set_cover_position:
          service: shell_command.computer_room_curtains_position
          data_template:
            position: "{{ position }}"
        icon_template: >-
          {% if is_state('cover.computer_room_curtains', 'open') %}
            mdi:blinds-open
          {% else %}
             mdi:blinds
          {% endif %}
1 Like

I have to use the position template. the value template is for booleans. the problem is that 0 is closed ( position template and my setting a get value of 100 for closed an 0 for open.

I think the slider is working the right way 0 is the cover open and 100 is it down.

Is there a way to say if its 0 that its open and 100 closed.

pass “100-positionvalue” ?

Hello Fummy, were you able to solve the problem now and what does it look like? I would also be interested because I also use myGEKKO roller shutters.

Greetings Jokann