-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MMM-ArduPort.js #7
base: master
Are you sure you want to change the base?
Conversation
Thanks for PR @LilCritical, would you mind adding a working screenshot? 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Added some reviews.
MMM-ArduPort.js
Outdated
if(sensor.name == "LM35") {val.innerHTML = sensor.value + " °C";} | ||
if(sensor.name == "MQ2") {val.innerHTML = sensor.value + " %";} | ||
if(sensor.name == "HCSR04") {val.innerHTML = sensor.value + " cm";} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to hard-code the formats here. We have format options, see here: https://github.com/Dentrax/MMM-ArduPort#configuration-options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hardcoding this is what fixed this issue since
formatValue: function(value, sensor) {
is not working properly ( value remains undefined )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, got it. Instead of applying a workaround, have you enough free time to find the root cause and apply the fix in the correct place? I would be very grateful if you could give a hand for this. 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, got it. Instead of applying a workaround, have you enough free time to find the root cause and apply the fix in the correct place? I would be very grateful if you could give a hand for this. 🙏
i will try to fix , but i need todo more research , fairly new to this type of coding.
but i am familiar with python and js , but more in bot developing
MMM-ArduPort.js
Outdated
|
||
description.innerHTML = sensor.description; | ||
row.appendChild(description); | ||
var description = document.createElement("div"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider add new tab \t
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this i forgot to add
Thanks for your review i will look into it after work ✌️ |
fix without hardcoding
fix without hardcoding sensors
Fix for not showing data on mirror