Skip to content

Commit

Permalink
Fix wifi state
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre0512 committed Oct 12, 2023
1 parent 9ecb07b commit 09b5f11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name="speedport-api",
version="0.5.0",
version="0.5.1",
author="Andre Basche",
description="Control Telekom Speedport routers with Python",
long_description=long_description,
Expand Down
7 changes: 4 additions & 3 deletions speedport/speedport.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ async def create(self):
self._api = await SpeedportApi(
self._host, self._password, self._https, self._session
).create()
await self.update_status()
return self

async def close(self):
Expand Down Expand Up @@ -139,15 +140,15 @@ def rebooting(self):

@property
def wlan_active(self):
return bool(self._status.get("use_wlan"))
return bool(int(self._status.get("use_wlan")))

@property
def wlan_guest_active(self):
return bool(self._status.get("wlan_guest_active"))
return bool(int(self._status.get("wlan_guest_active")))

@property
def wlan_office_active(self):
return bool(self._status.get("wlan_office_active"))
return bool(int(self._status.get("wlan_office_active")))

@property
def wlan_ssid(self):
Expand Down

0 comments on commit 09b5f11

Please sign in to comment.