mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-27 19:28:54 +02:00
separated mikrotik_controller
pylint cleanup
This commit is contained in:
parent
fbf1c112b3
commit
c24f49252a
6 changed files with 299 additions and 271 deletions
|
@ -6,17 +6,16 @@ from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
|
|||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
from homeassistant.components.device_tracker.config_entry import ScannerEntity
|
||||
from homeassistant.components.device_tracker.const import SOURCE_TYPE_ROUTER
|
||||
from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
ATTR_ATTRIBUTION,
|
||||
)
|
||||
from .const import (
|
||||
DOMAIN,
|
||||
DATA_CLIENT,
|
||||
ATTRIBUTION,
|
||||
)
|
||||
|
||||
from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
ATTR_ATTRIBUTION,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
DEVICE_ATTRIBUTES = [
|
||||
|
@ -144,6 +143,7 @@ class MikrotikControllerPortDeviceTracker(ScannerEntity):
|
|||
"""Return the icon."""
|
||||
if not self.mikrotik_controller.data['interface'][self._uid]['enabled']:
|
||||
return 'mdi:lan-disconnect'
|
||||
|
||||
if self.mikrotik_controller.data['interface'][self._uid]['running']:
|
||||
return 'mdi:lan-connect'
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue