diff --git a/kasa/feature.py b/kasa/feature.py index 2000b21af..02c78b203 100644 --- a/kasa/feature.py +++ b/kasa/feature.py @@ -180,7 +180,16 @@ def __repr__(self): if self.type == Feature.Type.Choice: if not isinstance(choices, list) or value not in choices: - return f"Value {value} is not a valid choice ({self.id}): {choices}" + _LOGGER.warning( + "Invalid value for for choice %s (%s): %s not in %s", + self.name, + self.id, + value, + choices, + ) + return ( + f"{self.name} ({self.id}): invalid value '{value}' not in {choices}" + ) value = " ".join( [f"*{choice}*" if choice == value else choice for choice in choices] ) diff --git a/kasa/smart/modules/alarmmodule.py b/kasa/smart/modules/alarmmodule.py index a3c67ef2c..97bdcf78f 100644 --- a/kasa/smart/modules/alarmmodule.py +++ b/kasa/smart/modules/alarmmodule.py @@ -64,7 +64,7 @@ def _initialize_features(self): attribute_setter="set_alarm_volume", category=Feature.Category.Config, type=Feature.Type.Choice, - choices=["low", "high"], + choices=["low", "normal", "high"], ) ) self._add_feature(