Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Config import #433

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions custom_components/nordpool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
import backoff
import voluptuous as vol
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import Config, HomeAssistant
from homeassistant.core import HomeAssistant
from homeassistant.const import Platform
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.event import async_track_time_change
from homeassistant.helpers.typing import ConfigType
from homeassistant.util import dt as dt_utils

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


async def _dry_setup(hass: HomeAssistant, config: Config) -> bool:
async def _dry_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up using yaml config file."""
if DOMAIN not in hass.data:
api = NordpoolData(hass)
Expand Down Expand Up @@ -192,7 +193,7 @@ async def new_data_cb(_):
return True


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

Expand Down
Loading