eufy-mega / model/capabilities / resolveHits
Function: resolveHits()
ts
function resolveHits(hits, capabilities?): EventHit[];Pick the mapping that belongs to THIS device when several families claim the same id.
With one candidate there is nothing to resolve — emit it, so a device whose capabilities can't be resolved keeps working exactly as before. With several, the device's own capability set decides; if that isn't known, the SDK emits NOTHING rather than guessing, because naming the wrong event (a tamper reported as a battery alert) is worse than staying silent about it.
Parameters
hits
EventHit[]
capabilities?
ReadonlySet<Capability>
Returns
EventHit[]