architecture icon indicating copy to clipboard operation
architecture copied to clipboard

Weather icons

Open outon opened this issue 6 years ago • 5 comments

Context

The weather component has only 12 different conditions that do not cover all possibilities or that some possibilities cannot be mapped from weather API to existing HA ones without losing information.

You may have sun and few cloud and be raining... How do you consider this? Rainy, Partly-Cloudy? There is a new icon for partlycloudy-rain.

Proposal

As new icons appears on MDI, I propose to include them on HA main Weather components

Consequences

Existing weather components like yr.no, dark sky, IPMA can make use of those new conditions, making easy to map their existing conditions to HA condition.

I did a little research on some Weather Components used by HA.

Component API Description More info Weather Conditions
https://www.home-assistant.io/components/metoffice/ https://www.metoffice.gov.uk/binaries/content/assets/metofficegovuk/pdf/data/datapoint_api_reference.pdf Page 10: Significant weather as a code 31 weather conditions
https://www.home-assistant.io/components/weather.darksky/ https://darksky.net/dev/docs#data-point-object 10 weather conditions
https://www.home-assistant.io/components/environment_canada/ https://dd.weather.gc.ca/citypage_weather/docs/Current_Conditions_Icons-Icones_conditions_actuelles.pdf 48 weather conditions
https://www.home-assistant.io/components/ipma/ http://api.ipma.pt/open-data/weather-type-classe.json 28 weather conditions
https://www.home-assistant.io/components/met/ https://api.met.no/weatherapi/weathericon/1.1/documentation 40 different values
https://www.home-assistant.io/components/yr/ https://github.com/YR/weather-symbols Could not find Official info 41 different values

As many of them have more than 20, even 40 different weather conditions, there exists a mapping between their weather conditions and those that HA allows to be shown losing information on that transformation.

If new weather conditions are include is more likely to lose less information.

outon avatar Sep 22 '19 21:09 outon

The supported conditions are grouped and limited because we wanted a "common divisor" of the existing platforms at that time. We ended-up with a dozen conditions because this make it possible to switch between different platforms without losing the history and provide an easy-to-read frontend card.

that some possibilities cannot be mapped from weather API to existing HA ones without losing information.

Well, that's the downside of an integration like the weather component that is aggregating information.

As new icons appears on MDI, I propose to include them on HA main Weather components

That new icons will show-up was inevitable but is no reason to add them. There is not much value to have something like "ultra light rain", "super light rain", "light rain", "not so light rain", etc. for the weather platforms. If there is rain then you probably will take an umbrella.

For the full details there are the meteo sensor platforms. They have additional information and usually the condition which is provided by services. Nowadays it's quite simple to create your own card that is showing everything you want.

fabaff avatar Sep 23 '19 06:09 fabaff

I agree with @fabaff that we shouldn't let the availability of icons drive this. The are too many subtle variations that are hard to distinguish on small form factors. Furthermore, there is only support for daytime variations, ie they all have suns, for most.

I'd propose the following be added as the first is very different than existing conditions and important for forecasts. The second is to show a moon at night during partly cloudy conditions instead of a sun.

  1. tropical-storm with mdi weather-hurricane for tropical storm conditions
  2. partlycloudy-night with mdi weather-night-partly-cloudy to complement weather-partly-cloudy

MatthewFlamm avatar Sep 23 '19 23:09 MatthewFlamm

Suggest to use weather icons and fanart from Kodi which are licensed under the Creative Commons Attribution-Share Alike 3.0 United States License.

I believe that the correct location to source these from are https://github.com/XBMC-Addons as Kodi resource images addons but it might be that newer versions are available from elseware.

https://github.com/XBMC-Addons/resource.images.weathericons.transparent https://github.com/XBMC-Addons/resource.images.weathericons.flat https://github.com/XBMC-Addons/resource.images.weathericons.outline https://github.com/XBMC-Addons/resource.images.weathericons.white https://github.com/XBMC-Addons/resource.images.weathericons.grey https://github.com/XBMC-Addons/resource.images.weathericons.coloured https://github.com/XBMC-Addons/resource.images.weathericons.animated https://github.com/XBMC-Addons/resource.images.weathericons.3d-white https://github.com/XBMC-Addons/resource.images.weathericons.3d-coloured https://github.com/XBMC-Addons/resource.images.weatherfanart.single https://github.com/XBMC-Addons/resource.images.weatherfanart.prairie https://github.com/XBMC-Addons/resource.images.weatherfanart.multi https://github.com/XBMC-Addons/resource.images.weatherfanart.faded

Gamester17 avatar Oct 03 '19 07:10 Gamester17

I agree that icons should not drive the classes, and that "light rain" and "very light rain" is basically the same thing. The 'Exceptional" category could be improved, I think. Currently,

    [
        (
            "exceptional",
            [
                "Tornado",
                "Hurricane conditions",
                "Tropical storm conditions",
                "Dust",
                "Smoke",
                "Haze",
                "Hot",
                "Cold",
            ],

"Haze" and "Tornado" are both exceptional, and I think we can agree those are quite different. Perhaps a "severe" category would be more useful, both for UI and automation.

B-Kramer avatar Oct 15 '19 18:10 B-Kramer

"Haze" and "Tornado" are both exceptional, and I think we can agree those are quite different. Perhaps a "severe" category would be more useful, both for UI and automation.

There is more guidance needed in the mappings in any case. For example, freezing rain is sometimes mapped to snowy.

And living in the Netherlands, I definitely distinguish very light rain, light rain, and rain 🙄

ties avatar Oct 16 '19 07:10 ties

This architecture issue is old, stale, and possibly obsolete. Things changed a lot over the years. Additionally, we have been moving to discussions for these architectural discussions.

For that reason, I'm going to close this issue.

../Frenck

frenck avatar May 11 '23 13:05 frenck