Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106465

Noob needs help with sensor.yaml code

$
0
0

Hello everyone. I am setting up HA and have some motorized curtains. I want to get the position of them but there isn’t an entity with it specifically. I learned that I can set up a sensor and use this to get the value.

This current_position will tell me where the curtain is at (0=closed 100=opened). I was able to generate this code with help

- platform: template
  sensors:
    name: "Curtain Inside 2 Position"
    state_class: measurement
    state: "{{ state_attr('cover.curtaininside2', 'current_position')|float}}"
    unit_of_measurement: "%"

But I am getting this when I check the configuration

Looking for a kind soul to help point the way to make this work. Thank you in advance.

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 106465

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>