Skip to content

Commit

Permalink
WiFi explorer should be called WiFi roaming
Browse files Browse the repository at this point in the history
  • Loading branch information
syssi committed Mar 26, 2018
1 parent d269675 commit 5d9edff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions miio/tests/test_wifirepeater.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ def test_status(self):
assert self.state().access_policy == self.device.start_state['sta']['access_policy']
assert self.state().associated_stations == self.device.start_state['mat']

def test_set_wifi_explorer(self):
self.device.set_wifi_explorer(True)
def test_set_wifi_roaming(self):
self.device.set_wifi_roaming(True)
assert self.info().raw['desc']['wifi_explorer'] == 1

self.device.set_wifi_explorer(False)
self.device.set_wifi_roaming(False)
assert self.info().raw['desc']['wifi_explorer'] == 0

def test_configuration(self):
Expand Down
10 changes: 5 additions & 5 deletions miio/wifirepeater.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,18 @@ def configuration(self) -> WifiRepeaterConfiguration:
return WifiRepeaterConfiguration(
self.send("miIO.get_repeater_ap_info", []))

def set_wifi_explorer(self, wifi_explorer: bool):
"""Turn the WiFi explorer on/off."""
def set_wifi_roaming(self, wifi_roaming: bool):
"""Turn the WiFi roaming on/off."""
return self.send("miIO.switch_wifi_explorer", [{
'wifi_explorer': int(wifi_explorer)
'wifi_explorer': int(wifi_roaming)
}])

def set_configuration(self, ssid: str, password: str, hidden: bool = False,
wifi_explorer: bool = True):
wifi_roaming: bool = False):
"""Update the configuration of the accesspoint."""
return self.send("miIO.switch_wifi_ssid", [{
'ssid': ssid,
'pwd': password,
'hidden': int(hidden),
'wifi_explorer': int(wifi_explorer)
'wifi_explorer': int(wifi_roaming)
}])

0 comments on commit 5d9edff

Please sign in to comment.