Skip to content

Commit 6f3375b

Browse files
committed
Change account_id to id
1 parent b887d3e commit 6f3375b

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

pymyq/account.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def api(self) -> "API":
4040
return self._api
4141

4242
@property
43-
def account_id(self) -> Optional[str]:
43+
def id(self) -> Optional[str]:
4444
"""Return account id """
4545
return self.account_json.get("id")
4646

@@ -83,12 +83,12 @@ def gateways(self) -> Dict[str, MyQDevice]:
8383

8484
async def _get_devices(self) -> None:
8585

86-
_LOGGER.debug("Retrieving devices for account %s", self.name or self.account_id)
86+
_LOGGER.debug("Retrieving devices for account %s", self.name or self.id)
8787

8888
_, devices_resp = await self._api.request(
8989
method="get",
9090
returns="json",
91-
url=DEVICES_ENDPOINT.format(account_id=self.account_id),
91+
url=DEVICES_ENDPOINT.format(account_id=self.id),
9292
)
9393

9494
if devices_resp is not None and not isinstance(devices_resp, dict):
@@ -167,9 +167,7 @@ async def _get_devices(self) -> None:
167167
if new_device:
168168
self._devices[serial_number] = new_device
169169
else:
170-
_LOGGER.debug(
171-
f"No devices found for account {self.name or self.account_id}"
172-
)
170+
_LOGGER.debug(f"No devices found for account {self.name or self.id}")
173171

174172
async def update(self) -> None:
175173
"""Get up-to-date device info."""
@@ -188,7 +186,7 @@ async def update(self) -> None:
188186
if call_dt < next_available_call_dt:
189187
_LOGGER.debug(
190188
"Ignoring device update request for account %s as it is within throttle window",
191-
self.name or self.account_id,
189+
self.name or self.id,
192190
)
193191
return
194192

0 commit comments

Comments
 (0)