Skip to content

Commit

Permalink
Fix printing of parameters for actions command
Browse files Browse the repository at this point in the history
  • Loading branch information
rytilahti committed Jan 14, 2023
1 parent 04893f8 commit 550cd96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion miio/integrations/genericmiot/genericmiot.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def pretty_actions(result: Dict[str, ActionDescriptor]):

out += f"\t{desc.id}\t\t{desc.name}"
if desc.inputs:
for idx, param in enumerate(desc.inputs, start=1):
for idx, input_ in enumerate(desc.inputs, start=1):
param = input_.extras[
"miot_property"
] # TODO: hack until descriptors get support for descriptions
param_desc = f"\n\t\tParameter #{idx}: {param.name} ({param.description}) ({param.format}) {param.pretty_input_constraints}"
out += param_desc

Expand Down

0 comments on commit 550cd96

Please sign in to comment.