Skip to content

Comments

Use broad notification methods during initialize()#116

Open
ptarjan wants to merge 1 commit intomezz64:masterfrom
ptarjan:fix/use-broad-notification-methods
Open

Use broad notification methods during initialize()#116
ptarjan wants to merge 1 commit intomezz64:masterfrom
ptarjan:fix/use-broad-notification-methods

Conversation

@ptarjan
Copy link
Contributor

@ptarjan ptarjan commented Feb 15, 2026

Summary

  • initialize() was calling get_event_triggers() with the narrow default of {'center', 'HTTP'}, which misses events on NVRs that use record, email, or beep notification methods
  • This forced the Home Assistant integration to make a duplicate get_event_triggers() call with the broader set, adding an extra ~10s network round-trip during startup
  • Now uses VALID_NOTIFICATION_METHODS (all five methods) in the initial call so all events are discovered on the first fetch

Test plan

  • All existing tests pass (python -m pytest test/test_hikvision.py)
  • Manual test with NVR to verify events are detected on first call without needing a second fetch

🤖 Generated with Claude Code

initialize() was calling get_event_triggers() with the narrow default
of {'center', 'HTTP'}, which misses events on NVRs that use 'record',
'email', or 'beep' notification methods. This forced the Home Assistant
integration to make a duplicate get_event_triggers() call with the
broader set, adding an extra ~10s network round-trip during startup.

Use VALID_NOTIFICATION_METHODS (which includes all five methods) in
the initial call so all events are discovered on the first fetch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant