Skip to content

Commit f0058e6

Browse files
authored
Update LinkPlayBridge to add mac property (#73)
1 parent 0c83bb3 commit f0058e6

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/linkplay/bridge.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ def playmode_support(self) -> list[PlayingMode]:
6969
playing_modes.insert(0, PlayingMode.NETWORK) # always supported
7070
return playing_modes
7171

72+
@property
73+
def mac(self) -> str | None:
74+
"""Returns the mac address."""
75+
mac = self.properties.get(DeviceAttribute.ETH_MAC)
76+
if mac == "00:00:00:00:00:00" or mac is None:
77+
mac = self.properties.get(DeviceAttribute.STA_MAC)
78+
if mac == "00:00:00:00:00:00" or mac is None:
79+
mac = self.properties.get(DeviceAttribute.MAC)
80+
return mac
81+
7282
@property
7383
def eth(self) -> str | None:
7484
"""Returns the ethernet address."""

0 commit comments

Comments
 (0)