eufy-mega / model/capabilities / SmartLightActions
Type Alias: SmartLightActions
type SmartLightActions = object;Bound smart_light controls — the object returned by dev.smartLight().
Properties
brightness?
readonly optional brightness?: number;Brightness 0-100. Persists across off — it is the configured level, not the live output.
cloudEffectId?
readonly optional cloudEffectId?: number;The currently-RUNNING gallery effect id; 0 when no effect is active.
colorGradient?
readonly optional colorGradient?: boolean;Whether colour-gradient mixing is enabled.
effectId?
readonly optional effectId?: number;The selected gallery effect id.
lightLength?
readonly optional lightLength?: number;Number of addressable segments the strip reports.
power?
readonly optional power?: boolean;Whether the light is on.
Methods
off()
off(): Promise<void>;Turn the light off.
Returns
Promise<void>
on()
on(): Promise<void>;Turn the light on.
Returns
Promise<void>
refreshState()
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()
setBrightness(level): Promise<void>;Set brightness, 0-100.
Parameters
level
number
Returns
Promise<void>
setEffect()
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>