mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-08-30 14:39:23 +02:00
Removed manual accounting enable/disable checkbox, now it dinamically creates entites depending on state in Mikrotik. Reverted config flow to version 1.
Reused ARP call in accounting hosts building.
This commit is contained in:
parent
39c31cb84a
commit
069897c32c
8 changed files with 50 additions and 70 deletions
|
@ -17,7 +17,6 @@ from .const import (
|
|||
DOMAIN,
|
||||
DATA_CLIENT,
|
||||
DEFAULT_TRAFFIC_TYPE,
|
||||
CONF_TRACK_ACCOUNTING,
|
||||
)
|
||||
from .mikrotik_controller import MikrotikControllerData
|
||||
|
||||
|
@ -49,11 +48,10 @@ async def async_setup_entry(hass, config_entry):
|
|||
traffic_type = config_entry.data[CONF_UNIT_OF_MEASUREMENT]
|
||||
else:
|
||||
traffic_type = DEFAULT_TRAFFIC_TYPE
|
||||
track_accounting = config_entry.data[CONF_TRACK_ACCOUNTING]
|
||||
|
||||
mikrotik_controller = MikrotikControllerData(
|
||||
hass, config_entry, name, host, port, username, password, use_ssl,
|
||||
traffic_type, track_accounting
|
||||
traffic_type
|
||||
)
|
||||
await mikrotik_controller.hwinfo_update()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue