sensor:
  - platform: rest
    name: "Persiana Habitación Noha Posición"
    scan_interval: 5
    resource: http://10.10.1.178/roller/0
    value_template: '{{ value_json.current_pos }}'
    unit_of_measurement: "%"
    headers:
      content-type: application/x-www-form-urlencoded

cover:
  - platform: template
    covers:
      persiana_habitacion_noha:
        position_template: "{{ states('sensor.persiana_habitacion_noha_posicion') | float }}"
        open_cover:
          service: rest_command.shelly_cover_action
          data:
            ip: 10.10.1.178
            action: open
        close_cover:
          service: rest_command.shelly_cover_action
          data:
            ip: 10.10.1.178
            action: close
        stop_cover:
          service: rest_command.shelly_cover_action
          data:
            ip: 10.10.1.178
            action: stop
        set_cover_position:
            service: rest_command.shelly_cover_set_position
            data_template:
              position: "{{position}}"
            data:
              ip: 10.10.1.178
              position: position
