mirror of
https://github.com/joBr99/nspanel-lovelace-ui.git
synced 2026-03-04 09:06:52 +01:00
Compare commits
2 Commits
49577ddbb6
...
9c49a9c67d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c49a9c67d | ||
|
|
0a2461f4a5 |
@@ -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;
|
||||||
|
|||||||
@@ -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