eufy-mega / model/capabilities / LightActions
Type Alias: LightActions
type LightActions = object;Bound spotlight / floodlight controls — the object returned by dev.light().
Properties
brightness?
readonly optional brightness?: number;Manual brightness 1-100 (property brightness).
isOn?
readonly optional isOn?: boolean;Whether the light is on (property light).
Methods
off()
off(): Promise<void>;Turn the light off. Throws if this model's switch wire is unverified.
Returns
Promise<void>
on()
on(): Promise<void>;Turn the light on. Throws if this model's switch wire is unverified.
Returns
Promise<void>
set()
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()
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?
Returns
Promise<void>
setBrightness()
setBrightness(n): Promise<void>;Set brightness, 1–100.
Parameters
n
number
Returns
Promise<void>
setColorTemp()
setColorTemp(n): Promise<void>;Set color temperature, 0 (warm) – 100 (cool).
Parameters
n
number
Returns
Promise<void>
setEnabled()
setEnabled(on): Promise<void>;Enable/disable the spotlight master switch.
Parameters
on
boolean
Returns
Promise<void>