Skip to content

Remove deprecated support for lock sensors and corresponding actions in lcn #147143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

alengwenus
Copy link
Contributor

@alengwenus alengwenus commented Jun 19, 2025

Breaking change

The binary sensors and actions for the lock states of regulators and the lock states of keys have been removed from the LCN integration. They have been replaced by the corresponding switch entities.

Proposed change

Support for binary sensors and the corresponding actions for the lock states of regulators and the lock states of keys have been marked deprecated in #35103.

Instead switch entities were added which also allow for setting the lock state.

Functionality for adding the binary sensor entities are removed from the LCN configuration frontend. For this the lcn-frontend package has to be bumped to the latest version:

Release notes: https://github.com/alengwenus/lcn-frontend/releases
Code changes: alengwenus/lcn-frontend@0.2.5...0.2.6

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

  • 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.

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:

@alengwenus alengwenus changed the title Remove deprecated support for lock sensors and corresponding actions Remove deprecated support for lock sensors and corresponding actions in lcn Jun 19, 2025
@alengwenus alengwenus force-pushed the dev-lcn-remove-lock-sensors branch from ab262fd to 95fc4d8 Compare June 19, 2025 15:59
@@ -8,5 +8,5 @@
"documentation": "https://www.home-assistant.io/integrations/lcn",
"iot_class": "local_push",
"loggers": ["pypck"],
"requirements": ["pypck==0.8.8", "lcn-frontend==0.2.5"]
"requirements": ["pypck==0.8.8", "lcn-frontend==0.2.6"]
Copy link
Member

Choose a reason for hiding this comment

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

Why do we bump this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The frontend allows you to configure the sensors that have now been removed. Accordingly, the frontend also had to be adapted.
I could put it in a separate PR if you prefer. I just thought that it was part of the changes in this PR.

Comment on lines 268 to 294
class LockRegulator(LcnServiceCall):
"""Locks a regulator setpoint."""

schema = LcnServiceCall.schema.extend(
{
vol.Required(CONF_SETPOINT): vol.All(vol.Upper, vol.In(SETPOINTS)),
vol.Optional(CONF_STATE, default=False): bool,
}
)

async def async_call_service(self, service: ServiceCall) -> None:
"""Execute service call."""
setpoint = pypck.lcn_defs.Var[service.data[CONF_SETPOINT]]
state = service.data[CONF_STATE]

reg_id = pypck.lcn_defs.Var.to_set_point_id(setpoint)
device_connection = self.get_device_connection(service)
await device_connection.lock_regulator(reg_id, state)
Copy link
Member

Choose a reason for hiding this comment

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

Did we deprecate this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, you are right. I reverted those changes and will set up a separate PR to first deprecate the actions.

@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.

@home-assistant home-assistant bot marked this pull request as draft June 20, 2025 11:36
@alengwenus alengwenus force-pushed the dev-lcn-remove-lock-sensors branch 3 times, most recently from e3ce811 to 8128970 Compare June 20, 2025 13:35
@alengwenus alengwenus marked this pull request as ready for review June 20, 2025 14:01
@home-assistant home-assistant bot requested a review from joostlek June 20, 2025 14:01
@alengwenus alengwenus force-pushed the dev-lcn-remove-lock-sensors branch 2 times, most recently from bb99d72 to 67323a8 Compare June 23, 2025 15:33
@alengwenus alengwenus force-pushed the dev-lcn-remove-lock-sensors branch from 67323a8 to c964579 Compare June 25, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants