diff --git a/custom_components/googlewifi/__init__.py b/custom_components/googlewifi/__init__.py index fa6a994..489ed09 100644 --- a/custom_components/googlewifi/__init__.py +++ b/custom_components/googlewifi/__init__.py @@ -5,7 +5,7 @@ from datetime import timedelta import voluptuous as vol -from googlewifi import GoogleWifi, GoogleWifiException, GoogleHomeIgnoreDevice +from googlewifi import GoogleHomeIgnoreDevice, GoogleWifi, GoogleWifiException from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_SCAN_INTERVAL from homeassistant.core import CoreState, HomeAssistant, callback @@ -209,9 +209,7 @@ async def _async_update_data(self): session = aiohttp_client.async_create_clientsession(self.hass) self.api = GoogleWifi(refresh_token=self.refresh_token, session=session) except GoogleHomeIgnoreDevice as error: - raise UpdateFailed( - f"Error connecting to GoogleWifi: {error}" - ) from error + raise UpdateFailed(f"Error connecting to GoogleWifi: {error}") from error except ConnectionError as error: raise PlatformNotReady( f"Error connecting to GoogleWifi: {error}" diff --git a/custom_components/googlewifi/device_tracker.py b/custom_components/googlewifi/device_tracker.py index 40a2167..d1bc94f 100644 --- a/custom_components/googlewifi/device_tracker.py +++ b/custom_components/googlewifi/device_tracker.py @@ -12,7 +12,6 @@ ATTR_IDENTIFIERS, ATTR_MANUFACTURER, ATTR_MODEL, - ATTR_CONNECTIONS, COORDINATOR, DEFAULT_ICON, DEV_CLIENT_MODEL, diff --git a/custom_components/googlewifi/switch.py b/custom_components/googlewifi/switch.py index 3fa827d..a9f0a7e 100644 --- a/custom_components/googlewifi/switch.py +++ b/custom_components/googlewifi/switch.py @@ -7,8 +7,7 @@ from homeassistant.helpers import config_validation as cv from homeassistant.helpers import entity_platform from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC -from homeassistant.util.dt import as_local, parse_datetime, as_timestamp -from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC +from homeassistant.util.dt import as_local, as_timestamp, parse_datetime from . import GoogleWifiEntity, GoogleWiFiUpdater from .const import ( @@ -18,7 +17,6 @@ ATTR_MODEL, CONF_SPEED_UNITS, COORDINATOR, - CONF_SPEED_UNITS, DEFAULT_ICON, DEV_CLIENT_MODEL, DOMAIN,