mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-02-24 15:02:15 +01:00
v4.3.3.39 - Update NSPanelTs.ts
Fix: if (pageItem.minValueColorTemp !== undefined && pageItem.maxValueColorTemp !== undefined) {
This commit is contained in:
@@ -7722,7 +7722,7 @@ function GenerateDetailPage(type: NSPanel.PopupType, optional: NSPanel.mediaOpti
|
|||||||
if (existsState(id + '.TEMPERATURE')) {
|
if (existsState(id + '.TEMPERATURE')) {
|
||||||
colorTemp = 0;
|
colorTemp = 0;
|
||||||
if (getState(id + '.TEMPERATURE').val != null) {
|
if (getState(id + '.TEMPERATURE').val != null) {
|
||||||
if (pageItem.minValueColorTemp !== undefined && pageItem.minValueColorTemp !== undefined) {
|
if (pageItem.minValueColorTemp !== undefined && pageItem.maxValueColorTemp !== undefined) {
|
||||||
colorTemp = Math.trunc(scale(getState(id + '.TEMPERATURE').val, pageItem.minValueColorTemp, pageItem.maxValueColorTemp!, 100, 0));
|
colorTemp = Math.trunc(scale(getState(id + '.TEMPERATURE').val, pageItem.minValueColorTemp, pageItem.maxValueColorTemp!, 100, 0));
|
||||||
} else {
|
} else {
|
||||||
colorTemp = getState(id + '.TEMPERATURE').val;
|
colorTemp = getState(id + '.TEMPERATURE').val;
|
||||||
|
|||||||
Reference in New Issue
Block a user