diff --git a/homeassistant/components/device_tracker/asuswrt.py b/homeassistant/components/device_tracker/asuswrt.py index fb47b26a687..ee243f12988 100644 --- a/homeassistant/components/device_tracker/asuswrt.py +++ b/homeassistant/components/device_tracker/asuswrt.py @@ -118,11 +118,10 @@ class AsusWrtDeviceScanner(DeviceScanner): if self.protocol == 'ssh': self.connection = SshConnection( self.host, self.port, self.username, self.password, - self.ssh_key, self.mode == 'ap') + self.ssh_key) else: self.connection = TelnetConnection( - self.host, self.port, self.username, self.password, - self.mode == 'ap') + self.host, self.port, self.username, self.password) self.last_results = {} @@ -253,7 +252,7 @@ class _Connection: class SshConnection(_Connection): """Maintains an SSH connection to an ASUS-WRT router.""" - def __init__(self, host, port, username, password, ssh_key, ap): + def __init__(self, host, port, username, password, ssh_key): """Initialize the SSH connection properties.""" super().__init__() @@ -263,7 +262,6 @@ class SshConnection(_Connection): self._username = username self._password = password self._ssh_key = ssh_key - self._ap = ap def run_command(self, command): """Run commands through an SSH connection. @@ -323,7 +321,7 @@ class SshConnection(_Connection): class TelnetConnection(_Connection): """Maintains a Telnet connection to an ASUS-WRT router.""" - def __init__(self, host, port, username, password, ap): + def __init__(self, host, port, username, password): """Initialize the Telnet connection properties.""" super().__init__() @@ -332,7 +330,6 @@ class TelnetConnection(_Connection): self._port = port self._username = username self._password = password - self._ap = ap self._prompt_string = None def run_command(self, command): diff --git a/tests/components/device_tracker/test_asuswrt.py b/tests/components/device_tracker/test_asuswrt.py index f8d3fdf128b..bf7d5145e33 100644 --- a/tests/components/device_tracker/test_asuswrt.py +++ b/tests/components/device_tracker/test_asuswrt.py @@ -473,7 +473,7 @@ class TestSshConnection(unittest.TestCase): def setUp(self): """Setup test env.""" self.connection = SshConnection( - 'fake', 'fake', 'fake', 'fake', 'fake', 'fake') + 'fake', 'fake', 'fake', 'fake', 'fake') self.connection._connected = True def test_run_command_exception_eof(self): @@ -513,7 +513,7 @@ class TestTelnetConnection(unittest.TestCase): def setUp(self): """Setup test env.""" self.connection = TelnetConnection( - 'fake', 'fake', 'fake', 'fake', 'fake') + 'fake', 'fake', 'fake', 'fake') self.connection._connected = True def test_run_command_exception_eof(self):