Move imports to top for version (#29075)
This commit is contained in:
parent
a64d04da56
commit
729116ff3a
1 changed files with 7 additions and 7 deletions
|
@ -2,6 +2,13 @@
|
||||||
import logging
|
import logging
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
|
from pyhaversion import (
|
||||||
|
LocalVersion,
|
||||||
|
DockerVersion,
|
||||||
|
HassioVersion,
|
||||||
|
PyPiVersion,
|
||||||
|
HaIoVersion,
|
||||||
|
)
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
@ -56,13 +63,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||||
|
|
||||||
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 the Version sensor platform."""
|
"""Set up the Version sensor platform."""
|
||||||
from pyhaversion import (
|
|
||||||
LocalVersion,
|
|
||||||
DockerVersion,
|
|
||||||
HassioVersion,
|
|
||||||
PyPiVersion,
|
|
||||||
HaIoVersion,
|
|
||||||
)
|
|
||||||
|
|
||||||
beta = config.get(CONF_BETA)
|
beta = config.get(CONF_BETA)
|
||||||
image = config.get(CONF_IMAGE)
|
image = config.get(CONF_IMAGE)
|
||||||
|
|
Loading…
Add table
Reference in a new issue