mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix nullable ip_address in mikrotik (#76197)
This commit is contained in:
parent
8793cf4996
commit
ff255fedda
@ -116,7 +116,7 @@ class MikrotikDataUpdateCoordinatorTracker(
|
|||||||
return self.device.mac
|
return self.device.mac
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ip_address(self) -> str:
|
def ip_address(self) -> str | None:
|
||||||
"""Return the mac address of the client."""
|
"""Return the mac address of the client."""
|
||||||
return self.device.ip_address
|
return self.device.ip_address
|
||||||
|
|
||||||
|
@ -60,9 +60,9 @@ class Device:
|
|||||||
return self._params.get("host-name", self.mac)
|
return self._params.get("host-name", self.mac)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ip_address(self) -> str:
|
def ip_address(self) -> str | None:
|
||||||
"""Return device primary ip address."""
|
"""Return device primary ip address."""
|
||||||
return self._params["address"]
|
return self._params.get("address")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def mac(self) -> str:
|
def mac(self) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user