mirror of
https://github.com/home-assistant/core.git
synced 2025-08-24 15:01:36 +02:00
Move imports to top for nmbs (#29365)
This commit is contained in:
committed by
Paulus Schoutsen
parent
564c468c26
commit
3ddd20159c
@@ -1,6 +1,7 @@
|
|||||||
"""Get ride details and liveboard details for NMBS (Belgian railway)."""
|
"""Get ride details and liveboard details for NMBS (Belgian railway)."""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from pyrail import iRail
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||||
@@ -64,7 +65,6 @@ def get_ride_duration(departure_time, arrival_time, delay=0):
|
|||||||
|
|
||||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||||
"""Set up the NMBS sensor with iRail API."""
|
"""Set up the NMBS sensor with iRail API."""
|
||||||
from pyrail import iRail
|
|
||||||
|
|
||||||
api_client = iRail()
|
api_client = iRail()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user