mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Update pymetno lib, and start using met api v2 (#38547)
This commit is contained in:
parent
1e32d0e2b9
commit
e53d770b3d
@ -3,6 +3,6 @@
|
|||||||
"name": "Meteorologisk institutt (Met.no)",
|
"name": "Meteorologisk institutt (Met.no)",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/met",
|
"documentation": "https://www.home-assistant.io/integrations/met",
|
||||||
"requirements": ["pyMetno==0.5.1"],
|
"requirements": ["pyMetno==0.7.0"],
|
||||||
"codeowners": ["@danielhiversen"]
|
"codeowners": ["@danielhiversen"]
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ ATTRIBUTION = (
|
|||||||
)
|
)
|
||||||
DEFAULT_NAME = "Met.no"
|
DEFAULT_NAME = "Met.no"
|
||||||
|
|
||||||
URL = "https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/1.9/"
|
URL = "https://aa015h6buqvih86i1.api.met.no/weatherapi/locationforecast/2.0/classic"
|
||||||
|
|
||||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
{
|
{
|
||||||
@ -105,13 +105,11 @@ class MetWeather(WeatherEntity):
|
|||||||
elevation = conf[CONF_ELEVATION]
|
elevation = conf[CONF_ELEVATION]
|
||||||
|
|
||||||
if not self._is_metric:
|
if not self._is_metric:
|
||||||
elevation = int(
|
elevation = convert_distance(elevation, LENGTH_FEET, LENGTH_METERS)
|
||||||
round(convert_distance(elevation, LENGTH_FEET, LENGTH_METERS))
|
|
||||||
)
|
|
||||||
coordinates = {
|
coordinates = {
|
||||||
"lat": str(latitude),
|
"lat": latitude,
|
||||||
"lon": str(longitude),
|
"lon": longitude,
|
||||||
"msl": str(elevation),
|
"msl": elevation,
|
||||||
}
|
}
|
||||||
if coordinates == self._coordinates:
|
if coordinates == self._coordinates:
|
||||||
return
|
return
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
"domain": "norway_air",
|
"domain": "norway_air",
|
||||||
"name": "Om Luftkvalitet i Norge (Norway Air)",
|
"name": "Om Luftkvalitet i Norge (Norway Air)",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/norway_air",
|
"documentation": "https://www.home-assistant.io/integrations/norway_air",
|
||||||
"requirements": ["pyMetno==0.5.1"],
|
"requirements": ["pyMetno==0.7.0"],
|
||||||
"codeowners": []
|
"codeowners": []
|
||||||
}
|
}
|
||||||
|
@ -1178,7 +1178,7 @@ pyHS100==0.3.5.1
|
|||||||
|
|
||||||
# homeassistant.components.met
|
# homeassistant.components.met
|
||||||
# homeassistant.components.norway_air
|
# homeassistant.components.norway_air
|
||||||
pyMetno==0.5.1
|
pyMetno==0.7.0
|
||||||
|
|
||||||
# homeassistant.components.rfxtrx
|
# homeassistant.components.rfxtrx
|
||||||
pyRFXtrx==0.25
|
pyRFXtrx==0.25
|
||||||
|
@ -556,7 +556,7 @@ pyHS100==0.3.5.1
|
|||||||
|
|
||||||
# homeassistant.components.met
|
# homeassistant.components.met
|
||||||
# homeassistant.components.norway_air
|
# homeassistant.components.norway_air
|
||||||
pyMetno==0.5.1
|
pyMetno==0.7.0
|
||||||
|
|
||||||
# homeassistant.components.rfxtrx
|
# homeassistant.components.rfxtrx
|
||||||
pyRFXtrx==0.25
|
pyRFXtrx==0.25
|
||||||
|
Loading…
x
Reference in New Issue
Block a user