diff --git a/custom_components/mikrotik_router/mikrotik_controller.py b/custom_components/mikrotik_router/mikrotik_controller.py index 6ecb359..d9830aa 100644 --- a/custom_components/mikrotik_router/mikrotik_controller.py +++ b/custom_components/mikrotik_router/mikrotik_controller.py @@ -199,10 +199,6 @@ class MikrotikControllerData: await self.hass.async_add_executor_job(self.get_system_resource) await self.hass.async_add_executor_job(self.get_script) await self.hass.async_add_executor_job(self.get_queue) - await self.hass.async_add_executor_job(self.get_dns) - await self.hass.async_add_executor_job(self.get_dhcp) - - await self.hass.async_add_executor_job(self.process_host) async_dispatcher_send(self.hass, self.signal_update) @@ -667,6 +663,22 @@ class MikrotikControllerData: self.data["queue"][uid]["upload-burst-time"] = upload_burst_time self.data["queue"][uid]["download-burst-time"] = download_burst_time + # --------------------------- + # get_arp + # --------------------------- + def get_arp(self): + """Get ARP data from Mikrotik""" + self.data["arp"] = parse_api( + data=self.data["arp"], + source=self.api.path("/ip/arp"), + key="mac-address", + vals=[ + {"name": "mac-address"}, + {"name": "address"}, + {"name": "interface"}, + ], + ) + # --------------------------- # get_dns # ---------------------------