Hello,
I have integrated Openweathermap and I want to have a sensor that shows me the current weather condition.
I created four sensors but only weather_code doesn’t work properly and I don’t understand why.
weather:
- platform: openweathermap
api_key: !secret openweather_api
owm_temperature:
friendly_name: 'Temperature'
unit_of_measurement: '°C'
value_template: "{{ state_attr('weather.openweathermap', 'temperature') }}"
device_class: temperature
owm_humidity:
friendly_name: 'Humidity'
unit_of_measurement: '%'
value_template: "{{ state_attr('weather.openweathermap', 'humidity') }}"
owm_weather_code:
friendly_name: 'Weather Code'
value_template: "{{ state_attr('weather.openweathermap', 'weather_code') }}"
owm_weather_wind_speed:
friendly_name: 'Wind Speed'
unit_of_measurement: 'km/h'
value_template: "{{ state_attr('weather.openweathermap', 'wind_speed') }}"
Thank you for help!
Ciprian
1 post - 1 participant