Cleanup Discovergy a bit (#104552)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
parent
ad17acc6ca
commit
b314df272f
7 changed files with 45 additions and 66 deletions
|
@ -12,17 +12,12 @@ from homeassistant.core import HomeAssistant
|
|||
from homeassistant.exceptions import ConfigEntryAuthFailed
|
||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||
|
||||
from .const import DOMAIN
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class DiscovergyUpdateCoordinator(DataUpdateCoordinator[Reading]):
|
||||
"""The Discovergy update coordinator."""
|
||||
|
||||
discovergy_client: Discovergy
|
||||
meter: Meter
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
hass: HomeAssistant,
|
||||
|
@ -36,7 +31,7 @@ class DiscovergyUpdateCoordinator(DataUpdateCoordinator[Reading]):
|
|||
super().__init__(
|
||||
hass,
|
||||
_LOGGER,
|
||||
name=DOMAIN,
|
||||
name=f"Discovergy meter {meter.meter_id}",
|
||||
update_interval=timedelta(seconds=30),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue