Repository navigation
Conversation
SecuritySpy reports ptzcapabilities from the driver profile, so fixed cameras claim PTZ until "Disable PTZ" is ticked in their Device settings. Once it is, the buttons stopped being created but lingered in the registry as unavailable. Offline or vanished cameras keep theirs so an outage can't delete them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The problem
Fixed cameras get a full set of PTZ buttons. SecuritySpy reports
ptzcapabilitiesfrom the camera's driver profile, not a probe, so every Reolink or Dahua profile claims pan/tilt/zoom (61) whether or not the camera can move.Cause
The integration already creates buttons only for a non-zero capability, and the right fix is at the source: ticking Disable PTZ in the camera's Device settings makes SecuritySpy report 0 (verified on 6.21). But buttons created earlier then linger in the entity registry as unavailable, and nothing removes them.
Fix
The button platform now removes registry entries for buttons an online camera no longer reports, at setup. Offline or vanished cameras keep theirs, so an outage can't delete entities and their customisations. Pure decision helper with tests, a README note on the SecuritySpy setting, and a changelog entry under an unreleased 1.4.3.
Tested on a live SecuritySpy 6.21 with HA 2026.9.0: 42 stale buttons removed across six cameras, the four still reporting PTZ untouched.
🤖 Generated with Claude Code