Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
github-actions[bot] edited this page Aug 11, 2023 · 51 revisions

Class: Light

Hierarchy

  • ArcheTypeResource<Light>

    Light

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new Light(bridge, data)

Parameters

Name Type
bridge Hue
data LightGet & { metadata: { archetype: ArcheType ; name: string } }

Inherited from

ArcheTypeResource<ResourceType.Light>.constructor

Defined in

src/structures/ArcheTypeResource.ts:15

Properties

data

data: LightGet & { metadata: { archetype: ArcheType ; name: string } }

Inherited from

ArcheTypeResource.data

Defined in

src/structures/ArcheTypeResource.ts:13


hue

Readonly hue: Hue

Inherited from

ArcheTypeResource.hue

Defined in

src/structures/Resource.ts:51


type

type: ResourceType = ResourceType.Light

Overrides

ArcheTypeResource.type

Defined in

src/structures/Light.ts:76

Accessors

archeType

get archeType(): ArcheType

Returns

ArcheType

Inherited from

ArcheTypeResource.archeType

Defined in

src/structures/ArcheTypeResource.ts:20


brightness

get brightness(): undefined | number

Returns

undefined | number

Defined in

src/structures/Light.ts:86


color

get color(): undefined | XyPoint

Returns

undefined | XyPoint

Defined in

src/structures/Light.ts:106


colorTemperature

get colorTemperature(): undefined | number

Returns

undefined | number

Defined in

src/structures/Light.ts:94


gamut

get gamut(): undefined | Gamut

Returns

undefined | Gamut

Defined in

src/structures/Light.ts:130


gradient

get gradient(): undefined | XyPoint[]

Returns

undefined | XyPoint[]

Defined in

src/structures/Light.ts:136


id

get id(): string

Returns

string

Inherited from

ArcheTypeResource.id

Defined in

src/structures/Resource.ts:56


identifier

get identifier(): ResourceIdentifier<ResourceType>

Returns

ResourceIdentifier<ResourceType>

Inherited from

ArcheTypeResource.identifier

Defined in

src/structures/Resource.ts:60


manager

get manager(): LightManager

Returns

LightManager

Overrides

ArcheTypeResource.manager

Defined in

src/structures/Light.ts:78


maxColorTemperature

get maxColorTemperature(): undefined | number

Returns

undefined | number

Defined in

src/structures/Light.ts:102


maxGamutBlue

get maxGamutBlue(): undefined | XyPoint

Returns

undefined | XyPoint

Defined in

src/structures/Light.ts:124


maxGamutGreen

get maxGamutGreen(): undefined | XyPoint

Returns

undefined | XyPoint

Defined in

src/structures/Light.ts:118


maxGamutRed

get maxGamutRed(): undefined | XyPoint

Returns

undefined | XyPoint

Defined in

src/structures/Light.ts:112


minBrightnessLevel

get minBrightnessLevel(): undefined | number

Returns

undefined | number

Defined in

src/structures/Light.ts:90


minColorTemperature

get minColorTemperature(): undefined | number

Returns

undefined | number

Defined in

src/structures/Light.ts:98


mode

get mode(): LightMode

Returns

LightMode

Defined in

src/structures/Light.ts:140


name

get name(): string

Returns

string

Inherited from

ArcheTypeResource.name

Defined in

src/structures/NamedResource.ts:20

Methods

_clone

_clone(): Light

Returns

Light

Inherited from

ArcheTypeResource._clone

Defined in

src/structures/Resource.ts:77


_patch

_patch(data): void

Parameters

Name Type
data Partial<LightGet>

Returns

void

Inherited from

ArcheTypeResource._patch

Defined in

src/structures/Resource.ts:73


_update

_update(data): Light

Parameters

Name Type
data Partial<LightGet>

Returns

Light

Inherited from

ArcheTypeResource._update

Defined in

src/structures/Resource.ts:81


colorInRange

