mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-10 09:24:31 +02:00
improved debug messages
fixed TrafficSensor unique id
This commit is contained in:
parent
f1a239f118
commit
81f25765f7
4 changed files with 11 additions and 5 deletions
|
@ -122,7 +122,7 @@ class MikrotikAPI:
|
|||
|
||||
try:
|
||||
response = self._connection.path(path)
|
||||
tuple(response)
|
||||
_LOGGER.debug("API response ({}): {}".format(path, tuple(response)))
|
||||
except librouteros_custom.exceptions.ConnectionClosed:
|
||||
_LOGGER.error("Mikrotik %s connection closed", self._host)
|
||||
self._connected = False
|
||||
|
@ -251,6 +251,7 @@ class MikrotikAPI:
|
|||
args = {'interface': interfaces, 'once': True}
|
||||
try:
|
||||
traffic = response('monitor-traffic', **args)
|
||||
_LOGGER.debug("API response ({}): {}".format("/interface/monitor-traffic", tuple(response)))
|
||||
except librouteros_custom.exceptions.ConnectionClosed:
|
||||
_LOGGER.error("Mikrotik %s connection closed", self._host)
|
||||
self._connected = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue