Weiter zum Inhalt
  • Home
  • Aktuell
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Hell
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dunkel
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Hardware
  4. SONOFF NSPanel mit Lovelace UI (TypeScript Version)

NEWS

  • Node.js 24 ist jetzt offiziell empfohlen!
    apollon77A
    apollon77
    8
    1
    231

  • NEWS Räume und Funktionen in einem Durchlauf: der Assistent in Admin 8 (mit Video)
    BluefoxB
    Bluefox
    7
    1
    261

  • NEWS: Neu im Admin, zentrale Verwaltung für Passwörter und Schlüssel
    BluefoxB
    Bluefox
    19
    1
    440

SONOFF NSPanel mit Lovelace UI (TypeScript Version)

Geplant Angeheftet Gesperrt Verschoben Hardware
lovelace uinspanelsonoff
8.1k Beiträge 281 Kommentatoren 9.2m Aufrufe 261 Beobachtet
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • icebearI
    icebearI
    icebear
    schrieb am zuletzt editiert von
    #8107

    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.

    T 1 Antwort Letzte Antwort
    0
    • icebearI icebear

      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.

      T
      T
      TT-Tom
      schrieb am zuletzt editiert von
      #8108

      @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.

      Gruß Tom

      Wenn meine Hilfe erfolgreich war, benutze bitte das Voting unten rechts im Beitrag

      Public Transport
      https://github.com/tt-tom17/ioBroker.public-transport
      https://github.com/tt-tom17/ioBroker.public-transport/wiki

      NSPanel Adapter Wiki
      https://github.com/ticaki/ioBroker.nspanel-lovelace-ui/wiki

      icebearI T 2 Antworten Letzte Antwort
      1
      • T TT-Tom

        @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.

        icebearI
        icebearI
        icebear
        schrieb am zuletzt editiert von
        #8109

        @TT-Tom sagte:

        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?

        1 Antwort Letzte Antwort
        0
        • T TT-Tom

          @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.

          T
          T
          ticaki
          schrieb am zuletzt editiert von
          #8110

          @TT-Tom sagte:

          @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.

          im code sind gefühlt ne millionen impilzierte any - das wir spassig :D

          Weather-Warnings Espresense NSPanel-Lovelace-ui Tagesschau

          Spenden

          ArmilarA 1 Antwort Letzte Antwort
          1
          • GarganoG
            GarganoG
            Gargano
            schrieb am zuletzt editiert von
            #8111

            Ich würde ja gerne auf den Adapter wechseln, der hat aber noch ein Problem mit dem neuen Admin

            1 Antwort Letzte Antwort
            0
            • T ticaki

              @TT-Tom sagte:

              @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.

              im code sind gefühlt ne millionen impilzierte any - das wir spassig :D

              ArmilarA
              ArmilarA
              Armilar
              Most Active Forum Testing
              schrieb am zuletzt editiert von Armilar
              #8112

              @ticaki
              @icebear

              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

              399a9801-11aa-4aef-92e5-1435c155a9d1-image.jpeg

              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-nocheck
              

              schreiben. Dann funktionieren erstmal alle Skripte wieder wie gewohnt und man kann eines nach dem anderen überarbeiten und migrieren. 😏

              Installationsanleitung, Tipps, Alias-Definitionen, FAQ für das Sonoff NSPanel mit lovelace UI unter ioBroker
              https://github.com/joBr99/nspanel-lovelace-ui/wiki

              Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

              1 Antwort Letzte Antwort
              2
              • F
                F
                Foggy
                schrieb am zuletzt editiert von
                #8113

                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

                var cmd, cmd_inv, aktuell;
                
                
                on({ id: '0_userdata.0.Status', change: 'ne' }, async (obj) => {
                  let value = obj.state.val;
                  let oldValue = obj.oldState.val;
                  if (getState('0_userdata.0.Status').val == 0) {
                    setState('0_userdata.0.Text', 'Eins');
                  } else if (getState('0_userdata.0.Status').val == 1) {
                    setState('0_userdata.0.Text', 'Zwei');
                  } else if (getState('0_userdata.0.Status').val == 2) {
                    setState('0_userdata.0.Text', 'Drei');
                  }
                });
                
                on({ id: 'alias.0.NSPanel.Button.SET', change: 'any' }, async (obj) => {
                  let value = obj.state.val;
                  let oldValue = obj.oldState.val;
                  if (getState('alias.0.NSPanel.SET').val == true) {
                    aktuell = getState('0_userdata.0.Status').val;
                    if (aktuell < 2) {
                      aktuell = aktuell + 1;
                      setState('0_userdata.0.Button', false);
                    } else {
                      aktuell = 0;
                      setState('0_userdata.0.Button', false);
                    }
                    setState('0_userdata.0.Status', aktuell);
                  }
                });
                
                

                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 C

                Ideal 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.

                T 1 Antwort Letzte Antwort
                0
                • F Foggy

                  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

                  var cmd, cmd_inv, aktuell;
                  
                  
                  on({ id: '0_userdata.0.Status', change: 'ne' }, async (obj) => {
                    let value = obj.state.val;
                    let oldValue = obj.oldState.val;
                    if (getState('0_userdata.0.Status').val == 0) {
                      setState('0_userdata.0.Text', 'Eins');
                    } else if (getState('0_userdata.0.Status').val == 1) {
                      setState('0_userdata.0.Text', 'Zwei');
                    } else if (getState('0_userdata.0.Status').val == 2) {
                      setState('0_userdata.0.Text', 'Drei');
                    }
                  });
                  
                  on({ id: 'alias.0.NSPanel.Button.SET', change: 'any' }, async (obj) => {
                    let value = obj.state.val;
                    let oldValue = obj.oldState.val;
                    if (getState('alias.0.NSPanel.SET').val == true) {
                      aktuell = getState('0_userdata.0.Status').val;
                      if (aktuell < 2) {
                        aktuell = aktuell + 1;
                        setState('0_userdata.0.Button', false);
                      } else {
                        aktuell = 0;
                        setState('0_userdata.0.Button', false);
                      }
                      setState('0_userdata.0.Status', aktuell);
                    }
                  });
                  
                  

                  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 C

                  Ideal 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.

                  T
                  T
                  TT-Tom
                  schrieb am zuletzt editiert von TT-Tom
                  #8114

                  @Foggy

                  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.

                  Gruß Tom

                  Wenn meine Hilfe erfolgreich war, benutze bitte das Voting unten rechts im Beitrag

                  Public Transport
                  https://github.com/tt-tom17/ioBroker.public-transport
                  https://github.com/tt-tom17/ioBroker.public-transport/wiki

                  NSPanel Adapter Wiki
                  https://github.com/ticaki/ioBroker.nspanel-lovelace-ui/wiki

                  1 Antwort Letzte Antwort
                  0
                  • F
                    F
                    Foggy
                    schrieb zuletzt editiert von
                    #8115

                    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" },
                    

                    alias.png

                    T 1 Antwort Letzte Antwort
                    0
                    • F Foggy

                      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" },
                      

                      alias.png

                      T
                      T
                      TT-Tom
                      schrieb zuletzt editiert von
                      #8116

                      @Foggy

                      Das geht leider nicht ist ja nur als Info programmiert. Man könnte daneben einen Button „Next“ setzen, den du zum weiterschalten nutzt.

                      Gruß Tom

                      Wenn meine Hilfe erfolgreich war, benutze bitte das Voting unten rechts im Beitrag

                      Public Transport
                      https://github.com/tt-tom17/ioBroker.public-transport
                      https://github.com/tt-tom17/ioBroker.public-transport/wiki

                      NSPanel Adapter Wiki
                      https://github.com/ticaki/ioBroker.nspanel-lovelace-ui/wiki

                      1 Antwort Letzte Antwort
                      0
                      • F
                        F
                        Foggy
                        schrieb zuletzt editiert von
                        #8117

                        Schade, ich hatte gehofft, dass man einen Cycle-Button mit irgendeinem Trick erstellen kann um schnell auf einer Übersichtsseite durch die Modi zu schalten. Einen zusätzlichen Button wollte ich gerade vermeiden ;)

                        1 Antwort Letzte Antwort
                        0

                        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
                        Antworten
                        • In einem neuen Thema antworten
                        Anmelden zum Antworten
                        • Älteste zuerst
                        • Neuste zuerst
                        • Meiste Stimmen


                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        212

                        Online

                        33.1k

                        Benutzende

                        83.9k

                        Themen

                        1.4m

                        Beiträge
                        Community
                        Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                        ioBroker Community 2014-2026
                        logo
                        • Anmelden

                        • Du hast noch kein Konto? Registrieren

                        • Anmelden oder registrieren, um zu suchen
                        • Erster Beitrag
                          Letzter Beitrag
                        0
                        • Home
                        • Aktuell
                        • Ungelesen 0
                        • Kategorien
                        • Unreplied
                        • Beliebt
                        • GitHub
                        • Docu
                        • Hilfe