Skip to content

eufy-mega / model/capabilities / LightActions

Type Alias: LightActions

ts
type LightActions = object;

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

Properties

brightness?

ts
readonly optional brightness?: number;

Manual brightness 1-100 (property brightness).


isOn?

ts
readonly optional isOn?: boolean;

Whether the light is on (property light).

Methods

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>


set()

ts
set(on): Promise<void>;

Set the light on/off. Throws if this model's switch wire is unverified.

Parameters

on

boolean

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's why this is a method (not a bare bool property) — the caller must own the composite.

Parameters

on

boolean

opts?

AutoSpotlightOptions

Returns

Promise<void>


setBrightness()

ts
setBrightness(n): Promise<void>;

Set brightness, 1–100.

Parameters

n

number

Returns

Promise<void>


setColorTemp()

ts
setColorTemp(n): Promise<void>;

Set color temperature, 0 (warm) – 100 (cool).

Parameters

n

number

Returns

Promise<void>


setEnabled()

ts
setEnabled(on): Promise<void>;

Enable/disable the spotlight master switch.

Parameters

on

boolean

Returns

Promise<void>

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