mirror of
https://github.com/home-assistant/core
synced 2024-09-09 12:51:22 +02:00
Move imports in iss component (#28003)
This commit is contained in:
parent
96509c0c0b
commit
cf2ee1a09f
@ -1,18 +1,19 @@
|
||||
"""Support for International Space Station data sensor."""
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
import pyiss
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.components.binary_sensor import BinarySensorDevice, PLATFORM_SCHEMA
|
||||
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice
|
||||
from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
ATTR_LONGITUDE,
|
||||
ATTR_LATITUDE,
|
||||
ATTR_LONGITUDE,
|
||||
CONF_NAME,
|
||||
CONF_SHOW_ON_MAP,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.util import Throttle
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@ -113,8 +114,6 @@ class IssData:
|
||||
@Throttle(MIN_TIME_BETWEEN_UPDATES)
|
||||
def update(self):
|
||||
"""Get the latest data from the ISS API."""
|
||||
import pyiss
|
||||
|
||||
try:
|
||||
iss = pyiss.ISS()
|
||||
self.is_above = iss.is_ISS_above(self.latitude, self.longitude)
|
||||
|
Loading…
Reference in New Issue
Block a user