diff --git a/ioBroker/NsPanelTs.ts b/ioBroker/NsPanelTs.ts index 5d606b3d..426f80e0 100644 --- a/ioBroker/NsPanelTs.ts +++ b/ioBroker/NsPanelTs.ts @@ -7377,7 +7377,8 @@ function GetScreenSaverEntityColor(configElement: ScreenSaverElement | null): nu let colorReturn: any; if (configElement.ScreensaverEntityIconColor != undefined) { if (typeof getState(configElement.ScreensaverEntity).val == 'boolean') { - colorReturn = (getState(configElement.ScreensaverEntity).val == true) ? rgb_dec565(colorScale10) : rgb_dec565(colorScale0); + let iconvalbest = (configElement.ScreensaverEntityIconColor.val_best != undefined) ? configElement.ScreensaverEntityIconColor.val_best : false ; + colorReturn = (getState(configElement.ScreensaverEntity).val == iconvalbest) ? rgb_dec565(colorScale0) : rgb_dec565(colorScale10); } else if (typeof configElement.ScreensaverEntityIconColor == 'object') { let iconvalmin = (configElement.ScreensaverEntityIconColor.val_min != undefined) ? configElement.ScreensaverEntityIconColor.val_min : 0 ; let iconvalmax = (configElement.ScreensaverEntityIconColor.val_max != undefined) ? configElement.ScreensaverEntityIconColor.val_max : 100 ; diff --git a/ioBroker/NsPanelTs_without_Examples.ts b/ioBroker/NsPanelTs_without_Examples.ts index 09788f05..369e8806 100644 --- a/ioBroker/NsPanelTs_without_Examples.ts +++ b/ioBroker/NsPanelTs_without_Examples.ts @@ -6865,7 +6865,8 @@ function GetScreenSaverEntityColor(configElement: ScreenSaverElement | null): nu let colorReturn: any; if (configElement.ScreensaverEntityIconColor != undefined) { if (typeof getState(configElement.ScreensaverEntity).val == 'boolean') { - colorReturn = (getState(configElement.ScreensaverEntity).val == true) ? rgb_dec565(colorScale10) : rgb_dec565(colorScale0); + let iconvalbest = (configElement.ScreensaverEntityIconColor.val_best != undefined) ? configElement.ScreensaverEntityIconColor.val_best : false ; + colorReturn = (getState(configElement.ScreensaverEntity).val == iconvalbest) ? rgb_dec565(colorScale0) : rgb_dec565(colorScale10); } else if (typeof configElement.ScreensaverEntityIconColor == 'object') { let iconvalmin = (configElement.ScreensaverEntityIconColor.val_min != undefined) ? configElement.ScreensaverEntityIconColor.val_min : 0 ; let iconvalmax = (configElement.ScreensaverEntityIconColor.val_max != undefined) ? configElement.ScreensaverEntityIconColor.val_max : 100 ;