Skip to content

Commit 91f847e

Browse files
committed
Update Stick properties mac_stick, mac_coordinator and name
1 parent 511fbae commit 91f847e

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

plugwise_usb/__init__.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,18 +130,27 @@ def hardware(self) -> str:
130130
return self._controller.hardware_stick
131131

132132
@property
133-
def mac_stick(self) -> str:
134-
"""MAC address of USB-Stick. Raises StickError is connection is missing."""
133+
def mac_stick(self) -> str | None:
134+
"""MAC address of USB-Stick.
135+
136+
Returns None when the connection to the Stick fails.
137+
"""
135138
return self._controller.mac_stick
136139

137140
@property
138-
def mac_coordinator(self) -> str:
139-
"""MAC address of the network coordinator (Circle+). Raises StickError is connection is missing."""
141+
def mac_coordinator(self) -> str | None:
142+
"""MAC address of the network coordinator (Circle+).
143+
144+
Returns none when there is no connection, not paired, not present in the network.
145+
"""
140146
return self._controller.mac_coordinator
141147

142148
@property
143-
def name(self) -> str:
144-
"""Return name of Stick."""
149+
def name(self) -> str | None:
150+
"""Return name of Stick.
151+
152+
Returns None when the connection to the Stick fails.
153+
"""
145154
return self._controller.stick_name
146155

147156
@property

0 commit comments

Comments
 (0)