Skip to content

Default to status command in cli, fix deprecated click usage#2086

Merged
rytilahti merged 1 commit into
masterfrom
fix/cli-device-group
Jul 22, 2026
Merged

Default to status command in cli, fix deprecated click usage#2086
rytilahti merged 1 commit into
masterfrom
fix/cli-device-group

Conversation

@rytilahti

@rytilahti rytilahti commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Makes the cli a bit more user-friendly by executing status when no command is given and fixes a deprecation warning from click.

  • When a device exposes a status command and no subcommand is specified, invoke status automatically
  • Replace click.MultiCommand with click.Group to remove deprecation warning

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 20.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.35%. Comparing base (fdefe65) to head (ae59163).

Files with missing lines Patch % Lines
miio/click_common.py 20.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2086      +/-   ##
==========================================
- Coverage   84.37%   84.35%   -0.03%     
==========================================
  Files         201      201              
  Lines       20370    20377       +7     
  Branches     1077     1079       +2     
==========================================
+ Hits        17187    17188       +1     
- Misses       2993     2999       +6     
  Partials      190      190              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@rytilahti
rytilahti force-pushed the fix/cli-device-group branch 2 times, most recently from fc026b3 to 7ffa64d Compare July 21, 2026 23:20
- Use click.Group instead of the deprecated click.MultiCommand
- Invoke status automatically when no subcommand is specified
@rytilahti
rytilahti force-pushed the fix/cli-device-group branch from 7ffa64d to ae59163 Compare July 21, 2026 23:23
@rytilahti rytilahti changed the title Replace deprecated MultiCommand with Group, default to status command Default to status command in cli, fix deprecated click usage Jul 22, 2026
@rytilahti
rytilahti merged commit 34dd0e9 into master Jul 22, 2026
12 of 14 checks passed
@rytilahti
rytilahti deleted the fix/cli-device-group branch July 22, 2026 16:51
@rytilahti rytilahti added the bug label Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant