Error in sensor template - but what is it

  - sensor:
      - name: "Internet Wind"
        unique_id: met_no_internet_wind
        unit_of_measurement: "°"
        state: {{ (state_attr('weather.hourly', 'wind_bearing') | float ) | round(1)}}

Error loading /Users/server/.homeassistant/configuration.yaml: while scanning for the next token found character '%' that cannot start any token in "/Users/server/.homeassistant/template.yaml", line 66, column 17

So the error is at state: but I just can’t find it.

In developer tools it returns 52.3:
{{ (state_attr('weather.hourly', 'wind_bearing') | float ) | round(1)}}

Put double-quotes around your template

1 Like

Ok, I have another one using this and it worked…

state: >
          {{ (3.6 * state_attr('weather._hourly', 'wind_speed')  | float ) | round(1) }}

Is the > replacing the quotes? :man_shrugging:

The > denotes a multi-line template. Multi-line templates are not quoted.