-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
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
base: dev
Are you sure you want to change the base?
Remove deprecated support for lock sensors and corresponding actions in lcn #147143
Conversation
ab262fd
to
95fc4d8
Compare
@@ -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"] |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we deprecate this?
There was a problem hiding this comment.
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.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
e3ce811
to
8128970
Compare
bb99d72
to
67323a8
Compare
67323a8
to
c964579
Compare
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
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: