Template helper sensor for cover position

Dear all,

I hope you can help me as I am trying for hours now to set this up, but I am still failing:

My home assistant configuration contains a cover device, which can be controlled via the UI dashboard. It can be opened, closed or set to a provided position (in percent).

As I want to further process the value I would like to create a template helper sensor to just provide the value of the position of the cover.

Can you please support me by giving me hints on how the configuration of a template helper sensor would look like in YAML?

Thank you!

Best regards
Thomas

Something like this?

{{ state_attr('cover.bed_curtains', 'current_position') | int(0) }}%

Thank you so much, @LiQuid_cOOled ! This is the solution. You made my day!

Best regards
Thomas

1 Like