mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-01-09 14:27:10 +00:00
Use repr() for enum values in Feature.__repr__
This commit is contained in:
parent
11bc3322db
commit
524696dd87
@ -295,6 +295,8 @@ class Feature:
|
||||
if self.precision_hint is not None and isinstance(value, float):
|
||||
value = round(value, self.precision_hint)
|
||||
|
||||
if isinstance(value, Enum):
|
||||
value = repr(value)
|
||||
s = f"{self.name} ({self.id}): {value}"
|
||||
if self.unit is not None:
|
||||
s += f" {self.unit}"
|
||||
|
Loading…
Reference in New Issue
Block a user