Skip to content

Commit 9a53618

Browse files
committed
make light adaptiveProfile type stricter
1 parent 4643e1e commit 9a53618

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## [Unreleased](https://github.com/lpgera/dirigera/compare/v1.8.0...HEAD)
44

5-
-
5+
- Update dependencies.
6+
- Add stricter typing for currently active adaptiveProfile of lights.
67

78
## [1.8.0](https://github.com/lpgera/dirigera/compare/v1.7.0...v1.8.0) - 2026-01-05
89

src/types/device/Light.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,8 @@ export interface Light extends Device {
3434
deviceType: 'light'
3535
attributes: LightAttributes
3636
isHidden: boolean
37-
adaptiveProfile: {}
37+
adaptiveProfile: {
38+
id?: string
39+
active?: boolean
40+
}
3841
}

test/responses/light.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ export const rgbLight: Light = {
5959
deviceSet: [],
6060
remoteLinks: ['00000000-0000-0000-0000-000000000000'],
6161
isHidden: false,
62-
adaptiveProfile: {},
62+
adaptiveProfile: {
63+
id: '00000000-0000-0000-0000-000000000000',
64+
active: true,
65+
},
6366
}
6467

6568
export const colorTemperatureLight: Light = {

0 commit comments

Comments
 (0)