From 0d1193ac71b05ecd498491a4f199d1a2340c450c Mon Sep 17 00:00:00 2001 From: "Steven B." <51370195+sdb9696@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:38:41 +0000 Subject: [PATCH] Update cli feature command for actions not to require a value (#1264) --- kasa/cli/feature.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kasa/cli/feature.py b/kasa/cli/feature.py index 2c5fa045..522dee7f 100644 --- a/kasa/cli/feature.py +++ b/kasa/cli/feature.py @@ -122,6 +122,12 @@ async def feature( feat = dev.features[name] + if value is None and feat.type is Feature.Type.Action: + echo(f"Executing action {name}") + response = await dev.features[name].set_value(value) + echo(response) + return response + if value is None: unit = f" {feat.unit}" if feat.unit else "" echo(f"{feat.name} ({name}): {feat.value}{unit}")