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

Openweathermap weather_code problem

$
0
0

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') }}"

Capture

Thank you for help!
Ciprian

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106624

Trending Articles



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