mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Move imports in netgear_lte component (#27777)
This commit is contained in:
parent
9dc0c05ee0
commit
8350e1246a
@ -5,6 +5,7 @@ import logging
|
|||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
import attr
|
import attr
|
||||||
|
import eternalegypt
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -139,7 +140,6 @@ class ModemData:
|
|||||||
|
|
||||||
async def async_update(self):
|
async def async_update(self):
|
||||||
"""Call the API to update the data."""
|
"""Call the API to update the data."""
|
||||||
import eternalegypt
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.data = await self.modem.information()
|
self.data = await self.modem.information()
|
||||||
@ -264,7 +264,6 @@ async def async_setup(hass, config):
|
|||||||
|
|
||||||
async def _setup_lte(hass, lte_config):
|
async def _setup_lte(hass, lte_config):
|
||||||
"""Set up a Netgear LTE modem."""
|
"""Set up a Netgear LTE modem."""
|
||||||
import eternalegypt
|
|
||||||
|
|
||||||
host = lte_config[CONF_HOST]
|
host = lte_config[CONF_HOST]
|
||||||
password = lte_config[CONF_PASSWORD]
|
password = lte_config[CONF_PASSWORD]
|
||||||
@ -322,7 +321,6 @@ async def _login(hass, modem_data, password):
|
|||||||
|
|
||||||
async def _retry_login(hass, modem_data, password):
|
async def _retry_login(hass, modem_data, password):
|
||||||
"""Sleep and retry setup."""
|
"""Sleep and retry setup."""
|
||||||
import eternalegypt
|
|
||||||
|
|
||||||
_LOGGER.warning("Could not connect to %s. Will keep trying", modem_data.host)
|
_LOGGER.warning("Could not connect to %s. Will keep trying", modem_data.host)
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import attr
|
import attr
|
||||||
|
import eternalegypt
|
||||||
|
|
||||||
from homeassistant.components.notify import ATTR_TARGET, BaseNotificationService, DOMAIN
|
from homeassistant.components.notify import ATTR_TARGET, BaseNotificationService, DOMAIN
|
||||||
|
|
||||||
@ -27,7 +28,6 @@ class NetgearNotifyService(BaseNotificationService):
|
|||||||
|
|
||||||
async def async_send_message(self, message="", **kwargs):
|
async def async_send_message(self, message="", **kwargs):
|
||||||
"""Send a message to a user."""
|
"""Send a message to a user."""
|
||||||
import eternalegypt
|
|
||||||
|
|
||||||
modem_data = self.hass.data[DATA_KEY].get_modem_data(self.config)
|
modem_data = self.hass.data[DATA_KEY].get_modem_data(self.config)
|
||||||
if not modem_data:
|
if not modem_data:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user