From 524696dd871c87585e996593b382599643637f95 Mon Sep 17 00:00:00 2001 From: Teemu Rytilahti Date: Fri, 3 Jan 2025 19:58:09 +0100 Subject: [PATCH] Use repr() for enum values in Feature.__repr__ --- kasa/feature.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kasa/feature.py b/kasa/feature.py index ff19baf9..456a3e63 100644 --- a/kasa/feature.py +++ b/kasa/feature.py @@ -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}"