Set encoding before connecting (#23204)

pull/23215/head
Robbie Trencheny 2019-04-18 13:46:49 -07:00 committed by Paulus Schoutsen
parent 33b8241d26
commit 66b2ed930c
1 changed files with 1 additions and 1 deletions

View File

@ -55,13 +55,13 @@ class MikrotikScanner(DeviceScanner):
self.username = config[CONF_USERNAME]
self.password = config[CONF_PASSWORD]
self.method = config.get(CONF_METHOD)
self.encoding = config[CONF_ENCODING]
self.connected = False
self.success_init = False
self.client = None
self.wireless_exist = None
self.success_init = self.connect_to_device()
self.encoding = config[CONF_ENCODING]
if self.success_init:
_LOGGER.info("Start polling Mikrotik (%s) router...", self.host)