-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Add switch entities for LCN key-locks and regulator-locks #127731
Conversation
3caf9e0
to
31c6d68
Compare
e4d9a4b
to
6e288dc
Compare
async_create_issue( | ||
self.hass, | ||
DOMAIN, | ||
"deprecated_regulatorlock_sensor", | ||
breaks_in_ha_version="2025.2.0", | ||
is_fixable=False, | ||
is_persistent=False, | ||
issue_domain=DOMAIN, | ||
severity=IssueSeverity.WARNING, | ||
translation_key="deprecated_regulatorlock_sensor", | ||
translation_placeholders={ | ||
"domain": DOMAIN, | ||
"integration_title": "LCN", | ||
}, | ||
) |
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.
We should rather check if they are used in automations and scripts and raise if they are
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.
Could you please give me a hint how to do that?
Would you also briefly explain to me, what's wrong about raising the issue at the moment when the entities are set up? Raising the issue should not only occur if the entities are used in automations and scripts but generally if they are used (even from the frontend)?
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.
We usually get more false positives for users and we want issues to be actionable, not a "hey, did you know that ...".
In the past we deprecated the harmony switch entities, I think that's quite a clean example. (It's already removed from the codebase, but the PRs are still there)
I can link when I finally booted my pc
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.
Thanks! I guess I found it here: #119206.
I'll implement it in the same way.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
6e288dc
to
a6fd202
Compare
async_create_issue( | ||
self.hass, | ||
DOMAIN, | ||
f"deprecated_binary_sensor_{self.entity_id}_{item}", |
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.
Let's not create an issue per item
Okay I just got the feedback from someone else that this was in the example I pointed at. Sorry for that :) |
Co-authored-by: Joost Lekkerkerker <[email protected]>
So, should I leave it as it is? |
I think we should remove the item, and I need to find a better example to point at haha |
Unfortunately I did not entirely remove all placeholder keys in |
Proposed change
The LCN system allows for disabling key press events and regulator activities (so called locks). So far, binary sensors were implemented to monitor these lock states.
This PR implements two switch entity classes which not only allow to monitor the status, but also allow to switch the locks on and off.
The old binary sensor entity classes are marked deprecated.
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: