How to set text to change colour on IF ELSE results in a Thingsboard widget with javascript?How to change an element's class with JavaScript?How to set a JavaScript breakpoint from code in Chrome?How do I get the value of text input field using JavaScript?Changing text colour or background depending on value of input fieldJQuery changing colour of text within columnsChange text colour if number positive in javascriptsending MySQL data from the pastChanging font color for some of the values enclosed in a <td> tagJavascript: Changing the colour of dynamic api data?javascript pause function execution until event is triggered
The selling of the sheep
Which version of the Squat Nimbleness feat is correct?
What does the copyright in a dissertation protect exactly?
Two denim hijabs
Endgame puzzle: How to avoid stalemate and win?
Guess the number game (Python)
Why can't argument be forwarded inside lambda without mutable?
Gerrymandering Puzzle - Rig the Election
Strange behavior editing photos in photoshop and back in lightroom
Convert Numbers To Emoji Math
Is it normal for gliders not to have attitude indicators?
What would happen if I combined this polymer and this metal (assuming I can)
How did the Apollo guidance computer handle parity bit errors?
What does のそ mean on this picture?
What is more safe for browsing the web: PC or smartphone?
What does the coin flipping before dying mean?
Copper as an adjective to refer to something made of copper
What happens if I accidentally leave an app running and click "Install Now" in Software Updater?
Class Not Passing SObject By Reference
Can an earth elemental drag a tiny creature underground with Earth Glide?
Was there a dinosaur-counter in the original Jurassic Park movie?
Can anyone identify this unknown 1988 PC card from The Palantir Corporation?
Is there precedent or are there procedures for a US president refusing to concede to an electoral defeat?
How did the Force make Luke hard to hit in the Battle of Yavin?
How to set text to change colour on IF ELSE results in a Thingsboard widget with javascript?
How to change an element's class with JavaScript?How to set a JavaScript breakpoint from code in Chrome?How do I get the value of text input field using JavaScript?Changing text colour or background depending on value of input fieldJQuery changing colour of text within columnsChange text colour if number positive in javascriptsending MySQL data from the pastChanging font color for some of the values enclosed in a <td> tagJavascript: Changing the colour of dynamic api data?javascript pause function execution until event is triggered
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I have a ThingsBoard table widget displaying Node Status as 0 or 1. Where 0 = OK, 1 = ALARM.
I have already created nodeStatus to return strings of 0 = OK, 1 = ALARM.

The following is my current code in the 'Advanced Data Key Tab - Use cell content function':
var nodeStatus = entity['sensor.a'];
if (nodeStatus == '0')
return "OK";
else
return "ALARM";
I want to change the Returned String colour to the following:
OK = Green font
ALARM = Red font
How do I do this?
UPDATE: I have added extra code to the Cell Style function: f(value) as suggested by @lupz below.

This is now making the entire column change to Red:

I have also tried enabling "Use data post-processing function" in the "Settings" Tab, with no change:

UPDATE:
I have removed the nodeStatus function from the "Cell Content Function" as per below comments:

After removal of the single quotes around the '0' next to if(value === 0), I have the same issue as above (the whole column is red).

javascript thingsboard
add a comment |
I have a ThingsBoard table widget displaying Node Status as 0 or 1. Where 0 = OK, 1 = ALARM.
I have already created nodeStatus to return strings of 0 = OK, 1 = ALARM.

The following is my current code in the 'Advanced Data Key Tab - Use cell content function':
var nodeStatus = entity['sensor.a'];
if (nodeStatus == '0')
return "OK";
else
return "ALARM";
I want to change the Returned String colour to the following:
OK = Green font
ALARM = Red font
How do I do this?
UPDATE: I have added extra code to the Cell Style function: f(value) as suggested by @lupz below.

This is now making the entire column change to Red:

I have also tried enabling "Use data post-processing function" in the "Settings" Tab, with no change:

UPDATE:
I have removed the nodeStatus function from the "Cell Content Function" as per below comments:

After removal of the single quotes around the '0' next to if(value === 0), I have the same issue as above (the whole column is red).

javascript thingsboard
Any news on this one? Please add the console output of this cell style function:console.log(value, typeof (value)); return ;Please add the console output of this cell content function:console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];
– lupz
Apr 2 at 8:26
I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.
– DenMurphy
Apr 4 at 5:01
I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.
– lupz
Apr 5 at 11:35
add a comment |
I have a ThingsBoard table widget displaying Node Status as 0 or 1. Where 0 = OK, 1 = ALARM.
I have already created nodeStatus to return strings of 0 = OK, 1 = ALARM.

The following is my current code in the 'Advanced Data Key Tab - Use cell content function':
var nodeStatus = entity['sensor.a'];
if (nodeStatus == '0')
return "OK";
else
return "ALARM";
I want to change the Returned String colour to the following:
OK = Green font
ALARM = Red font
How do I do this?
UPDATE: I have added extra code to the Cell Style function: f(value) as suggested by @lupz below.

This is now making the entire column change to Red:

I have also tried enabling "Use data post-processing function" in the "Settings" Tab, with no change:

UPDATE:
I have removed the nodeStatus function from the "Cell Content Function" as per below comments:

After removal of the single quotes around the '0' next to if(value === 0), I have the same issue as above (the whole column is red).

javascript thingsboard
I have a ThingsBoard table widget displaying Node Status as 0 or 1. Where 0 = OK, 1 = ALARM.
I have already created nodeStatus to return strings of 0 = OK, 1 = ALARM.

The following is my current code in the 'Advanced Data Key Tab - Use cell content function':
var nodeStatus = entity['sensor.a'];
if (nodeStatus == '0')
return "OK";
else
return "ALARM";
I want to change the Returned String colour to the following:
OK = Green font
ALARM = Red font
How do I do this?
UPDATE: I have added extra code to the Cell Style function: f(value) as suggested by @lupz below.

This is now making the entire column change to Red:

I have also tried enabling "Use data post-processing function" in the "Settings" Tab, with no change:

UPDATE:
I have removed the nodeStatus function from the "Cell Content Function" as per below comments:

After removal of the single quotes around the '0' next to if(value === 0), I have the same issue as above (the whole column is red).

javascript thingsboard
javascript thingsboard
edited Mar 27 at 7:52
lupz
1,77011834
1,77011834
asked Mar 23 at 4:26
DenMurphyDenMurphy
235
235
Any news on this one? Please add the console output of this cell style function:console.log(value, typeof (value)); return ;Please add the console output of this cell content function:console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];
– lupz
Apr 2 at 8:26
I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.
– DenMurphy
Apr 4 at 5:01
I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.
– lupz
Apr 5 at 11:35
add a comment |
Any news on this one? Please add the console output of this cell style function:console.log(value, typeof (value)); return ;Please add the console output of this cell content function:console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];
– lupz
Apr 2 at 8:26
I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.
– DenMurphy
Apr 4 at 5:01
I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.
– lupz
Apr 5 at 11:35
Any news on this one? Please add the console output of this cell style function:
console.log(value, typeof (value)); return ; Please add the console output of this cell content function: console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];– lupz
Apr 2 at 8:26
Any news on this one? Please add the console output of this cell style function:
console.log(value, typeof (value)); return ; Please add the console output of this cell content function: console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];– lupz
Apr 2 at 8:26
I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.
– DenMurphy
Apr 4 at 5:01
I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.
– DenMurphy
Apr 4 at 5:01
I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.
– lupz
Apr 5 at 11:35
I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.
– lupz
Apr 5 at 11:35
add a comment |
1 Answer
1
active
oldest
votes
There should be another script-input called Cell style function: f(value) right there in the advanced data key settings of the table widget. It can be used to set the CSS-styles for a cell based on its value:
/* Assuming value is your nodeStatus */
if (value === '0')
return
color: 'green'
;
else
return
color: 'red'
;
Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.
– DenMurphy
Mar 26 at 7:01
It is beacause the value is never=== '0'. hm... you use theentity['sensor.a']to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access thesensor.avalues directly?
– lupz
Mar 26 at 10:38
In your screens I saw that it already issensor.adatakey. You should be able to use thevalue-parameter of the cell content function directly (no need forentity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string'0'and in Javascript0 == '0'is true due to automatic type conversions, whereas0 === '0'is false. You should be able to get it working by removing the single quotesif (value === 0) .... Let me know if its working and I'll update the answer.
– lupz
Mar 26 at 12:20
I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.
– DenMurphy
Mar 27 at 5:46
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55310608%2fhow-to-set-text-to-change-colour-on-if-else-results-in-a-thingsboard-widget-with%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There should be another script-input called Cell style function: f(value) right there in the advanced data key settings of the table widget. It can be used to set the CSS-styles for a cell based on its value:
/* Assuming value is your nodeStatus */
if (value === '0')
return
color: 'green'
;
else
return
color: 'red'
;
Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.
– DenMurphy
Mar 26 at 7:01
It is beacause the value is never=== '0'. hm... you use theentity['sensor.a']to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access thesensor.avalues directly?
– lupz
Mar 26 at 10:38
In your screens I saw that it already issensor.adatakey. You should be able to use thevalue-parameter of the cell content function directly (no need forentity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string'0'and in Javascript0 == '0'is true due to automatic type conversions, whereas0 === '0'is false. You should be able to get it working by removing the single quotesif (value === 0) .... Let me know if its working and I'll update the answer.
– lupz
Mar 26 at 12:20
I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.
– DenMurphy
Mar 27 at 5:46
add a comment |
There should be another script-input called Cell style function: f(value) right there in the advanced data key settings of the table widget. It can be used to set the CSS-styles for a cell based on its value:
/* Assuming value is your nodeStatus */
if (value === '0')
return
color: 'green'
;
else
return
color: 'red'
;
Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.
– DenMurphy
Mar 26 at 7:01
It is beacause the value is never=== '0'. hm... you use theentity['sensor.a']to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access thesensor.avalues directly?
– lupz
Mar 26 at 10:38
In your screens I saw that it already issensor.adatakey. You should be able to use thevalue-parameter of the cell content function directly (no need forentity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string'0'and in Javascript0 == '0'is true due to automatic type conversions, whereas0 === '0'is false. You should be able to get it working by removing the single quotesif (value === 0) .... Let me know if its working and I'll update the answer.
– lupz
Mar 26 at 12:20
I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.
– DenMurphy
Mar 27 at 5:46
add a comment |
There should be another script-input called Cell style function: f(value) right there in the advanced data key settings of the table widget. It can be used to set the CSS-styles for a cell based on its value:
/* Assuming value is your nodeStatus */
if (value === '0')
return
color: 'green'
;
else
return
color: 'red'
;
There should be another script-input called Cell style function: f(value) right there in the advanced data key settings of the table widget. It can be used to set the CSS-styles for a cell based on its value:
/* Assuming value is your nodeStatus */
if (value === '0')
return
color: 'green'
;
else
return
color: 'red'
;
answered Mar 25 at 12:39
lupzlupz
1,77011834
1,77011834
Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.
– DenMurphy
Mar 26 at 7:01
It is beacause the value is never=== '0'. hm... you use theentity['sensor.a']to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access thesensor.avalues directly?
– lupz
Mar 26 at 10:38
In your screens I saw that it already issensor.adatakey. You should be able to use thevalue-parameter of the cell content function directly (no need forentity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string'0'and in Javascript0 == '0'is true due to automatic type conversions, whereas0 === '0'is false. You should be able to get it working by removing the single quotesif (value === 0) .... Let me know if its working and I'll update the answer.
– lupz
Mar 26 at 12:20
I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.
– DenMurphy
Mar 27 at 5:46
add a comment |
Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.
– DenMurphy
Mar 26 at 7:01
It is beacause the value is never=== '0'. hm... you use theentity['sensor.a']to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access thesensor.avalues directly?
– lupz
Mar 26 at 10:38
In your screens I saw that it already issensor.adatakey. You should be able to use thevalue-parameter of the cell content function directly (no need forentity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string'0'and in Javascript0 == '0'is true due to automatic type conversions, whereas0 === '0'is false. You should be able to get it working by removing the single quotesif (value === 0) .... Let me know if its working and I'll update the answer.
– lupz
Mar 26 at 12:20
I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.
– DenMurphy
Mar 27 at 5:46
Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.
– DenMurphy
Mar 26 at 7:01
Thanks for the feedback. I have added this code to the Advanced tab in the "Cell style function: f(value)" section, however now I see all items in the column turn red. I am now able to add screenshots, so see my edited post above for extra clarification.
– DenMurphy
Mar 26 at 7:01
It is beacause the value is never
=== '0'. hm... you use the entity['sensor.a'] to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access the sensor.a values directly?– lupz
Mar 26 at 10:38
It is beacause the value is never
=== '0'. hm... you use the entity['sensor.a'] to get the nodeStatus and ignore the datakey value. What is the datakey? Can you add a datakey to access the sensor.a values directly?– lupz
Mar 26 at 10:38
In your screens I saw that it already is
sensor.a datakey. You should be able to use the value-parameter of the cell content function directly (no need for entity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string '0' and in Javascript 0 == '0' is true due to automatic type conversions, whereas 0 === '0' is false. You should be able to get it working by removing the single quotes if (value === 0) ... . Let me know if its working and I'll update the answer.– lupz
Mar 26 at 12:20
In your screens I saw that it already is
sensor.a datakey. You should be able to use the value-parameter of the cell content function directly (no need for entity['sensor.a']). The reason for this not working in the cell style function seems to be that your value is not a string but a number. You compare the sensor value to the string '0' and in Javascript 0 == '0' is true due to automatic type conversions, whereas 0 === '0' is false. You should be able to get it working by removing the single quotes if (value === 0) ... . Let me know if its working and I'll update the answer.– lupz
Mar 26 at 12:20
I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.
– DenMurphy
Mar 27 at 5:46
I have used entity['sensor.a'] instead of sensor.a directly as the datakey as it does not work properly with decimal places in the string name for a datakey. I have removed the nodeStatus function to avoid confusion and added a screenshot above. I have also tried removing the commas around the 0 next to value in the "Cell Style Function" and this did not work.
– DenMurphy
Mar 27 at 5:46
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55310608%2fhow-to-set-text-to-change-colour-on-if-else-results-in-a-thingsboard-widget-with%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Any news on this one? Please add the console output of this cell style function:
console.log(value, typeof (value)); return ;Please add the console output of this cell content function:console.log(value, typeof (value)); console.log(entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];– lupz
Apr 2 at 8:26
I am guessing you want me to do something with the Chrome Inspect tool (while selecting the Table)? I have tried adding both the above statements but get errors in the syntax of those statements: "Uncaught SyntaxError: Illegal return statement" on both.
– DenMurphy
Apr 4 at 5:01
I'd like to get insights on the sensor data. The scripts will generate output that you can see in the log-console of your browsers development tools. Please paste "console.log('style value', value, typeof (value)); return ;" (without the double quotes) into the cell style function field. Please paste "console.log('content value', value, typeof (value)); console.log('content entity', entity['sensor.a'], typeof (entity['sensor.a'])); return entity['sensor.a'];" (without the double quotes) into the cell content function field. Please add the console output to you question.
– lupz
Apr 5 at 11:35