Skip to content

@mega-yfue/eufy-sdk / 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 still gets the event. 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[]

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.