mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Remove polling interval property from Aurora (#99198)
This commit is contained in:
parent
1c0d5f8637
commit
3db61a99a4
@ -9,14 +9,7 @@ from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, Platfo
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import aiohttp_client
|
||||
|
||||
from .const import (
|
||||
AURORA_API,
|
||||
CONF_THRESHOLD,
|
||||
COORDINATOR,
|
||||
DEFAULT_POLLING_INTERVAL,
|
||||
DEFAULT_THRESHOLD,
|
||||
DOMAIN,
|
||||
)
|
||||
from .const import AURORA_API, CONF_THRESHOLD, COORDINATOR, DEFAULT_THRESHOLD, DOMAIN
|
||||
from .coordinator import AuroraDataUpdateCoordinator
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@ -35,14 +28,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
||||
longitude = conf[CONF_LONGITUDE]
|
||||
latitude = conf[CONF_LATITUDE]
|
||||
polling_interval = DEFAULT_POLLING_INTERVAL
|
||||
threshold = options.get(CONF_THRESHOLD, DEFAULT_THRESHOLD)
|
||||
name = conf[CONF_NAME]
|
||||
|
||||
coordinator = AuroraDataUpdateCoordinator(
|
||||
hass=hass,
|
||||
name=name,
|
||||
polling_interval=polling_interval,
|
||||
api=api,
|
||||
latitude=latitude,
|
||||
longitude=longitude,
|
||||
|
@ -3,7 +3,6 @@
|
||||
DOMAIN = "aurora"
|
||||
COORDINATOR = "coordinator"
|
||||
AURORA_API = "aurora_api"
|
||||
DEFAULT_POLLING_INTERVAL = 5
|
||||
CONF_THRESHOLD = "forecast_threshold"
|
||||
DEFAULT_THRESHOLD = 75
|
||||
ATTRIBUTION = "Data provided by the National Oceanic and Atmospheric Administration"
|
||||
|
@ -19,7 +19,6 @@ class AuroraDataUpdateCoordinator(DataUpdateCoordinator):
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
name: str,
|
||||
polling_interval: int,
|
||||
api: AuroraForecast,
|
||||
latitude: float,
|
||||
longitude: float,
|
||||
@ -31,7 +30,7 @@ class AuroraDataUpdateCoordinator(DataUpdateCoordinator):
|
||||
hass=hass,
|
||||
logger=_LOGGER,
|
||||
name=name,
|
||||
update_interval=timedelta(minutes=polling_interval),
|
||||
update_interval=timedelta(minutes=5),
|
||||
)
|
||||
|
||||
self.api = api
|
||||
|
Loading…
x
Reference in New Issue
Block a user