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

Template works in editor, not in config

$
0
0

@liksvette wrote:

I am stumped.
Can anyone please tell me whats wrong with the value template below?

- platform: template
  sensors:
    garage_humidity_difference:
      value_template: '{{ state_attr('weather.met_no', 'humidity') - ( states('sensor.garage_sensor_humidity')|int ) }}'
      friendly_name: 'Luftfuktighet ute vs garasje'
      #entity_id: sensor.garage_humidity_difference
      unit_of_measurement: '%'

It resolves in the template editor, but when I add it to my config I get the following error:

Error loading /config/configuration.yaml: while parsing a block mapping
in “/config/sensors/garage_humidity_difference.yaml”, line 4, column 7
expected , but found ‘< scalar >’
in “/config/sensors/garage_humidity_difference.yaml”, line 4, column 39

I can’t for the life of me see what’s wrong.

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 96121

Trending Articles



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