Skip to content

Commit

Permalink
add update_x_passphrase
Browse files Browse the repository at this point in the history
  • Loading branch information
cah-link committed Feb 25, 2019
1 parent b3b7687 commit 66e9f92
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ pyunifi.egg-info
pyvenv.cfg
pip-selfcheck.json
Lib/
.idea
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,11 @@ Set client alias. Use "" to reset to the default.
- mac: The target MAC: aa:bb:cc:dd:ee:ff
- alias: The alias to set

### `update_x_passphrase(self, wlan_id, x_passphrase)`
updates the Password of the given WLAN
- `wlan_id` -- the WLANs ID
- `x_passphrase` -- the new Password to set

Utilities
---------

Expand Down
11 changes: 11 additions & 0 deletions pyunifi/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,17 @@ def update_setting(self, settings):
res.extend(self._api_write('set/setting/' + sect, setting))
return res

def update_x_passphrase(self, wlan_id, x_passphrase):
"""
Update WLAN password
:param wlan_id: WLAN ID of the WLAN the password should be changed
:param x_passphrase: The new password
:return: the updated wlan_conf
"""
res = self._api_update("rest/wlanconf/" + wlan_id, {"x_passphrase": x_passphrase})
return res

def update_user_group(self, group_id, down_kbps=-1, up_kbps=-1):
"""
Update user group bandwidth settings
Expand Down

0 comments on commit 66e9f92

Please sign in to comment.