@mega-yfue/eufy-sdk / MotionActions
Type Alias: MotionActions
type MotionActions = Surface<typeof MOTION_MEMBERS> & object;Bound motion controls — the object returned by dev.motion().
Type Declaration
sensitivityStep()
sensitivityStep(): number | undefined;Current detection-sensitivity step, 1 being the least sensitive.
Resolved through the same scale the write uses, because the id a device reports this on differs between scales and several devices report more than one of them — so a caller reading the raw param would have to know which one counts, and in which direction. undefined when the device has not reported yet, or reports a value no known ladder contains.
Returns
number | undefined
sensitivitySteps()
sensitivitySteps(): number | undefined;How many steps this device's picker offers, or undefined when its scale is not known.
Returns
number | undefined
setSensitivityStep()
setSensitivityStep(step): Promise<void>;Set the detection-sensitivity step, from 1 (least sensitive) up to sensitivitySteps.
A step, not a device value: the five device families this is captured on use four different command ids, three frame shapes and two opposite numeric directions, so a raw number means the opposite thing depending on what it is sent to. Step 1 is always the least sensitive.
Rejects a step outside the device's own range, and throws for a model whose scale has not been captured — a wrong id is a fire-and-forget no-op that would otherwise look like it worked.
Parameters
step
number
Returns
Promise<void>