Skip to content

Commit

Permalink
Fix MFA
Browse files Browse the repository at this point in the history
  • Loading branch information
kbickar committed Nov 14, 2024
1 parent 5bf241e commit f2e7f0a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sense_energy/asyncsenseable.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def validate_mfa(self, code: str) -> None:
data = await resp.json()
self._set_auth_data(data)
self.set_monitor_id(data["monitors"][0]["id"])
await self.fetch_discovered_devices()
await self.fetch_devices()

async def renew_auth(self) -> None:
"""Renew the authentication token."""
Expand Down Expand Up @@ -278,12 +278,12 @@ async def fetch_devices(self) -> None:

async def get_discovered_device_names(self) -> list[str]:
"""Outdated. Get list of device names from API.
Use fetch_discovered_devices and sense.devices instead."""
Use fetch_devices and sense.devices instead."""
await self.fetch_devices()
return [d.name for d in self._devices.values()]

async def get_discovered_device_data(self):
"""Outdated. Get list of raw device data from API.
Use fetch_discovered_devices and sense.devices instead."""
Use fetch_devices and sense.devices instead."""
json = self._api_call(f"monitors/{self.sense_monitor_id}/devices/overview")
return await json["devices"]

0 comments on commit f2e7f0a

Please sign in to comment.