diff --git a/.gitignore b/.gitignore index b3c4bd4..4f7187a 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ pip-selfcheck.json Lib/ .tox/ .vscode/ +.idea diff --git a/README.md b/README.md index f3b486d..6d80c58 100644 --- a/README.md +++ b/README.md @@ -248,6 +248,11 @@ Powers On the given port on the Switch identified by the given MAC Address. - `target_mac` -- MAC address of the device - `port_idx` -- Port ID to power on +### `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 --------- diff --git a/pyunifi/controller.py b/pyunifi/controller.py index aafc9a2..ea61669 100644 --- a/pyunifi/controller.py +++ b/pyunifi/controller.py @@ -753,6 +753,18 @@ 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