I’m trying to create a template to calculate wind chill. The required formula is as follows:
35.74 + (0.6215 * T) - (35.75 * W0.16) + (0.4275 * T * W0.16)
Where T = temperature and W = wind speed in mph, based on this instructional sheet.
Over the last few days I’ve tried numerous combinations of statements to convert the wind speed but without success.
I found this, but it doesn’t really seem to directly apply.
This is the template I’m trying to use:
value_template: >
{% set T = states('sensor.openweathermap_temperature') | float %}
{% set W = states('sensor.openweathermap_wind_speed') | float * (10**0.16) %}
{{ (35.74 + (0.6215 * T) - (35.75 * W) + (0.4275 * T * W)) | round(2) }}
I know I’m missing something simple, I just need a different set of eyes to point it out.
I appreciate any help you can offer!