mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Override api url in norway_air (#59573)
This commit is contained in:
parent
e30e4d5c6d
commit
363de37400
@ -3,7 +3,7 @@
|
||||
"name": "Meteorologisk institutt (Met.no)",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/met",
|
||||
"requirements": ["pyMetno==0.8.3"],
|
||||
"requirements": ["pyMetno==0.8.4"],
|
||||
"codeowners": ["@danielhiversen", "@thimic"],
|
||||
"iot_class": "cloud_polling"
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ CONF_FORECAST = "forecast"
|
||||
DEFAULT_FORECAST = 0
|
||||
DEFAULT_NAME = "Air quality Norway"
|
||||
|
||||
OVERRIDE_URL = "https://aa015h6buqvih86i1.api.met.no/weatherapi/airqualityforecast/0.1/"
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
{
|
||||
vol.Optional(CONF_FORECAST, default=DEFAULT_FORECAST): vol.Coerce(int),
|
||||
@ -72,7 +74,9 @@ class AirSensor(AirQualityEntity):
|
||||
def __init__(self, name, coordinates, forecast, session):
|
||||
"""Initialize the sensor."""
|
||||
self._name = name
|
||||
self._api = metno.AirQualityData(coordinates, forecast, session)
|
||||
self._api = metno.AirQualityData(
|
||||
coordinates, forecast, session, api_url=OVERRIDE_URL
|
||||
)
|
||||
|
||||
@property
|
||||
def attribution(self) -> str:
|
||||
|
@ -2,7 +2,7 @@
|
||||
"domain": "norway_air",
|
||||
"name": "Om Luftkvalitet i Norge (Norway Air)",
|
||||
"documentation": "https://www.home-assistant.io/integrations/norway_air",
|
||||
"requirements": ["pyMetno==0.8.3"],
|
||||
"requirements": ["pyMetno==0.8.4"],
|
||||
"codeowners": [],
|
||||
"iot_class": "cloud_polling"
|
||||
}
|
||||
|
@ -1315,7 +1315,7 @@ pyMetEireann==2021.8.0
|
||||
|
||||
# homeassistant.components.met
|
||||
# homeassistant.components.norway_air
|
||||
pyMetno==0.8.3
|
||||
pyMetno==0.8.4
|
||||
|
||||
# homeassistant.components.rfxtrx
|
||||
pyRFXtrx==0.27.0
|
||||
|
@ -790,7 +790,7 @@ pyMetEireann==2021.8.0
|
||||
|
||||
# homeassistant.components.met
|
||||
# homeassistant.components.norway_air
|
||||
pyMetno==0.8.3
|
||||
pyMetno==0.8.4
|
||||
|
||||
# homeassistant.components.rfxtrx
|
||||
pyRFXtrx==0.27.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user