home-assistant / architecture

Repo to discuss Home Assistant architecture
313 stars 100 forks source link

Add Barometric Pressure to HA Weather Forecast Model #467

Closed bchastain closed 3 years ago

bchastain commented 3 years ago

Context

Several weather data providers give access to hourly or daily barometric pressure forecasts as a part of their API. I know that OpenWeatherMap and WeatherUnderground do this and there are likely others as well.

Proposal

We add a ATTR_FORECAST_PRESSURE entry to the HA Weather Forecast Model so that HA will be able to work with this readily-available pressure forecast data.

Consequences

The only issue I see is that perhaps not all weather APIs provide a forecast for pressure, so this value would be missing for those integrations.

MartinHjelmare commented 3 years ago

It will be easier to get approval here if we can see a summary of all our current weather platforms how many of them provides the pressure forecast.

bchastain commented 3 years ago

OK I can work on that, but out of curiosity, what's the downside to adding this to the model even if some platforms don't provide it?

MartinHjelmare commented 3 years ago

We only add features that are supported by a larger part of current and potential integrations.

bchastain commented 3 years ago

OK I dug through them all, and here's my summary:

PlatformAny ForecastCurrent PressurePressure Forecast
AccuweatherYYN
Ambient Weather StationNYN
BuienradarYYN
DarkSkyYYY
DWDN**NN
Environment CanadaN***YN
IPMAYYN
Met OfficeYYY
Météo-FranceYNN
Met.noYYY
NWSYYN
OWMYYY
SMHIYYY
Taps AffNNN
TrafikverketNYN
WundergroundYYY
ZAMGNYN

** Only provides forecasts of warnings *** Only provides textual forecasts

So if you only look at providers that actually provide forecasts and any barometric pressure data at all, that makes 6 of those remaining 10 that provide pressure forecasts. That seems like a large part of the platforms to me.

MartinHjelmare commented 3 years ago

Good! Thanks for the summary.

I'm positive about adding this feature. 👍

We should get some more opinions from other members before moving on.

fabaff commented 3 years ago

I'm OK with adding it as according to the table the popular integrations supports it.

frenck commented 3 years ago

Yeah, looks good! Makes sense.

helto4real commented 3 years ago

I am positive to add it to SMHI pypi lib and fix integration if this is going to happen. And good job making the table of supporting platforms by the way!

MartinHjelmare commented 3 years ago

@bramkragten will this work for the frontend card?

helto4real commented 3 years ago

Now when looking into my pypi lib I realized it is allready implemented so it should be very easy to add it to Home Assistant if barometric pressure is added. I will follow this issue and implement if needed for SMHI.

bramkragten commented 3 years ago

@bramkragten will this work for the frontend card?

Yes, I see no problems there

MartinHjelmare commented 3 years ago

Ok, then I think we can go ahead here and consider this suggestion approved. :+1: