Skip to content

Commit 3f9376f

Browse files
authored
feat: Add current level startup to all IKEA TRADFRI lights (#8049)
* added current level startup to ikea LED2005R5/LED2106R3 * moved current level startup to ikeaLight
1 parent 047cfc0 commit 3f9376f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/ikea.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ const bulbOnEvent: OnEvent = async (type, data, device, options, state: KeyValue
9090

9191
export function ikeaLight(args?: Omit<LightArgs, 'colorTemp'> & {colorTemp?: true | {range: Range; viaColor: true}}) {
9292
const colorTemp: {range: Range} = args?.colorTemp ? (args.colorTemp === true ? {range: [250, 454]} : args.colorTemp) : undefined;
93-
const result = lightDontUse({...args, colorTemp});
93+
const levelConfig: {disabledFeatures?: string[]} = args?.levelConfig
94+
? args.levelConfig
95+
: {disabledFeatures: ['on_off_transition_time', 'on_transition_time', 'off_transition_time', 'on_level']};
96+
const result = lightDontUse({...args, colorTemp, levelConfig});
9497
result.ota = ikea;
9598
result.onEvent = bulbOnEvent;
9699
if (isObject(args?.colorTemp) && args.colorTemp.viaColor) {

0 commit comments

Comments
 (0)