Skip to content

Conversation

@alengwenus
Copy link
Contributor

@alengwenus alengwenus commented Nov 18, 2025

Breaking change

Proposed change

Underlying package for lcn integration (pypck) supports strict typing in latest version. Fixed integration code and set the strict-typing flag in quality_scale.yaml.

Dependency upgrade of pypck:

Release notes: https://github.com/alengwenus/pypck/releases
Code changes: https://github.com/alengwenus/pypck/compare/0.9.3..0.9.4

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing 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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • 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.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

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

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

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 enables strict typing for the LCN integration by upgrading the underlying pypck library from version 0.9.3 to 0.9.4, which now supports strict typing. The changes include updating type annotations throughout the integration to satisfy type checkers and marking the strict-typing quality scale rule as complete.

Key Changes:

  • Upgraded pypck dependency to version 0.9.4 across all requirement files
  • Added explicit type annotations to function parameters and class attributes
  • Replaced generic dict types with dict[str, Any] for better type safety
  • Converted climate entity properties to use _attr_* pattern for consistency

Reviewed Changes

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

Show a summary per file
File Description
requirements_test_all.txt Updated pypck version to 0.9.4 for test dependencies
requirements_all.txt Updated pypck version to 0.9.4 for runtime dependencies
manifest.json Updated pypck requirement version in integration manifest
quality_scale.yaml Marked strict-typing rule as complete
websocket.py Added explicit dict[str, Any] type annotations to message parameters
sensor.py Added type annotation for source attribute
helpers.py Fixed InputType alias and improved device_name null handling
entity.py Added explicit callable signature for _unregister_for_inputs
cover.py Added comprehensive type annotations for coroutines and attributes
config_flow.py Added explicit dict[str, Any] type annotation
climate.py Migrated to _attr_* pattern and added explicit float conversions
init.py Added specific input type annotations and cast for KeyAction

Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

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

Thanks for bumping the dependency! However, could you please update the PR description to contain at least one (or multiple) of the following:

  • A link to the release notes of this package version, and all versions in between.
  • A link to the changelog of this package.
  • A link to a Git(Hub) diff/compare view from the current version to the bumped version.

This allows us to review upstream changes, which is needed to decide this change is working as intended and/or if we can include it in, for example, a patch release of Home Assistant.

Thanks already! 👍

@home-assistant home-assistant bot marked this pull request as draft November 18, 2025 12:37
@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@alengwenus alengwenus force-pushed the dev-lcn-fix-typing branch 2 times, most recently from c49f172 to 44e43d9 Compare November 18, 2025 14:41
@alengwenus alengwenus changed the title Strict typing to lcn integration Strict typing for lcn integration Nov 18, 2025
@alengwenus alengwenus marked this pull request as ready for review November 18, 2025 16:46
@home-assistant home-assistant bot requested a review from joostlek November 18, 2025 16:46
@joostlek joostlek merged commit 7f14d01 into home-assistant:dev Nov 18, 2025
67 checks passed
@alengwenus alengwenus deleted the dev-lcn-fix-typing branch November 18, 2025 21:04
"loggers": ["pypck"],
"quality_scale": "bronze",
"requirements": ["pypck==0.9.3", "lcn-frontend==0.2.7"]
"requirements": ["pypck==0.9.4", "lcn-frontend==0.2.7"]
Copy link
Member

Choose a reason for hiding this comment

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

mypkg isn't the name of the library package:

alengwenus/pypck@fd06c94

It should be pypck.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I messed that up. I fixed it here: #156847

@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants