mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2025-12-22 07:24:24 +01:00
v4.3.3.39 - Update NsPanelTs.ts
fix maxValueColorTemp
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