-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Deprecate tplink alarm button entities #126349
Conversation
Hey there @rytilahti, @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Could you post the yaml from both automations? Maybe we could extend the check. |
Also did your number entities stay the same after the change from Auto to Box? |
Hmm, maybe I should pull the number change into a separate PR to go in before this one. EDIT: #126397 opened to fix the number issue in a separate PR. Marking this as draft until it's merged. |
ad0dcbc
to
f1095a5
Compare
#126397 merged so marking this as ready again. Regarding the core function |
@@ -25,9 +31,19 @@ class TPLinkButtonEntityDescription( | |||
BUTTON_DESCRIPTIONS: Final = [ | |||
TPLinkButtonEntityDescription( | |||
key="test_alarm", | |||
deprecated_info=DeprecatedInfo( |
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.
I saw that you made the PR #125594 but for me it just seems overly complicated?
Should/Could async_check_create_deprecated
not be a simple helper function which you can run the entities through to deprecate them instead of moving it into the entity description and thus making it more complex (which I don't think is needed)
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.
I created home-assistant/architecture#1133 because I think this is a common pattern that could/should be provided by core.
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.
I know. My question is still why is this not just a simple helper instead of building this complex thing?
As that discussion is not close to be finalized I think we still need to address it here as this PR is ongoing.
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.
Moved reply to comment below
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.
I don't have strong feelings on where the DeprecatedInfo
gets stored. That should be worked out to a solution that everyone is ok with in home-assistant/architecture#1133
For the tplink
integration, its fine to move forward with this design and adapt to the final outcome of the arch discussion later. I don't want to hold this PR up as the new entity has already been merged in a previous PR and we need to give users proper notice that the other entity is going away.
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.
I'm fine with leaving that for the arch discussion to not block this PR 👍
The first one is referencing a device and not an entity so to also deprecate such it needs to use |
@gjohansson-ST and @bdraco answering both your questions here as they are related.
The logic here is adapted from a lutron PR that I was pointed towards as a good example of how to do this. I recently implemented this for ring also. The logic is:
Because of the logic in |
But you're not constructing it as I think a simple helper would do which;
|
That is essentially what it's doing. It's just that this integration already has centralised helper functions to determine whether to add entities or not and it creates them in Regarding adding the actual deprecation info to the entity description, I think this is actually a good thing rather than maintaining a separate list of description keys in the helper function, because everything is done declaratively in the same place rather than spreading logic regarding whether to create entities into different functions. |
There is an unrelated |
|
Tagging this since the new feature was already added and we are missing the deprecation of the old entities |
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
Breaking change
The alarm
button
entities have been migrated to thesiren
platform and will be removed from Home Assistant in 2025.4.0Proposed change
Mark the alarm button
stop_alarm
andtest_alarm
for deprecation in 2025.4.0Type 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: