Skip to content

Conversation

@ha-newbie
Copy link
Contributor

For the DEEBOT T50 OMNI (fd60kt), both enable and frequency must be specified simultaneously for the auto_empty command to be accepted. However, the current select entity only allows sending a single parameter, resulting in an error.

To pass multiple parameters to integration with a single selection, I modified the type to allow both dict and tuple. (due to the number of changes required, I didn't replace the tuples with dict) Since the integration side remains unchanged, this modification alone does not alter the behavior. For example, the following code will behave identically in either case.
options_fn=lambda cap: [get_name_key(freq) for freq in cap.types]

I think adding test is sufficient in integration, but if necessary, specific instructions would be helpful.
I'm not sure if this is the correct approach as code... Any advice would be appreciated.

Copilot AI review requested due to automatic review settings November 3, 2025 08:15
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.62%. Comparing base (68b0f61) to head (edcd2a4).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1286   +/-   ##
=======================================
  Coverage   94.62%   94.62%           
=======================================
  Files         149      149           
  Lines        5856     5857    +1     
  Branches      350      350           
=======================================
+ Hits         5541     5542    +1     
  Misses        253      253           
  Partials       62       62           

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR extends the auto-empty capability for the fd60kt device to support a new "MANUAL" frequency mode. The change allows the types field in CapabilityTypes to be either a tuple (existing behavior) or a dictionary mapping frequency values to their command parameters.

Key changes:

  • Added MANUAL frequency option to the auto_empty.Frequency enum
  • Extended CapabilityTypes to accept dict format for type definitions with associated parameters
  • Updated fd60kt device configuration to use dict-based types with enable/frequency parameters for each mode

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
deebot_client/events/auto_empty.py Added MANUAL frequency enum value
deebot_client/capabilities.py Extended types field to support dict format alongside existing tuple format
deebot_client/hardware/fd60kt.py Converted auto_empty types from tuple to dict format with enable/frequency parameters for each mode

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 3, 2025

CodSpeed Performance Report

Merging #1286 will not alter performance

Comparing ha-newbie:add_dict_to_types (edcd2a4) with dev (68b0f61)

Summary

✅ 107 untouched

@ha-newbie ha-newbie requested a review from Copilot November 4, 2025 03:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant