Scaling wind speed

Is it possible to scale the wind speed from YR.no? It is shown as m/s but I would like it in knots.
m/s must be multplied with 1.944.

This should be easy using a template sensor.
You can define a value_template like {{ states.sensor.yr_windspeed.state | float * 1.944 }}.
I don’t know how to format this using only (e.g.) two decimal points, though.
Maybe someone else can answer that.

Sebastian

Found it: {{ (states.sensor.yr_windspeed.state | float * 1.944) | round(2) }}

See https://home-assistant.io/docs/configuration/templating/ for details.

Sebastian

2 Likes

It worked :slight_smile: thanks :+1: