Skip to content

Commit 02c1d48

Browse files
authored
Fix Config import
ConfigType to be used instead
1 parent b3837b4 commit 02c1d48

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

custom_components/nordpool/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
import backoff
77
import voluptuous as vol
88
from homeassistant.config_entries import ConfigEntry
9-
from homeassistant.core import Config, HomeAssistant
9+
from homeassistant.core import HomeAssistant
1010
from homeassistant.const import Platform
1111
from homeassistant.helpers.aiohttp_client import async_get_clientsession
1212
from homeassistant.helpers.dispatcher import async_dispatcher_send
1313
from homeassistant.helpers.event import async_track_time_change
14+
from homeassistant.helpers.typing import ConfigType
1415
from homeassistant.util import dt as dt_utils
1516

1617
from .aio_price import AioPrices, InvalidValueException
@@ -132,7 +133,7 @@ async def tomorrow(self, area: str, currency: str):
132133
return await self._someday(area, currency, "tomorrow")
133134

134135

135-
async def _dry_setup(hass: HomeAssistant, config: Config) -> bool:
136+
async def _dry_setup(hass: HomeAssistant, config: ConfigType) -> bool:
136137
"""Set up using yaml config file."""
137138
if DOMAIN not in hass.data:
138139
api = NordpoolData(hass)
@@ -192,7 +193,7 @@ async def new_data_cb(_):
192193
return True
193194

194195

195-
async def async_setup(hass: HomeAssistant, config: Config) -> bool:
196+
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
196197
"""Set up using yaml config file."""
197198
return await _dry_setup(hass, config)
198199

0 commit comments

Comments
 (0)