Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrike committed Aug 28, 2024
1 parent 7685eee commit 1745b02
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pydaikin/daikin_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async def _get_resource(self, path: str, params: Optional[dict] = None):
"Calling: %s/%s %s [%s]",
self.base_url,
path,
{**params, **{"pass": "****"}},
params if "pass" not in params else {**params, **{"pass": "****"}},
self.headers,
)

Expand Down
5 changes: 3 additions & 2 deletions pydaikin/daikin_skyfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import logging
from urllib.parse import unquote

from aiohttp import ClientSession

from .daikin_base import Appliance

_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -50,12 +52,11 @@ class DaikinSkyFi(Appliance):
def __init__(
self,
device_id: str,
session: ClientSession | None,
password: str,
session=None,
) -> None:
"""Init the pydaikin appliance, representing one Daikin SkyFi device."""
super().__init__(device_id, session)
# self.device_ip = f'{self.device_ip}'
self.base_url = f"http://{self.device_ip}:2000"
self._password = password

Expand Down
6 changes: 1 addition & 5 deletions pydaikin/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ async def __init__(
"""Factory to init the corresponding Daikin class."""

if password is not None:
self._generated_object = DaikinSkyFi(
device_id,
password=password,
session=session,
)
self._generated_object = DaikinSkyFi(device_id, session, password)
elif key is not None:
self._generated_object = DaikinBRP072C(
device_id,
Expand Down

0 comments on commit 1745b02

Please sign in to comment.