Skip to content

@mega-yfue/eufy-sdk / LightActions

Type Alias: LightActions

ts
type LightActions = Surface<typeof LIGHT_MEMBERS> & object;

Bound spotlight / floodlight controls — the object returned by dev.light().

The reads and their setters are DERIVED from LIGHT_MEMBERS: one declaration per feature gives the getter, the setter, its argument type and its description. Only what a member table cannot state is written out below.

Type Declaration

off()

ts
off(): Promise<void>;

Turn the light off. Throws if this model's switch wire is unverified.

Returns

Promise<void>

on()

ts
on(): Promise<void>;

Turn the light on. Throws if this model's switch wire is unverified.

Returns

Promise<void>

setAutoSpotlight()

ts
setAutoSpotlight(on, opts?): Promise<void>;

Enable/disable the motion-activated light (auto-spotlight): the spotlight lights up when the camera detects motion.

⚠️ This is a COMPOSITE write, and it is WRITE-ONLY: the setting is not reported back in the device's params, so the current config cannot be read and merged. Calling it with just on re-sends the DEFAULT brightness/auto-off/mode (AutoSpotlightOptions), overwriting whatever the user set. To preserve their config, pass the current values in opts. That is why this is a method and not a member — the caller must own the composite.

Parameters

on

boolean

opts?

AutoSpotlightOptions

Returns

Promise<void>

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.