Move target selector extractor method to common module#148087
Conversation
| ) | ||
|
|
||
|
|
||
| def async_extract_referenced_entity_ids( |
There was a problem hiding this comment.
Likely there are some tests that should move to tests/helpers/test_selector.py
There was a problem hiding this comment.
The tests in test_service.py where not testing the moved method directly. Since they test methods that are still part of service.py, I've left them there.
I've now also added a new test to `test_target.py.
|
Is this actually necessary? I'm not sure how much of a better location |
I agree. If we do the move, we should move the shared target stuff to a new module |
This will also be used by I'll move it to |
| class ServiceTargetSelector: | ||
| @deprecated_class( | ||
| "homeassistant.helpers.target.TargetSelectorData", | ||
| breaks_in_ha_version="2026.2", |
There was a problem hiding this comment.
We should make the deprecation period a year since this is not something users can fix themselves
There was a problem hiding this comment.
makes sense. do we have any written guidelines on this?
emontnemery
left a comment
There was a problem hiding this comment.
LGTM, thanks @abmantis 👍
Can be merged when CI passes
Proposed change
Since this method will also be used by trigger.py in #148086, this PR moves it to a better common location.
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: