From b22eb223589402aa9134b33e2bdac5c850255c49 Mon Sep 17 00:00:00 2001 From: bouni Date: Tue, 15 Oct 2019 14:26:04 +0200 Subject: [PATCH] moved imports to top level (#27695) --- homeassistant/components/dnsip/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/dnsip/sensor.py b/homeassistant/components/dnsip/sensor.py index 0053d5a95ea..fb57040f2c2 100644 --- a/homeassistant/components/dnsip/sensor.py +++ b/homeassistant/components/dnsip/sensor.py @@ -2,6 +2,8 @@ from datetime import timedelta import logging +import aiodns +from aiodns.error import DNSError import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA @@ -58,7 +60,6 @@ class WanIpSensor(Entity): def __init__(self, hass, name, hostname, resolver, ipv6): """Initialize the DNS IP sensor.""" - import aiodns self.hass = hass self._name = name @@ -80,7 +81,6 @@ class WanIpSensor(Entity): async def async_update(self): """Get the current DNS IP address for hostname.""" - from aiodns.error import DNSError try: response = await self.resolver.query(self.hostname, self.querytype)