Skip to content

Add device registration to the Nuki component#79806

Merged
pvizeli merged 6 commits into
home-assistant:devfrom
pree:feat/nuki/device-registration
Jan 26, 2023
Merged

Add device registration to the Nuki component#79806
pvizeli merged 6 commits into
home-assistant:devfrom
pree:feat/nuki/device-registration

Conversation

@pree
Copy link
Copy Markdown
Member

@pree pree commented Oct 7, 2022

Proposed change

Introduces device registrations for the Nuki entities, including the bridge.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • 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

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • 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.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@homeassistant
Copy link
Copy Markdown
Contributor

Hey there @pschmitt, @pvizeli, mind taking a look at this pull request as it has been labeled with an integration (nuki) you are listed as a code owner for? Thanks!

@pree
Copy link
Copy Markdown
Member Author

pree commented Oct 22, 2022

Anything missing for this PR to be reviewed?

@Nardol
Copy link
Copy Markdown
Contributor

Nardol commented Oct 27, 2022

Also the fact this PR is not being reviewed prevents the Nuki integration to have new entity naming style (#80021 )

Comment thread homeassistant/components/nuki/__init__.py Outdated
Comment thread homeassistant/components/nuki/__init__.py Outdated
@pvizeli
Copy link
Copy Markdown
Member

pvizeli commented Jan 25, 2023

@pree can you rebase it, so I can merge it?

@pree pree force-pushed the feat/nuki/device-registration branch from d1ec591 to 577510e Compare January 25, 2023 14:18
@pree
Copy link
Copy Markdown
Member Author

pree commented Jan 25, 2023

@pvizeli rebased

update_method=async_update_data,
# Polling interval. Will only be polled if there are subscribers.
update_interval=UPDATE_INTERVAL,
# Device registration for the bridge
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bridge (the 3.0 which is in sell now long time) can have more than 1 lock device. Does that still work?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mine has a lock + opener connected, that works. I guess the limitation here is that the integration can only connect to a single bridge, but since the integration can be created multiple times I don't see this as an issue.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just tried it with a mock API to have one opener and two locks, works flawlessly for me
image

@pvizeli pvizeli merged commit 484e73b into home-assistant:dev Jan 26, 2023
@pvizeli pvizeli added this to the 2023.2.0 milestone Jan 26, 2023
Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the comment in a new PR. Thanks!

Comment thread homeassistant/components/nuki/binary_sensor.py
@pree pree deleted the feat/nuki/device-registration branch January 26, 2023 12:10
balloob pushed a commit that referenced this pull request Jan 27, 2023
* Add device registration to the Nuki component

* Name is always given by the API

* implement pvizeli's suggestions

* switch device_registry to snake_case

* fix entity naming

* unify manufacturer names
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nuki not in device list for automations

7 participants