Skip to content

Commit

Permalink
Set encoding before connecting (#23204)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 authored and balloob committed Apr 20, 2019
1 parent ad5d4bb commit 2bb772b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion homeassistant/components/mikrotik/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def __init__(self, config):
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)
Expand Down

0 comments on commit 2bb772b

Please sign in to comment.