Skip to content

eufy-mega / model/capabilities / SmartLightActions

Type Alias: SmartLightActions

ts
type SmartLightActions = object;

Bound smart_light controls — the object returned by dev.smartLight().

Properties

brightness?

ts
readonly optional brightness?: number;

Brightness 0-100. Persists across off — it is the configured level, not the live output.


cloudEffectId?

ts
readonly optional cloudEffectId?: number;

The currently-RUNNING gallery effect id; 0 when no effect is active.


colorGradient?

ts
readonly optional colorGradient?: boolean;

Whether colour-gradient mixing is enabled.


effectId?

ts
readonly optional effectId?: number;

The selected gallery effect id.


lightLength?

ts
readonly optional lightLength?: number;

Number of addressable segments the strip reports.


power?

ts
readonly optional power?: boolean;

Whether the light is on.

Methods

off()

ts
off(): Promise<void>;

Turn the light off.

Returns

Promise<void>


on()

ts
on(): Promise<void>;

Turn the light on.

Returns

Promise<void>


refreshState()

ts
refreshState(): Promise<void>;

Ask the device to report its current state. The reply arrives asynchronously and refreshes the getters below; it does not resolve with the state.

Returns

Promise<void>


setBrightness()

ts
setBrightness(level): Promise<void>;

Set brightness, 0-100.

Parameters

level

number

Returns

Promise<void>


setEffect()

ts
setEffect(lightId): Promise<void>;

Select a light-effect gallery entry by its catalog lightId. The effect's layer definition is fetched from the cloud catalog and serialized by the transport; if the catalog entry carries an overall brightness, a companion brightness frame follows. Colours are an RGBCW approximation (exact on primaries) — see the module doc. Gated to the models whose effect encoding is confirmed; rejects on any other T8L0x member rather than send one model's bytes to a family that encodes the effect differently.

Parameters

lightId

number

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.