Move imports to top for canary (#29449)

This commit is contained in:
springstan 2019-12-05 06:30:22 +01:00 committed by Paulus Schoutsen
parent d70ad369de
commit 52926f1961

View File

@ -1,4 +1,5 @@
"""Support for Canary sensors."""
from canary.api import SensorType
from homeassistant.const import TEMP_CELSIUS
from homeassistant.helpers.entity import Entity
@ -103,8 +104,6 @@ class CanarySensor(Entity):
"""Get the latest state of the sensor."""
self._data.update()
from canary.api import SensorType
canary_sensor_type = None
if self._sensor_type[0] == "air_quality":
canary_sensor_type = SensorType.AIR_QUALITY