Move imports to top for hunterdouglas_powerview (#29420)

This commit is contained in:
springstan 2019-12-04 14:15:39 +01:00 committed by Pascal Vizeli
parent c880f09714
commit bef1c00b49

View File

@ -1,12 +1,16 @@
"""Support for Powerview scenes from a Powerview hub.""" """Support for Powerview scenes from a Powerview hub."""
import logging import logging
from aiopvapi.helpers.aiorequest import AioRequest
from aiopvapi.resources.scene import Scene as PvScene
from aiopvapi.rooms import Rooms
from aiopvapi.scenes import Scenes
import voluptuous as vol import voluptuous as vol
import homeassistant.helpers.config_validation as cv from homeassistant.components.scene import DOMAIN, Scene
from homeassistant.components.scene import Scene, DOMAIN
from homeassistant.const import CONF_PLATFORM from homeassistant.const import CONF_PLATFORM
from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import async_generate_entity_id from homeassistant.helpers.entity import async_generate_entity_id
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -33,11 +37,6 @@ STATE_ATTRIBUTE_ROOM_NAME = "roomName"
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None): async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up home assistant scene entries.""" """Set up home assistant scene entries."""
# from aiopvapi.hub import Hub
from aiopvapi.helpers.aiorequest import AioRequest
from aiopvapi.scenes import Scenes
from aiopvapi.rooms import Rooms
from aiopvapi.resources.scene import Scene as PvScene
hub_address = config.get(HUB_ADDRESS) hub_address = config.get(HUB_ADDRESS)
websession = async_get_clientsession(hass) websession = async_get_clientsession(hass)