Move imports in shodan component (#28098)
This commit is contained in:
parent
2cc039dbc4
commit
1111e150f4
1 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue