HomeAssistant
HomeAssistant copied to clipboard
'UV Index & Humidity' with Hourly Forecast from OpenWeatherMap through the One Call API 3.0
Your 'AWTRIX Weather ⛈️ + Forecast +' blueprint is a lot of fun and works nicely! I appreciate the you included data for Europe / Celsius to show the graph in the correct colors. Thanks!
I also tried the 'UV Index & Humidity' blueprint. I don't have a WeatherFlow station, so I created a REST sensor to request the Hourly Forecast (UV index) data every 30 minutes from OpenWeatherMap through the One Call API 3.0. This is free for up to 1000 API calls per day. You can configure a limit of 1000 calls per day so there will be no charges.
The blueprint seems to expect a weather entity instead of a sensor for the hourly forecast. I tried to solve it by creating a weather template from the sensor. Unfortunately the weather template does not support a uv index attribute.
Therefor I changed the forecast selector entity domain from weather to sensor. Unfortunately the automation will still not run. Would you be willing to give this setup a try? Or do you have some suggestions how I could get this to work?
forecast: selector: entity: domain: - sensor
rest: - scan_interval: 1800 resource: "https://api.openweathermap.org/data/3.0/onecall?lat=xxx&lon=yyy&exclude=current,minutely,daily,alerts&appid=zzz&units=metric" timeout: 15 sensor: - name: "OpenWeatherMap Hourly Forecast" value_template: "OK" json_attributes_path: "$.hourly[1]" json_attributes: - "dt" - "temp" - "feels_like" - "pressure" - "humidity" - "dew_point" - "uvi" - "clouds" - "visibility" - "wind_speed" - "wind_deg" - "wind_gust" - "weather" - "pop"