NEWS
SONOFF NSPanel mit Lovelace UI (TypeScript Version)
-
Ich hab heute den Javascript-Adapter von v9.3.1 auf v10.0.0 geupdatet, danach liefen die Scripte für die NSPanel nicht mehr.
Bin mit den NSPanel auf den aktuellen Versionen. Mit dem Javascript-Adapter kommen beim Start des Script die Fehlermeldungen:Compiling TypeScript source javascript.0 14:58:53.843 error TypeScript compilation failed: .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. function addDimTime(strTime) { ^ ERROR: Parameter 'strTime' implicitly has an 'any' type. function isDimTimeInRange(strLower, strUpper) { ^ ERROR: Parameter 'strLower' implicitly has an 'any' type. function isDimTimeInRange(strLower, strUpper) { ^ ERROR: Parameter 'strUpper' implicitly has an 'any' type. .concat(NSPanel_Path + 'NSPanel_Dimmode_brightnessDay') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'NSPanel_Dimmode_brightnessNight') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'ScreensaverInfo.activeBrightness') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'ScreensaverInfo.activeDimmodeBrightness') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'Relay.1') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'Relay.2') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'ActivePage.id0'), ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. on({ id: config.mrIcon1ScreensaverEntity.ScreensaverEntity, change: 'ne' }, async function () { ^ ERROR: No overload matches this call. Overload 1 of 4, '(pattern: string | RegExp | string[], handler: StateChangeHandler<any, any>): any', gave the following error. Object literal may only specify known properties, and 'id' does not exist in type 'RegExp | string[]'. Overload 2 of 4, '(astroOrScheduleOrOptions: AstroSchedule | SubscribeTime | SubscribeOptions, handler: StateChangeHandler<any, any>): any', gave the following error. Type 'string | null' is not assignable to type 'string | RegExp | string[] | SubscribeOptions[] | RegExp[] | undefined'. Type 'null' is not assignable to type 'string | RegExp | string[] | SubscribeOptions[] | RegExp[] | undefined'. Overload 3 of 4, '(id1: string, id2: string): void', gave the following error. Argument of type '{ id: string | null; change: string; }' is not assignable to parameter of type 'string'. on({ id: config.mrIcon2ScreensaverEntity.ScreensaverEntity, change: 'ne' }, async function () { ^ ERROR: No overload matches this call. Overload 1 of 4, '(pattern: string | RegExp | string[], handler: StateChangeHandler<any, any>): any', gave the following error. Object literal may only specify known properties, and 'id' does not exist in type 'RegExp | string[]'. Overload 2 of 4, '(astroOrScheduleOrOptions: AstroSchedule | SubscribeTime | SubscribeOptions, handler: StateChangeHandler<any, any>): any', gave the following error. Type 'string | null' is not assignable to type 'string | RegExp | string[] | SubscribeOptions[] | RegExp[] | undefined'. Type 'null' is not assignable to type 'string | RegExp | string[] | SubscribeOptions[] | RegExp[] | undefined'. Overload 3 of 4, '(id1: string, id2: string): void', gave the following error. Argument of type '{ id: string | null; change: string; }' is not assignable to parameter of type 'string'. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. tempId = activePage!.items[tempPageItem[0]].id; ^ ERROR: Element implicitly has an 'any' type because index expression is not of type 'number'. let buttonConfig: NSPanel.ConfigButtonFunction = config[method]; ^ ERROR: Element implicitly has an 'any' type because expression of type 'EventMethod' can't be used to index type 'Config'. Property 'startup' does not exist on type 'Config'. function GeneratePageElements(page: PageType): string { ^ ERROR: Function lacks ending return statement and return type does not include 'undefined'. let name = page.heading !== undefined ? page.heading : o.common.name && typeof o.common.name === 'object' ? o.common.name.de : o.common.name; ^ ERROR: 'o.common' is possibly 'undefined'. let name = page.heading !== undefined ? page.heading : o.common.name && typeof o.common.name === 'object' ? o.common.name.de : o.common.name; ^ ERROR: 'o.common' is possibly 'undefined'. let name = page.heading !== undefined ? page.heading : o.common.name && typeof o.common.name === 'object' ? o.common.name.de : o.common.name; ^ ERROR: 'o.common' is possibly 'undefined'. let name = page.heading !== undefined ? page.heading : o.common.name && typeof o.common.name === 'object' ? o.common.name.de : o.common.name; ^ ERROR: 'o.common' is possibly 'undefined'. let modeStatus = obj.common['states'][getState(page.thermoItems[3].id).val] ?? ''; ^ ERROR: 'obj.common' is possibly 'undefined'. let modeStatus = obj.common['states'][getState(page.thermoItems[3].id).val] ?? ''; ^ ERROR: Element implicitly has an 'any' type because expression of type '"states"' can't be used to index type 'InstanceCommon | AdapterCommon | (InstanceCommon & Record<string, any>) | (AdapterCommon & Record<string, any>) | ... 24 more ... | SystemConfigCommon'. Property 'states' does not exist on type 'InstanceCommon | AdapterCommon | (InstanceCommon & Record<string, any>) | (AdapterCommon & Record<string, any>) | ... 24 more ... | SystemConfigCommon'. page.items[0].speakerList[0] = v1Adapter[0] + '.' + v1Adapter[1]; ^ ERROR: Object is possibly 'undefined'. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. heading = page.heading !== undefined ? page.heading : typeof o.common.name === 'object' ? o.common.name.de : o.common.name; ^ ERROR: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. const color = obj[obji].iconColor !== '' ? obj[obji].iconColor : 0; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. const color = obj[obji].iconColor !== '' ? obj[obji].iconColor : 0; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. array_icon[obji] = obj[obji].icon; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. array_powerspeed[obji] = obj[obji].speed; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. array_powerstate[obji] = obj[obji].value + ' ' + obj[obji].unit; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. array_powerstate[obji] = obj[obji].value + ' ' + obj[obji].unit; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. array_icon[0] = obj[0].icon; ^ ERROR: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'. Property '0' does not exist on type '{}'. array_powerstate[0] = obj[0].value + ' ' + obj[0].unit; ^ ERROR: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'. Property '0' does not exist on type '{}'. array_powerstate[0] = obj[0].value + ' ' + obj[0].unit; ^ ERROR: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'. Property '0' does not exist on type '{}'. array_icon_color[0] = arrayColorScale[obj[0].iconColor]; ^ ERROR: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'. Property '0' does not exist on type '{}'. log('HandleButtonEvent -> OnOff: ' + words[4] + ' - ' + id + ' - Role - ' + o.common.role, 'info'); ^ ERROR: 'o.common' is possibly 'undefined'. const role = o.common.role as NSPanel.roles; ^ ERROR: 'o.common' is possibly 'undefined'. log(o.common.role); ^ ERROR: 'o.common' is possibly 'undefined'. switch (o.common.role as NSPanel.roles) { ^ ERROR: 'o.common' is possibly 'undefined'. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. toggleState(pageItemShutterButton1.shutterIcons[0].id); ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. toggleState(pageItemShutterButton1.shutterIcons[0].id); ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. setIfExists(pageItemShutterButton1.shutterIcons[0].id, true); ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. setIfExists(pageItemShutterButton1.shutterIcons[0].id, true); ^ ERROR: Object is possibly 'undefined'. if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. toggleState(pageItemShutterButton2.shutterIcons[1].id); ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. toggleState(pageItemShutterButton2.shutterIcons[1].id); ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. setIfExists(pageItemShutterButton2.shutterIcons[1].id, true); ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. setIfExists(pageItemShutterButton2.shutterIcons[1].id, true); ^ ERROR: Object is possibly 'undefined'. if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. toggleState(pageItemShutterButton3.shutterIcons[2].id); ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. toggleState(pageItemShutterButton3.shutterIcons[2].id); ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. setIfExists(pageItemShutterButton3.shutterIcons[2].id, true); ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. setIfExists(pageItemShutterButton3.shutterIcons[2].id, true); ^ ERROR: Object is possibly 'undefined'. const role = o.common.role as NSPanel.roles; ^ ERROR: 'o.common' is possibly 'undefined'. switch (o.common.role as NSPanel.roles) { ^ ERROR: 'o.common' is possibly 'undefined'. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. switch (nobj.common.role as NSPanel.roles) { ^ ERROR: 'nobj.common' is possibly 'undefined'. let tSlider1: string = pageItem.equalizerSlider[0].Slider1.heading ?? "Bass"; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS1M: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider1.icon1 ?? "minus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS1P: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider1.icon2 ?? "plus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider1MinVal: number = pageItem.equalizerSlider[0].Slider1.minValue ?? 0; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider1MaxVal: number = pageItem.equalizerSlider[0].Slider1.maxValue ?? 12; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider1ZeroVal: number = pageItem.equalizerSlider[0].Slider1.zeroValue ?? 6; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider1Step: number = pageItem.equalizerSlider[0].Slider1.stepValue ?? 1; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tSlider2: string = pageItem.equalizerSlider[0].Slider2.heading ?? "MidRange"; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS2M: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider2.icon1 ?? "minus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS2P: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider2.icon2 ?? "plus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider2MinVal: number = pageItem.equalizerSlider[0].Slider2.minValue ?? 0; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider2MaxVal: number = pageItem.equalizerSlider[0].Slider2.maxValue ?? 12; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider2ZeroVal: number = pageItem.equalizerSlider[0].Slider2.zeroValue ?? 6; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider2Step: number = pageItem.equalizerSlider[0].Slider2.stepValue ?? 1; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tSlider3: string = pageItem.equalizerSlider[0].Slider3.heading ?? "Treble"; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS3M: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider3.icon1 ?? "minus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS3P: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider3.icon2 ?? "plus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider3MinVal: number = pageItem.equalizerSlider[0].Slider3.minValue ?? 0; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider3MaxVal: number = pageItem.equalizerSlider[0].Slider3.maxValue ?? 12; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider3ZeroVal: number = pageItem.equalizerSlider[0].Slider3.zeroValue ?? 6; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider3Step: number = pageItem.equalizerSlider[0].Slider3.stepValue ?? 1; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. bEntity1Color = rgb_dec565(pageItem.shutterIcons[0].iconOnColor) ?? bEntity1Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. bEntity1Icon = Icons.GetIcon(pageItem.shutterIcons[0].icon2) ?? bEntity1Icon; ^ ERROR: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. bEntity1Color = rgb_dec565(pageItem.shutterIcons[0].iconOffColor) ?? bEntity1Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. bEntity2Color = rgb_dec565(pageItem.shutterIcons[1].iconOnColor) ?? bEntity2Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. bEntity2Icon = Icons.GetIcon(pageItem.shutterIcons[1].icon2) ?? bEntity2Icon; ^ ERROR: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. bEntity2Color = rgb_dec565(pageItem.shutterIcons[1].iconOffColor) ?? bEntity2Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. bEntity3Color = rgb_dec565(pageItem.shutterIcons[2].iconOnColor) ?? bEntity3Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. bEntity3Icon = Icons.GetIcon(pageItem.shutterIcons[2].icon2) ?? bEntity3Icon; ^ ERROR: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. bEntity3Color = rgb_dec565(pageItem.shutterIcons[2].iconOffColor) ?? bEntity3Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. icon = Icons.GetIcon(leftScreensaverEntity.ScreensaverEntityIconOn); ^ ERROR: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. ? GetOpenWeatherMapIconColor(String(getState('openweathermap.' + weatherAdapterInstanceNumber + '.forecast.day' + String(i - 1) + '.icon').val).split('/').pop().split('.').shift()) ^ ERROR: Object is possibly 'undefined'. ? GetOpenWeatherMapIconColor(String(getState('openweathermap.' + weatherAdapterInstanceNumber + '.forecast.day' + String(i - 1) + '.icon').val).split('/').pop().split('.').shift()) ^ ERROR: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. Icons.GetIcon(config.bottomScreensaverEntity[4].ScreensaverEntityIconOn) + ^ ERROR: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. icon = Icons.GetIcon(entity.ScreensaverEntityIconOn); ^ ERROR: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. icon = Icons.GetIcon(indicatorScreensaverEntity.ScreensaverEntityIconOn); ^ ERROR: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. if (iconData[a].ScreensaverEntityValue !== null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. switch (typeof iconData[a].ScreensaverEntityValue) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityValue === '' || isNaN(iconData[a].ScreensaverEntityValue)) ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityValue === '' || isNaN(iconData[a].ScreensaverEntityValue)) ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. iconData[a].ScreensaverEntityValue = Number(iconData[a].ScreensaverEntityValue).toFixed(iconData[a].ScreensaverEntityValueDecimalPlace); ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. iconData[a].ScreensaverEntityValue = Number(iconData[a].ScreensaverEntityValue).toFixed(iconData[a].ScreensaverEntityValueDecimalPlace); ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. iconData[a].ScreensaverEntityValue = Number(iconData[a].ScreensaverEntityValue).toFixed(iconData[a].ScreensaverEntityValueDecimalPlace); ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. iconData[a].ScreensaverEntityValue = null; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. let hwBtn1Col: RGB = iconData[a].ScreensaverEntityOffColor; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntity != null || iconData[a].ScreensaverEntityValue != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntity != null || iconData[a].ScreensaverEntityValue != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntity != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (typeof iconData[a].ScreensaverEntity == 'string') { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. switch (String(iconData[a].ScreensaverEntity).toUpperCase()) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. hwBtn1Col = iconData[a].ScreensaverEntityOnColor; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. log('Value: ' + iconData[a].ScreensaverEntity + ' Color: ' + JSON.stringify(hwBtn1Col), 'info'); ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (!!iconData[a].ScreensaverEntity) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. hwBtn1Col = iconData[a].ScreensaverEntityOnColor; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityIconSelect && iconData[a].ScreensaverEntity != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityIconSelect && iconData[a].ScreensaverEntity != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. const icon = iconData[a].ScreensaverEntityIconSelect[iconData[a].ScreensaverEntity]; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. const icon = iconData[a].ScreensaverEntityIconSelect[iconData[a].ScreensaverEntity]; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. else if (iconData[a].ScreensaverEntity) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityIconOn; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityIconOff) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityIconOff; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityIconOn; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityValue != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityValue; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityValueUnit == null ? '' : iconData[a].ScreensaverEntityValueUnit; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityValueUnit == null ? '' : iconData[a].ScreensaverEntityValueUnit; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. function rad2deg(rad): number { ^ ERROR: Parameter 'rad' implicitly has an 'any' type. function ColorToHex(color): string { ^ ERROR: Parameter 'color' implicitly has an 'any' type. Icons.GetIcon(iconKey) || ^ ERROR: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. } | undefined | number, ref: number, repeatTime: number, callback, init: boolean = false) { ^ ERROR: Parameter 'callback' implicitly has an 'any' type.Bin dann wieder zurück auf die v9.3.1 vom Javascript-Adapter, da läuft es dann wieder.
-
Ich hab heute den Javascript-Adapter von v9.3.1 auf v10.0.0 geupdatet, danach liefen die Scripte für die NSPanel nicht mehr.
Bin mit den NSPanel auf den aktuellen Versionen. Mit dem Javascript-Adapter kommen beim Start des Script die Fehlermeldungen:Compiling TypeScript source javascript.0 14:58:53.843 error TypeScript compilation failed: .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. function addDimTime(strTime) { ^ ERROR: Parameter 'strTime' implicitly has an 'any' type. function isDimTimeInRange(strLower, strUpper) { ^ ERROR: Parameter 'strLower' implicitly has an 'any' type. function isDimTimeInRange(strLower, strUpper) { ^ ERROR: Parameter 'strUpper' implicitly has an 'any' type. .concat(NSPanel_Path + 'NSPanel_Dimmode_brightnessDay') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'NSPanel_Dimmode_brightnessNight') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'ScreensaverInfo.activeBrightness') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'ScreensaverInfo.activeDimmodeBrightness') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'Relay.1') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'Relay.2') ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .concat(NSPanel_Path + 'ActivePage.id0'), ^ ERROR: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. Overload 2 of 2, '(...items: ConcatArray<never>[]): never[]', gave the following error. Argument of type 'string' is not assignable to parameter of type 'ConcatArray<never>'. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. on({ id: config.mrIcon1ScreensaverEntity.ScreensaverEntity, change: 'ne' }, async function () { ^ ERROR: No overload matches this call. Overload 1 of 4, '(pattern: string | RegExp | string[], handler: StateChangeHandler<any, any>): any', gave the following error. Object literal may only specify known properties, and 'id' does not exist in type 'RegExp | string[]'. Overload 2 of 4, '(astroOrScheduleOrOptions: AstroSchedule | SubscribeTime | SubscribeOptions, handler: StateChangeHandler<any, any>): any', gave the following error. Type 'string | null' is not assignable to type 'string | RegExp | string[] | SubscribeOptions[] | RegExp[] | undefined'. Type 'null' is not assignable to type 'string | RegExp | string[] | SubscribeOptions[] | RegExp[] | undefined'. Overload 3 of 4, '(id1: string, id2: string): void', gave the following error. Argument of type '{ id: string | null; change: string; }' is not assignable to parameter of type 'string'. on({ id: config.mrIcon2ScreensaverEntity.ScreensaverEntity, change: 'ne' }, async function () { ^ ERROR: No overload matches this call. Overload 1 of 4, '(pattern: string | RegExp | string[], handler: StateChangeHandler<any, any>): any', gave the following error. Object literal may only specify known properties, and 'id' does not exist in type 'RegExp | string[]'. Overload 2 of 4, '(astroOrScheduleOrOptions: AstroSchedule | SubscribeTime | SubscribeOptions, handler: StateChangeHandler<any, any>): any', gave the following error. Type 'string | null' is not assignable to type 'string | RegExp | string[] | SubscribeOptions[] | RegExp[] | undefined'. Type 'null' is not assignable to type 'string | RegExp | string[] | SubscribeOptions[] | RegExp[] | undefined'. Overload 3 of 4, '(id1: string, id2: string): void', gave the following error. Argument of type '{ id: string | null; change: string; }' is not assignable to parameter of type 'string'. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. tempId = activePage!.items[tempPageItem[0]].id; ^ ERROR: Element implicitly has an 'any' type because index expression is not of type 'number'. let buttonConfig: NSPanel.ConfigButtonFunction = config[method]; ^ ERROR: Element implicitly has an 'any' type because expression of type 'EventMethod' can't be used to index type 'Config'. Property 'startup' does not exist on type 'Config'. function GeneratePageElements(page: PageType): string { ^ ERROR: Function lacks ending return statement and return type does not include 'undefined'. let name = page.heading !== undefined ? page.heading : o.common.name && typeof o.common.name === 'object' ? o.common.name.de : o.common.name; ^ ERROR: 'o.common' is possibly 'undefined'. let name = page.heading !== undefined ? page.heading : o.common.name && typeof o.common.name === 'object' ? o.common.name.de : o.common.name; ^ ERROR: 'o.common' is possibly 'undefined'. let name = page.heading !== undefined ? page.heading : o.common.name && typeof o.common.name === 'object' ? o.common.name.de : o.common.name; ^ ERROR: 'o.common' is possibly 'undefined'. let name = page.heading !== undefined ? page.heading : o.common.name && typeof o.common.name === 'object' ? o.common.name.de : o.common.name; ^ ERROR: 'o.common' is possibly 'undefined'. let modeStatus = obj.common['states'][getState(page.thermoItems[3].id).val] ?? ''; ^ ERROR: 'obj.common' is possibly 'undefined'. let modeStatus = obj.common['states'][getState(page.thermoItems[3].id).val] ?? ''; ^ ERROR: Element implicitly has an 'any' type because expression of type '"states"' can't be used to index type 'InstanceCommon | AdapterCommon | (InstanceCommon & Record<string, any>) | (AdapterCommon & Record<string, any>) | ... 24 more ... | SystemConfigCommon'. Property 'states' does not exist on type 'InstanceCommon | AdapterCommon | (InstanceCommon & Record<string, any>) | (AdapterCommon & Record<string, any>) | ... 24 more ... | SystemConfigCommon'. page.items[0].speakerList[0] = v1Adapter[0] + '.' + v1Adapter[1]; ^ ERROR: Object is possibly 'undefined'. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. heading = page.heading !== undefined ? page.heading : typeof o.common.name === 'object' ? o.common.name.de : o.common.name; ^ ERROR: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. const color = obj[obji].iconColor !== '' ? obj[obji].iconColor : 0; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. const color = obj[obji].iconColor !== '' ? obj[obji].iconColor : 0; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. array_icon[obji] = obj[obji].icon; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. array_powerspeed[obji] = obj[obji].speed; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. array_powerstate[obji] = obj[obji].value + ' ' + obj[obji].unit; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. array_powerstate[obji] = obj[obji].value + ' ' + obj[obji].unit; ^ ERROR: Element implicitly has an 'any' type because expression of type 'number' can't be used to index type '{}'. No index signature with a parameter of type 'number' was found on type '{}'. array_icon[0] = obj[0].icon; ^ ERROR: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'. Property '0' does not exist on type '{}'. array_powerstate[0] = obj[0].value + ' ' + obj[0].unit; ^ ERROR: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'. Property '0' does not exist on type '{}'. array_powerstate[0] = obj[0].value + ' ' + obj[0].unit; ^ ERROR: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'. Property '0' does not exist on type '{}'. array_icon_color[0] = arrayColorScale[obj[0].iconColor]; ^ ERROR: Element implicitly has an 'any' type because expression of type '0' can't be used to index type '{}'. Property '0' does not exist on type '{}'. log('HandleButtonEvent -> OnOff: ' + words[4] + ' - ' + id + ' - Role - ' + o.common.role, 'info'); ^ ERROR: 'o.common' is possibly 'undefined'. const role = o.common.role as NSPanel.roles; ^ ERROR: 'o.common' is possibly 'undefined'. log(o.common.role); ^ ERROR: 'o.common' is possibly 'undefined'. switch (o.common.role as NSPanel.roles) { ^ ERROR: 'o.common' is possibly 'undefined'. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. toggleState(pageItemShutterButton1.shutterIcons[0].id); ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. toggleState(pageItemShutterButton1.shutterIcons[0].id); ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton1.shutterIcons[0].buttonType != undefined && pageItemShutterButton1.shutterIcons[0].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. setIfExists(pageItemShutterButton1.shutterIcons[0].id, true); ^ ERROR: 'pageItemShutterButton1.shutterIcons' is possibly 'null' or 'undefined'. setIfExists(pageItemShutterButton1.shutterIcons[0].id, true); ^ ERROR: Object is possibly 'undefined'. if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. toggleState(pageItemShutterButton2.shutterIcons[1].id); ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. toggleState(pageItemShutterButton2.shutterIcons[1].id); ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton2.shutterIcons[1].buttonType != undefined && pageItemShutterButton2.shutterIcons[1].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. setIfExists(pageItemShutterButton2.shutterIcons[1].id, true); ^ ERROR: 'pageItemShutterButton2.shutterIcons' is possibly 'null' or 'undefined'. setIfExists(pageItemShutterButton2.shutterIcons[1].id, true); ^ ERROR: Object is possibly 'undefined'. if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'toggle') { ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'toggle') { ^ ERROR: Object is possibly 'undefined'. toggleState(pageItemShutterButton3.shutterIcons[2].id); ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. toggleState(pageItemShutterButton3.shutterIcons[2].id); ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. else if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'press') { ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. else if (pageItemShutterButton3.shutterIcons[2].buttonType != undefined && pageItemShutterButton3.shutterIcons[2].buttonType == 'press') { ^ ERROR: Object is possibly 'undefined'. setIfExists(pageItemShutterButton3.shutterIcons[2].id, true); ^ ERROR: 'pageItemShutterButton3.shutterIcons' is possibly 'null' or 'undefined'. setIfExists(pageItemShutterButton3.shutterIcons[2].id, true); ^ ERROR: Object is possibly 'undefined'. const role = o.common.role as NSPanel.roles; ^ ERROR: 'o.common' is possibly 'undefined'. switch (o.common.role as NSPanel.roles) { ^ ERROR: 'o.common' is possibly 'undefined'. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. .catch(function (error) { ^ ERROR: Parameter 'error' implicitly has an 'any' type. .then(async function (response) { ^ ERROR: Parameter 'response' implicitly has an 'any' type. switch (nobj.common.role as NSPanel.roles) { ^ ERROR: 'nobj.common' is possibly 'undefined'. let tSlider1: string = pageItem.equalizerSlider[0].Slider1.heading ?? "Bass"; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS1M: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider1.icon1 ?? "minus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS1P: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider1.icon2 ?? "plus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider1MinVal: number = pageItem.equalizerSlider[0].Slider1.minValue ?? 0; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider1MaxVal: number = pageItem.equalizerSlider[0].Slider1.maxValue ?? 12; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider1ZeroVal: number = pageItem.equalizerSlider[0].Slider1.zeroValue ?? 6; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider1Step: number = pageItem.equalizerSlider[0].Slider1.stepValue ?? 1; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tSlider2: string = pageItem.equalizerSlider[0].Slider2.heading ?? "MidRange"; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS2M: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider2.icon1 ?? "minus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS2P: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider2.icon2 ?? "plus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider2MinVal: number = pageItem.equalizerSlider[0].Slider2.minValue ?? 0; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider2MaxVal: number = pageItem.equalizerSlider[0].Slider2.maxValue ?? 12; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider2ZeroVal: number = pageItem.equalizerSlider[0].Slider2.zeroValue ?? 6; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider2Step: number = pageItem.equalizerSlider[0].Slider2.stepValue ?? 1; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tSlider3: string = pageItem.equalizerSlider[0].Slider3.heading ?? "Treble"; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS3M: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider3.icon1 ?? "minus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let tIconS3P: string = Icons.GetIcon(pageItem.equalizerSlider[0].Slider3.icon2 ?? "plus-box"); ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider3MinVal: number = pageItem.equalizerSlider[0].Slider3.minValue ?? 0; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider3MaxVal: number = pageItem.equalizerSlider[0].Slider3.maxValue ?? 12; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider3ZeroVal: number = pageItem.equalizerSlider[0].Slider3.zeroValue ?? 6; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. let hSlider3Step: number = pageItem.equalizerSlider[0].Slider3.stepValue ?? 1; ^ ERROR: 'pageItem.equalizerSlider' is possibly 'undefined'. bEntity1Color = rgb_dec565(pageItem.shutterIcons[0].iconOnColor) ?? bEntity1Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. bEntity1Icon = Icons.GetIcon(pageItem.shutterIcons[0].icon2) ?? bEntity1Icon; ^ ERROR: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. bEntity1Color = rgb_dec565(pageItem.shutterIcons[0].iconOffColor) ?? bEntity1Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. bEntity2Color = rgb_dec565(pageItem.shutterIcons[1].iconOnColor) ?? bEntity2Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. bEntity2Icon = Icons.GetIcon(pageItem.shutterIcons[1].icon2) ?? bEntity2Icon; ^ ERROR: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. bEntity2Color = rgb_dec565(pageItem.shutterIcons[1].iconOffColor) ?? bEntity2Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. bEntity3Color = rgb_dec565(pageItem.shutterIcons[2].iconOnColor) ?? bEntity3Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. bEntity3Icon = Icons.GetIcon(pageItem.shutterIcons[2].icon2) ?? bEntity3Icon; ^ ERROR: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. bEntity3Color = rgb_dec565(pageItem.shutterIcons[2].iconOffColor) ?? bEntity3Color; ^ ERROR: Argument of type 'RGB | undefined' is not assignable to parameter of type 'RGB'. Type 'undefined' is not assignable to type 'RGB'. icon = Icons.GetIcon(leftScreensaverEntity.ScreensaverEntityIconOn); ^ ERROR: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. ? GetOpenWeatherMapIconColor(String(getState('openweathermap.' + weatherAdapterInstanceNumber + '.forecast.day' + String(i - 1) + '.icon').val).split('/').pop().split('.').shift()) ^ ERROR: Object is possibly 'undefined'. ? GetOpenWeatherMapIconColor(String(getState('openweathermap.' + weatherAdapterInstanceNumber + '.forecast.day' + String(i - 1) + '.icon').val).split('/').pop().split('.').shift()) ^ ERROR: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. Icons.GetIcon(config.bottomScreensaverEntity[4].ScreensaverEntityIconOn) + ^ ERROR: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. icon = Icons.GetIcon(entity.ScreensaverEntityIconOn); ^ ERROR: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. icon = Icons.GetIcon(indicatorScreensaverEntity.ScreensaverEntityIconOn); ^ ERROR: Argument of type 'string | null | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. if (iconData[a].ScreensaverEntityValue !== null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. switch (typeof iconData[a].ScreensaverEntityValue) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityValue === '' || isNaN(iconData[a].ScreensaverEntityValue)) ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityValue === '' || isNaN(iconData[a].ScreensaverEntityValue)) ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. iconData[a].ScreensaverEntityValue = Number(iconData[a].ScreensaverEntityValue).toFixed(iconData[a].ScreensaverEntityValueDecimalPlace); ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. iconData[a].ScreensaverEntityValue = Number(iconData[a].ScreensaverEntityValue).toFixed(iconData[a].ScreensaverEntityValueDecimalPlace); ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. iconData[a].ScreensaverEntityValue = Number(iconData[a].ScreensaverEntityValue).toFixed(iconData[a].ScreensaverEntityValueDecimalPlace); ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. iconData[a].ScreensaverEntityValue = null; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. let hwBtn1Col: RGB = iconData[a].ScreensaverEntityOffColor; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntity != null || iconData[a].ScreensaverEntityValue != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntity != null || iconData[a].ScreensaverEntityValue != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntity != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (typeof iconData[a].ScreensaverEntity == 'string') { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. switch (String(iconData[a].ScreensaverEntity).toUpperCase()) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. hwBtn1Col = iconData[a].ScreensaverEntityOnColor; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. log('Value: ' + iconData[a].ScreensaverEntity + ' Color: ' + JSON.stringify(hwBtn1Col), 'info'); ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (!!iconData[a].ScreensaverEntity) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. hwBtn1Col = iconData[a].ScreensaverEntityOnColor; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityIconSelect && iconData[a].ScreensaverEntity != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityIconSelect && iconData[a].ScreensaverEntity != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. const icon = iconData[a].ScreensaverEntityIconSelect[iconData[a].ScreensaverEntity]; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. const icon = iconData[a].ScreensaverEntityIconSelect[iconData[a].ScreensaverEntity]; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. else if (iconData[a].ScreensaverEntity) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityIconOn; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityIconOff) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityIconOff; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityIconOn; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. if (iconData[a].ScreensaverEntityValue != null) { ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityValue; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityValueUnit == null ? '' : iconData[a].ScreensaverEntityValueUnit; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. payloadString += iconData[a].ScreensaverEntityValueUnit == null ? '' : iconData[a].ScreensaverEntityValueUnit; ^ ERROR: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. No index signature with a parameter of type 'string' was found on type 'Record<"mrIcon1" | "mrIcon2", ScreenSaverMRDataElement>'. function rad2deg(rad): number { ^ ERROR: Parameter 'rad' implicitly has an 'any' type. function ColorToHex(color): string { ^ ERROR: Parameter 'color' implicitly has an 'any' type. Icons.GetIcon(iconKey) || ^ ERROR: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. } | undefined | number, ref: number, repeatTime: number, callback, init: boolean = false) { ^ ERROR: Parameter 'callback' implicitly has an 'any' type.Bin dann wieder zurück auf die v9.3.1 vom Javascript-Adapter, da läuft es dann wieder.
@icebear
Die 10 Version scheint Typscript noch weiter zu implementieren. Heißt die Typenprüfung wird immer schärfer. Das Script muss dahingehend angepasst werden.Wir melden uns, wenn es eine angepasste Version gibt.
Das große Ding an der ganze Sache ist die Umstellung des Admin auf Version 8.x, das bedeutet neue Testumgebungen erstellen und zum Teil dann zweigleisig fahren.
Also bitte Geduld, ist ja auch noch Beta Stadium.
-
@icebear
Die 10 Version scheint Typscript noch weiter zu implementieren. Heißt die Typenprüfung wird immer schärfer. Das Script muss dahingehend angepasst werden.Wir melden uns, wenn es eine angepasste Version gibt.
Das große Ding an der ganze Sache ist die Umstellung des Admin auf Version 8.x, das bedeutet neue Testumgebungen erstellen und zum Teil dann zweigleisig fahren.
Also bitte Geduld, ist ja auch noch Beta Stadium.
Also bitte Geduld, ist ja auch noch Beta Stadium.
Ist ja kein Problem, wie du schon gesagt hast ist der JavaScript-Adapter ja noch ganz frisch.
Die Frage die ich mir dabei gestellt habe, ob das dann in solchen Fällen auch den NSPanel-Adapter betrifft und ob es nicht langsam Zeit wird auf den Adapter umzusteigen, wenn die Probleme damit nicht auftreten?
-
@icebear
Die 10 Version scheint Typscript noch weiter zu implementieren. Heißt die Typenprüfung wird immer schärfer. Das Script muss dahingehend angepasst werden.Wir melden uns, wenn es eine angepasste Version gibt.
Das große Ding an der ganze Sache ist die Umstellung des Admin auf Version 8.x, das bedeutet neue Testumgebungen erstellen und zum Teil dann zweigleisig fahren.
Also bitte Geduld, ist ja auch noch Beta Stadium.
-
Bitte die 5.1.1.10 von Github installieren. Das Fix für den JS-Adapter v10.0.0 ist schon seit heute Online...
https://github.com/joBr99/nspanel-lovelace-ui/blob/main/ioBroker/NsPanelTs.ts

Wie immer den unteren Teil ab:
// _________________________________ DE: Ab hier keine Konfiguration mehr _____________________________________ // _________________________________ EN: No more configuration from here _____________________________________ersetzten.

Das TFT muss nicht aktualisiert werden.
Dieses Skript ist auf die neuen Restriktionen des JS-Adapters (TypeScript 6) bereits vollständig abgestimmt. Und ja, es ist sehr viel restriktiver als die Vorversionen...
Kurzer Tipp:
Wenn ihr weitere TypeScript habt, dann solltet ihr in die oberste Zeile ein//@ts-nocheckschreiben. Dann funktionieren erstmal alle Skripte wieder wie gewohnt und man kann eines nach dem anderen überarbeiten und migrieren.

-
Guten Abend,
ich wollte einmal fragen, ob sich die Umsetzung eines Cycle-Button bereits mit den vorhandenen Funktionen umsetzen lässt bzw. wie ihr das am besten lösen würdet:Ich möchte einen Button auf dem NSPanel, der einen ioBroker-Datenpunkt mit drei Zuständen (0, 1, 2) steuert.
Bei jedem Tastendruck soll zyklisch geschaltet werden 0 → 1 → 2 → 0 → 1 → 2 ...Das löse ich aktuell über einen Button mit zugehörigem Script
Gleichzeitig möchte ich die Darstellung des Buttons abhängig vom aktuellen Wert ändern:
0= Icon A & Farbe A
1 = Icon B & Farbe B
2 = Icon C & Farbe CIdeal wäre dabei, wenn
- ein Druck auf den Button den nächsten Wert setzt(aktuell über Alias Taste gelöst),
- der aktuelle Wert eines Datenpunkts soll auf dem Panel dargestellt wird,
- Änderungen des Datenpunkts von anderer Stelle ebenfalls automatisch die Anzeige des Buttons aktualisieren,
- Icon und Farbe sollen je Zustand dargestellt werden.
Ich habe es bislang nur für normale Buttons/Schalter hinbekommen, aber nicht, wenn ich einen DP mit drei Zuständen habe.
-
Guten Abend,
ich wollte einmal fragen, ob sich die Umsetzung eines Cycle-Button bereits mit den vorhandenen Funktionen umsetzen lässt bzw. wie ihr das am besten lösen würdet:Ich möchte einen Button auf dem NSPanel, der einen ioBroker-Datenpunkt mit drei Zuständen (0, 1, 2) steuert.
Bei jedem Tastendruck soll zyklisch geschaltet werden 0 → 1 → 2 → 0 → 1 → 2 ...Das löse ich aktuell über einen Button mit zugehörigem Script
Gleichzeitig möchte ich die Darstellung des Buttons abhängig vom aktuellen Wert ändern:
0= Icon A & Farbe A
1 = Icon B & Farbe B
2 = Icon C & Farbe CIdeal wäre dabei, wenn
- ein Druck auf den Button den nächsten Wert setzt(aktuell über Alias Taste gelöst),
- der aktuelle Wert eines Datenpunkts soll auf dem Panel dargestellt wird,
- Änderungen des Datenpunkts von anderer Stelle ebenfalls automatisch die Anzeige des Buttons aktualisieren,
- Icon und Farbe sollen je Zustand dargestellt werden.
Ich habe es bislang nur für normale Buttons/Schalter hinbekommen, aber nicht, wenn ich einen DP mit drei Zuständen habe.
Spontan fällt mir da der Channel Info ein. Der kann buttontext und usericon setzen. Damit kannst du über dein Script das Icon und den Text ändern.
Genaueres kann ich sagen, wenn ich wieder am Rechner sitze 👨💻
Edit:
Habe es noch einmal am aktuellen Script gecheckt. Geht immer noch nicht. -
Danke schon einmal für die Idee. Als Info-Item habe ich es jetzt hinbekommen. Kann ich dem Item auch noch beibringen, dass es den Button-DP oder einen anderen Schalter-DP triggert?
{ id: 'alias.0.NSPanel.modus-Button', name: "getState('0_userdata.0.modus-Text').val" },
-
Danke schon einmal für die Idee. Als Info-Item habe ich es jetzt hinbekommen. Kann ich dem Item auch noch beibringen, dass es den Button-DP oder einen anderen Schalter-DP triggert?
{ id: 'alias.0.NSPanel.modus-Button', name: "getState('0_userdata.0.modus-Text').val" },
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden