-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Fix ONVIF config entry unique ID #36008
Fix ONVIF config entry unique ID #36008
Conversation
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.
For the future, please separate different fixes into different PRs. That will speed up review and time to merge.
Will do RE more than one issue in this PR. The second issue really only changed the schema for one step changing a |
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.
Great!
* fallback to device serial number if no mac available * make password optional to fix #35904 * update tests to reflect new flow * fix snake case and AsyncMock * add comments around why weird things are being done
Proposed change
Fixes issue where some ONVIF devices do not expose MAC address through the API. This falls back to the serial number as the config entry Unique ID, fixing #35883
While testing (adding and removing config entries after commenting out portions of code) I realized that the Event subscription is not ended properly when removing a config entry and will continue attempting to poll the device indefinitely until a Home Assistant reboot. A fix for that is also included in this PR.
While playing around in config flow, I also made password optional which fixes #35904
Type of change
Example entry for
configuration.yaml
:# Example configuration.yaml
Additional information
Checklist
black --fast 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
..coveragerc
.The integration reached or maintains the following Integration Quality Scale: