Skip to content

Commit b9c973a

Browse files
committed
feat: Added __str__ to Light
1 parent c0d7633 commit b9c973a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/busylight_core/light.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,10 @@ def __repr__(self) -> str:
335335
e=self._exclusive,
336336
)
337337

338+
def __str__(self) -> str:
339+
"""Return a human-readable string representation of the light."""
340+
return f"{self.vendor()} {self.name}@{self.path}"
341+
338342
@cached_property
339343
def path(self) -> str:
340344
"""The path to the hardware device."""

0 commit comments

Comments
 (0)