Esphome time based cover return position

I use esphome with time based cover.
Is it possible for making a return of the position?

Hello

you might find more help here… ESPHome - Smart Home Made Simple — ESPHome or in the EspHome Discord

First things first. Post your configuration so we can see what you’re doing and it would also be helpful to know if and what kind of door position sensors you’re using like a reed switch, 2x reed switches, rotary encoder, voltage/current meter etc as an example.

cover:
  - platform: time_based
    name: "Menger badkamer"
    id: rolluik3
    open_action:
      - switch.turn_on: I2Cout2_4
    open_duration: 140sec
    close_action:
      - switch.turn_on: I2Cout2_5
    close_duration: 140sec
    stop_action:
      - switch.turn_off: I2Cout2_4
      - switch.turn_off: I2Cout2_5
    manual_control: True

I want to copy the poition into a number.
But where can i find the poisiton?

    - number.set:
        id: my_number
        value: !lambda |-
          return id(rolluik3).position * 100 //position is value 0.0-1.0

You really gotta use the Esphome documentation. It answers almost all of your questions and so much more.

hey, this doesn’t works for me

cover:
  - platform: time_based
    id: drieweg
    name: $friendly_name 3-weg
    device_class: damper
    open_action: 
      then:
        - switch.turn_on: klepopen
    open_duration: 
      seconds: 140
    close_action: 
      then:
        - switch.turn_on: klepdicht
    close_duration: 
      seconds: 140
    stop_action: 
      then:
        - switch.turn_off: klepdicht
        - switch.turn_off: klepopen
button:
  - platform: restart
    name: "Restart"
  - platform: template
    name: standklepcontrolerenbutton
    on_press: 
      then:
        - script.execute: standklepcontroleren
      
script:

 - id: standklepcontroleren
   then: 
     - number.set:
         id: standklep
         value: !lambda |-
           return id(drieweg).tilt * 100;
number:
   - platform: template
     name: "% klep"
     id: standklep
     min_value: 0
     max_value: 10000
     step: 0.01
     optimistic: True
     restore_value: True
     unit_of_measurement: '%'

I’ll get all the time ‘0’ when I press the button

does time_based cover have .tilt?