mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 13:00:11 +00:00
Fix lingering timer in buienradar (#91378)
This commit is contained in:
@@ -35,6 +35,7 @@ from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
DEGREE,
|
||||
PERCENTAGE,
|
||||
Platform,
|
||||
UnitOfIrradiance,
|
||||
UnitOfLength,
|
||||
UnitOfPrecipitationDepth,
|
||||
@@ -47,7 +48,7 @@ from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.util import dt as dt_util
|
||||
|
||||
from .const import CONF_TIMEFRAME, DEFAULT_TIMEFRAME
|
||||
from .const import CONF_TIMEFRAME, DEFAULT_TIMEFRAME, DOMAIN
|
||||
from .util import BrData
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@@ -684,6 +685,7 @@ async def async_setup_entry(
|
||||
data = BrData(hass, coordinates, timeframe, entities)
|
||||
# schedule the first update in 1 minute from now:
|
||||
await data.schedule_update(1)
|
||||
hass.data[DOMAIN][entry.entry_id][Platform.SENSOR] = data
|
||||
|
||||
|
||||
class BrSensor(SensorEntity):
|
||||
|
||||
Reference in New Issue
Block a user