colorInRange(color): undefined | boolean

Parameters

Name Type
color XyPoint

Returns

undefined | boolean

Defined in

src/structures/Light.ts:172


colorToRange

colorToRange(color): undefined | XyPoint

Parameters

Name Type
color XyPoint

Returns

undefined | XyPoint

Defined in

src/structures/Light.ts:176


edit

edit(options): Promise<void>

Parameters

Name Type
options LightEditOptions

Returns

Promise<void>

Overrides

ArcheTypeResource.edit

Defined in

src/structures/Light.ts:188


effect

effect(effect): Promise<void>

Parameters

Name Type
effect undefined | LightEffect

Returns

Promise<void>

Defined in

src/structures/Light.ts:156


isCapableOfColor

isCapableOfColor(): this is Light & LightIsCapableOfColor

Returns

this is Light & LightIsCapableOfColor

Defined in

src/structures/Light.ts:200


isCapableOfColorTemperature

isCapableOfColorTemperature(): this is Light & LightIsCapableOfColorTemperature

Returns

this is Light & LightIsCapableOfColorTemperature

Defined in

src/structures/Light.ts:196


isCapableOfDimming

isCapableOfDimming(): this is Light & LightIsCapableOfDimming

Returns

this is Light & LightIsCapableOfDimming

Defined in

src/structures/Light.ts:192


isCapableOfGradient

isCapableOfGradient(): this is Light & LightIsCapableOfGradient

Returns

this is Light & LightIsCapableOfGradient

Defined in

src/structures/Light.ts:204


isOn

isOn(): boolean

Returns

boolean

Defined in

src/structures/Light.ts:82


isType

isType<T>(type): this is NarrowResource<T>

Type parameters

Name Type
T extends ResourceType

Parameters

Name Type
type T

Returns

this is NarrowResource<T>

Inherited from

ArcheTypeResource.isType

Defined in

src/structures/Resource.ts:69


off

off(duration?): Promise<void>

Parameters

Name Type
duration? number

Returns

Promise<void>

Defined in

src/structures/Light.ts:148


on

on(duration?): Promise<void>

Parameters

Name Type
duration? number

Returns

Promise<void>

Defined in

src/structures/Light.ts:144


setArcheType

setArcheType(archeType): Promise<void>

Parameters

Name Type
archeType ArcheType

Returns

Promise<void>

Inherited from

ArcheTypeResource.setArcheType

Defined in

src/structures/ArcheTypeResource.ts:24


setBrightness

setBrightness(brightness, duration?): Promise<void>

Parameters

Name Type
brightness undefined | number
duration? number

Returns

Promise<void>

Defined in

src/structures/Light.ts:164


setColor

setColor(color, duration?): Promise<void>

Parameters

Name Type
color undefined | XyPoint
duration? number

Returns

Promise<void>

Defined in

src/structures/Light.ts:180


setGradient

setGradient(gradient, duration?): Promise<void>

Parameters

Name Type
gradient undefined | XyPoint[]
duration? number

Returns

Promise<void>

Defined in

src/structures/Light.ts:184


setMirek

setMirek(mirek, duration?): Promise<void>

Parameters

Name Type
mirek undefined | number
duration? number

Returns

Promise<void>

Defined in

src/structures/Light.ts:168


setName

setName(name): Promise<void>

Parameters

Name Type
name string

Returns

Promise<void>

Inherited from

ArcheTypeResource.setName

Defined in

src/structures/NamedResource.ts:28


timedEffect

timedEffect(timedEffects): Promise<void>

Parameters

Name Type
timedEffects undefined | { duration?: number ; effect?: LightTimedEffect }

Returns

Promise<void>

Defined in

src/structures/Light.ts:160


toggle

toggle(duration?): Promise<void>

Parameters

Name Type
duration? number

Returns

Promise<void>

Defined in

src/structures/Light.ts:152

hue.ts

Clone this wiki locally