mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Move imports to top for irish_rail_transport (#29401)
This commit is contained in:
parent
45c7c7a439
commit
e04a208af0
@ -1,12 +1,13 @@
|
||||
"""Support for Irish Rail RTPI information."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
from pyirishrail.pyirishrail import IrishRailRTPI
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import CONF_NAME, ATTR_ATTRIBUTION
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@ -47,7 +48,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the Irish Rail transport sensor."""
|
||||
from pyirishrail.pyirishrail import IrishRailRTPI
|
||||
|
||||
station = config.get(CONF_STATION)
|
||||
direction = config.get(CONF_DIRECTION)
|
||||
|
Loading…
x
Reference in New Issue
Block a user