core icon indicating copy to clipboard operation
core copied to clipboard

Get area and floor by alias

Open formatBCE opened this issue 1 year ago • 1 comments

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:

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 running python3 -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:

formatBCE avatar Sep 17 '24 20:09 formatBCE

@balloob you commented on previous PR by Mike, could you check this one please?

formatBCE avatar Sep 17 '24 20:09 formatBCE

@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?

formatBCE avatar Jan 25 '25 23:01 formatBCE

Please be patient, I'm still in the process of trying to get the right people to look at it

joostlek avatar Jan 25 '25 23:01 joostlek

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.

arturpragacz avatar Jan 26 '25 00:01 arturpragacz

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?

formatBCE avatar Jan 26 '25 00:01 formatBCE

Yes. It's been 4 months, there's been some changes, let's make sure CI still passes.

arturpragacz avatar Jan 26 '25 00:01 arturpragacz

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 :)

formatBCE avatar Jan 26 '25 00:01 formatBCE

@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?

formatBCE avatar Jan 26 '25 04:01 formatBCE

Use the one from the registry.

arturpragacz avatar Jan 26 '25 20:01 arturpragacz

Done.

formatBCE avatar Jan 27 '25 05:01 formatBCE

Please be patient, I'm still in the process of trying to get the right people to look at it

Any news? :) Another month...

formatBCE avatar Feb 25 '25 20:02 formatBCE

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

frenck avatar Mar 02 '25 14:03 frenck

Woohoo! Glad to help! :)

formatBCE avatar Mar 27 '25 12:03 formatBCE