Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openweathermap UV index "Unknown" #115045

Open
rcblackwell opened this issue Apr 6, 2024 · 8 comments
Open

Openweathermap UV index "Unknown" #115045

rcblackwell opened this issue Apr 6, 2024 · 8 comments

Comments

@rcblackwell
Copy link

rcblackwell commented Apr 6, 2024

The problem

I installed the openweathermap integration a couple of days ago. Installation was completed using a paid One Call API 3.0 key. With exception of UV readings, the integration is obtaining current weather data. I've been watching the UV sensor (sensor.openweathermap_uv_index) for the last 24 hours. It's always reporting "Unknown".

If i make a call using [(https://api.openweathermap.org/data/3.0/onecall?lat={MY_LAY}&lon={MY_LON}&appid={MY_API_KEY})]. The following data is returned;

{REDACTED HEADER}
{"dt":1712428841,"sunrise":1712400953,"sunset":1712447770,"temp":283.72,"feels_like":282.22,"pressure":1018,"humidity":53,"dew_point":274.55,"uvi":4.17,"clouds":7,"visibility":10000,"wind_speed":6.49,"wind_deg":359,"wind_gust":8.17,"weather":[{"id":800,"main":"Clear","description":"clear sky","icon":"01d"}]},"minutely":[{"dt":1712428860,"precipitation":0},

{BALANCE OMITTED FOR CLARITY}

I see a UVI value of 4.17 in the data. Why is the integration not displaying it?

What version of Home Assistant Core has the issue?

core-2024.4.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

OpenWeatherMap

Link to integration documentation on our website

https://www.home-assistant.io/integrations/openweathermap/

Diagnostics information

2024-04-06 14:28:52.631 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-04-06 14:28:52.633 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration smart_irrigation which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-04-06 14:28:52.635 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration ontario_energy_board which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-04-06 14:28:52.636 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration localtuya which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-04-06 14:28:52.638 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration chime_tts which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-04-06 14:28:52.639 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration battery_notes which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-04-06 14:28:52.641 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration nodered which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-04-06 14:29:00.570 DEBUG (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Finished fetching openweathermap data in 0.893 seconds (success: True)
2024-04-06 14:39:05.993 DEBUG (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Finished fetching openweathermap data in 0.524 seconds (success: True)

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-04-06 14:29:00.570 DEBUG (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Finished fetching openweathermap data in 0.893 seconds (success: True)
2024-04-06 14:39:05.993 DEBUG (MainThread) [homeassistant.components.openweathermap.weather_update_coordinator] Finished fetching openweathermap data in 0.524 seconds (success: True)

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Apr 6, 2024

Hey there @fabaff, @freekode, @nzapponi, mind taking a look at this issue as it has been labeled with an integration (openweathermap) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of openweathermap can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign openweathermap Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


openweathermap documentation
openweathermap source
(message by IssueLinks)

@babygiraffe05
Copy link

In addition, all of the state_attr data for forecast is missing. If you attempt state_attr('weather.openweathermap','forecast')[1],['temperature'] for example, it is now returning an error. The hourly forecast state_attr data is completely missing from the state view in developer tools window.

This breaks all automations that relied on forecast data.

@fabaff
Copy link
Member

fabaff commented May 6, 2024

Probably related to #113000

@Phoenix-DH
Copy link

Same here.

@babygiraffe05
Copy link

Same here.

I discovered this was unrelated. You need to change the way Openweathermap pulls data. The new method is to use a service to call the forecast as required. You can use that data to create sensors that are functional within automations, helpers, etc. For me, this is a far worse solution and required a ton of reprogramming, but I was able to recover everything after many hours of labor. The information can be found here: https://www.home-assistant.io/integrations/weather/

There are two examples of the service at the bottom of that page that pull the data into a sensor via an automation, but I suggest searching for other examples of the weather.get_forecasts (note the plural forecasts) service. Note that weather.get_forecast (singular forecast) has been deprecated.

@Phoenix-DH
Copy link

@babygiraffe05
Is UV really also related to this new service?
I am already using it to create a new sensor for weather forecast.

{{ hourly['weather.openweathermap'].forecast }}"

I thought all now providef sensors should still work.

@babygiraffe05
Copy link

@babygiraffe05 Is UV really also related to this new service? I am already using it to create a new sensor for weather forecast.

{{ hourly['weather.openweathermap'].forecast }}"

I thought all now providef sensors should still work.

@Phoenix-DH I thought your comment was referencing my reply to the op, not the op post. The UV Index is not included in any forecast data, including the current hour or current day forecast, nor any of the future periods that are available by calling the weather.get_forecasts service I referenced in my comment above. UV Index is included in the current weather conditions. See the documentation here: https://www.home-assistant.io/integrations/openweathermap/

So to answer your question directly, no UV Index is not related to the new get_forecasts service.

@Phoenix-DH
Copy link

Yes, so just an issue with uv and openweathermap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants