Move imports in shodan component (#28098)

This commit is contained in:
Diefferson Koderer Môro authored and Paulus Schoutsen committed 2019-10-21 22:31:41 -07:00
1 parent 2cc039dbc4
commit 1111e150f4
1 file changed
+3 -4
+3 -4
View File
@@ -1,12 +1,13 @@
"""Sensor for displaying the number of result on Shodan.io."""
import logging
from datetime import timedelta
import logging
import shodan
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import ATTR_ATTRIBUTION, CONF_API_KEY, CONF_NAME
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
@@ -32,8 +33,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Shodan sensor."""
import shodan
api_key = config.get(CONF_API_KEY)
name = config.get(CONF_NAME)
query = config.get(CONF_QUERY)