Get area and floor by alias
Proposed change
Add ability to get area and floor by alias, when using corresponding get_$_by_name function.
This is another take on changes, proposed in this PR by @synesthesiam
Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [x] 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: https://github.com/home-assistant/home-assistant.io/pull/34846
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [x] I have followed the development checklist
- [x] I have followed the perfect PR recommendations
- [x] The code has been formatted using Ruff (
ruff format homeassistant tests) - [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [x] Documentation added/updated for www.home-assistant.io
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 runningpython3 -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:
- [x] I have reviewed two other open pull requests in this repository.
@balloob you commented on previous PR by Mike, could you check this one please?
@frenck @balloob sorry for ping - this was marked for 2024.12, but looks like didn't make it. Should i close PRs, or they'll be merged eventually?
Please be patient, I'm still in the process of trying to get the right people to look at it
Oh, it has been quite some time. And some changes along the way.
Still I think it looks OK.
But please make sure it merges cleanly on current dev and CI still passes.
Oh, it has been quite some time. And some changes along the way.
Still I think it looks OK.
But please make sure it merges cleanly on current dev and CI still passes.
Want me to merge dev?
Yes. It's been 4 months, there's been some changes, let's make sure CI still passes.
Yes. It's been 4 months, there's been some changes, let's make sure CI still passes.
Remember, that CI can fail randomly too :)
@arturpragacz your changes to the name normalization removed normalize_name method, that i used for aliases too. Should i use normalize_name from normalized_name_base_registry.py or create own (duplicated) implementation as in timers.py and intent.py?
Use the one from the registry.
Done.
Please be patient, I'm still in the process of trying to get the right people to look at it
Any news? :) Another month...
Hi there @formatBCE 👋
Thanks for the pull request. I've marked it as draft for a moment. I want to take this one into the core architectural meeting to check with the others. We had a discussion on the linked previous pull request by Mike, so I want to make sure all concerns are addressed in this pull request.
Will get back to you later this week 👍
../Frenck
Woohoo! Glad to help! :)