FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update cli feature command for actions not to require a value (#1264) · rytilahti/python-kasa@f639632 · GitHub

Repository navigation

Commit f639632

Browse files
authored andcommitted
Update cli feature command for actions not to require a value (python-kasa#1264)
1 parent 1d90b5a commit f639632

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎kasa/cli/feature.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ async def feature(
122122

123123
feat = dev.features[name]
124124

125+
if value is None and feat.type is Feature.Type.Action:
126+
echo(f"Executing action {name}")
127+
response = await dev.features[name].set_value(value)
128+
echo(response)
129+
return response
130+
125131
if value is None:
126132
unit = f" {feat.unit}" if feat.unit else ""
127133
echo(f"{feat.name} ({name}): {feat.value}{unit}")

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL