mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Move imports in magicseaweed component (#28020)
This commit is contained in:
parent
1342fe2b3c
commit
c1fccee83a
@ -1,19 +1,21 @@
|
|||||||
"""Support for magicseaweed data from magicseaweed.com."""
|
"""Support for magicseaweed data from magicseaweed.com."""
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import magicseaweed
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_API_KEY,
|
|
||||||
CONF_NAME,
|
|
||||||
CONF_MONITORED_CONDITIONS,
|
|
||||||
ATTR_ATTRIBUTION,
|
ATTR_ATTRIBUTION,
|
||||||
|
CONF_API_KEY,
|
||||||
|
CONF_MONITORED_CONDITIONS,
|
||||||
|
CONF_NAME,
|
||||||
)
|
)
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
import homeassistant.util.dt as dt_util
|
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -175,8 +177,6 @@ class MagicSeaweedData:
|
|||||||
|
|
||||||
def __init__(self, api_key, spot_id, units):
|
def __init__(self, api_key, spot_id, units):
|
||||||
"""Initialize the data object."""
|
"""Initialize the data object."""
|
||||||
import magicseaweed
|
|
||||||
|
|
||||||
self._msw = magicseaweed.MSW_Forecast(api_key, spot_id, None, units)
|
self._msw = magicseaweed.MSW_Forecast(api_key, spot_id, None, units)
|
||||||
self.currently = None
|
self.currently = None
|
||||||
self.hourly = {}
|
self.hourly = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user