move imports in spotcrime component (#27715)
This commit is contained in:
parent
b2f6931bbe
commit
d4692367c5
1 changed files with 9 additions and 9 deletions
|
@ -1,27 +1,28 @@
|
|||
"""Sensor for Spot Crime."""
|
||||
|
||||
from datetime import timedelta
|
||||
from collections import defaultdict
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
|
||||
import spotcrime
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (
|
||||
CONF_API_KEY,
|
||||
CONF_INCLUDE,
|
||||
CONF_EXCLUDE,
|
||||
CONF_NAME,
|
||||
CONF_LATITUDE,
|
||||
CONF_LONGITUDE,
|
||||
ATTR_ATTRIBUTION,
|
||||
ATTR_LATITUDE,
|
||||
ATTR_LONGITUDE,
|
||||
CONF_API_KEY,
|
||||
CONF_EXCLUDE,
|
||||
CONF_INCLUDE,
|
||||
CONF_LATITUDE,
|
||||
CONF_LONGITUDE,
|
||||
CONF_NAME,
|
||||
CONF_RADIUS,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import slugify
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -75,7 +76,6 @@ class SpotCrimeSensor(Entity):
|
|||
self, name, latitude, longitude, radius, include, exclude, api_key, days
|
||||
):
|
||||
"""Initialize the Spot Crime sensor."""
|
||||
import spotcrime
|
||||
|
||||
self._name = name
|
||||
self._include = include
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue