Skip to content

Clarify intentional event.data check in handle_vacuum_start#399

Merged
sca075 merged 1 commit intodevfrom
copilot/sub-pr-396-again
Dec 14, 2025
Merged

Clarify intentional event.data check in handle_vacuum_start#399
sca075 merged 1 commit intodevfrom
copilot/sub-pr-396-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 14, 2025

Breaking change

Proposed change

Addresses review feedback from #396 regarding the if event.data: check in handle_vacuum_start. The check is intentional - reset_trims() should only be called when event data is present to avoid unnecessary resets.

async def handle_vacuum_start(self, event):
    """Handle the event_vacuum_start event."""
    if event.data:  # Intentional: only reset when data present
        self.context.shared.reset_trims()  # requires valetudo_map_parser >0.1.9b41

No code changes required - this PR documents the design decision.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to our integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • The code has been formatted using Ruff (ruff format)
  • The code has been been check with pylint.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

  • Documentation added/updated.

If the code communicates uses new third-party tools or libraries:

  • New or updated dependencies have been added to manifest.json.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Ensure your pull request is based on the dev branch, not main.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 14, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Update code quality improvements and dataclass configurations Clarify intentional event.data check in handle_vacuum_start Dec 14, 2025
Copilot AI requested a review from sca075 December 14, 2025 14:08
@sca075 sca075 marked this pull request as ready for review December 14, 2025 14:11
@sca075 sca075 merged commit 98da7ce into dev Dec 14, 2025
4 checks passed
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.

2 participants