Skip to content

Commit

Permalink
- removed forced method from get_mac
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdelprete committed Mar 17, 2024
1 parent aff0a31 commit dfc0dd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/sinapsi_alfa/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def get_mac_address(self) -> str:
"""Get mac address from ip/hostname."""
mac_address = None
i = 0
# we want to ensure a mac address if found, sometimes it takes more than 1 try
while not mac_address and i < 10:
if self.check_port():
_LOGGER.debug(
Expand All @@ -115,7 +116,6 @@ def get_mac_address(self) -> str:
f"Get_Mac_Address (ERROR): port not available on {self._host}:{self._port}"
)
# Get MAC address from the ARP cache using the hostname
getmac.FORCE_METHOD = "ArpVariousArgs"
mac_address = getmac.get_mac_address(
hostname=self._host, network_request=False
)
Expand Down

0 comments on commit dfc0dd8

Please sign in to comment.