Skip to content

Commit

Permalink
Add missing variables (#185)
Browse files Browse the repository at this point in the history
* Add missing logger to switch.py

* Add logger to number.py

* Apply black formatting

* Add missing variables
  • Loading branch information
madd0 authored Dec 11, 2024
1 parent 08ca496 commit afeb9a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/aguaiot/aguaiot.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async def login(self):
response.status_code,
response.text,
)
except httpx.TransportError:
except httpx.TransportError as e:
raise ConnectionError(f"Connection error to {url}: {e}")

if response.status_code != 200:
Expand Down Expand Up @@ -203,7 +203,7 @@ async def do_refresh_token(self):
response.status_code,
response.text,
)
except httpx.TransportError:
except httpx.TransportError as e:
raise ConnectionError(f"Connection error to {url}: {e}")

if response.status_code != 201:
Expand Down Expand Up @@ -298,7 +298,7 @@ async def handle_webcall(self, method, url, payload):
response.status_code,
response.text,
)
except httpx.TransportError:
except httpx.TransportError as e:
raise ConnectionError(f"Connection error to {url}: {e}")

if response.status_code == 401:
Expand Down
3 changes: 3 additions & 0 deletions custom_components/aguaiot/number.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
DataUpdateCoordinator,
Expand All @@ -7,6 +8,8 @@
from .const import NUMBERS, DOMAIN
from .aguaiot import AguaIOTError

_LOGGER = logging.getLogger(__name__)


async def async_setup_entry(hass, entry, async_add_entities):
coordinator: DataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id][
Expand Down
3 changes: 3 additions & 0 deletions custom_components/aguaiot/switch.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
from homeassistant.helpers.update_coordinator import (
CoordinatorEntity,
DataUpdateCoordinator,
Expand All @@ -7,6 +8,8 @@
from .const import SWITCHES, DOMAIN
from .aguaiot import AguaIOTError

_LOGGER = logging.getLogger(__name__)


async def async_setup_entry(hass, entry, async_add_entities):
coordinator: DataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id][
Expand Down

0 comments on commit afeb9a8

Please sign in to comment.