Fix Arlo Q not working with 0.48.1 #8446
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
This change will re-enable the functionality for Arlo Q cameras.
When we added the code to enable/disable motion detection, we assumed that base station will be present for all arlo type of cameras. But found recently that Arlo Q cameras does not have base station. So, removed the base_station dependency in the init code. Line 52 in the init code was the cause of Arlo Q not working which has been removed now.
Instead added code in enable/disable motion detection code to first check if base station is detected by library. If base station is detected then it will use it to enable the motion detection. If not detected, even if service was called, it will not do anything (For example, if some one has only Arlo Q cameras, then base station will not be detected, then even if they run the 'enable_motion_detection' service, it will not do anything). This change will also make sure that Enable/Disable motion detection service continues to work for Arlo and Arlo Pro cameras which have base station. Tested with the Arlo cameras that I have at my home.
Enabling/disabling the motion detection for Arlo Q cameras (assuming it has that capability) will not work for this type of camera yet. It has to be added by someone who has that camera, as I don't know the protocol nor have that camera to do that.
Related issue (if applicable): fixes #8412
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass