Skip to content
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

In js/belchertown.js.tmpl function get_outTemp_color returns incorrect color when outTemp <= 0 and unit is "degree_C" #933

Open
PBudmark opened this issue Mar 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@PBudmark
Copy link

PBudmark commented Mar 10, 2024

While inspecting the code in js/belchertown.js.tmpl, this error was recognized:

The function get_outTemp_color in js/belchertown.js.tmpl is incorrect regarding outTemp when (unit == "degree_C) and low temperatures.
The first test (in line 194) is (outTemp <= 0) but should read (outTemp <= -17.8) to match Farenheit processing (in line 162)
This error was introduced in some of the initial commits.

#Line 193:
    } else if (unit == "degree_C") {
        if (outTemp <= 0) {
            var outTemp_color = "#1278c8";
        } else if (outTemp <= -3.8) {
            var outTemp_color = "#30bfef";
        } else if (outTemp <= 0) {
            var outTemp_color = "#1fafdd";
 #Line 161:
    if (unit == "degree_F") {
        if (outTemp <= 0) {  
            var outTemp_color = "#1278c8";
        } else if (outTemp <= 25) { 
            var outTemp_color = "#30bfef";
        } else if (outTemp <= 32) { 
            var outTemp_color = "#1fafdd";

@PBudmark PBudmark added the bug Something isn't working label Mar 10, 2024
@PBudmark PBudmark changed the title In js\belchertown.js.tmpl function get_outTemp_color returns incorrect color when outTemp <= 0 and unit is "degree_C" In js/belchertown.js.tmpl function get_outTemp_color returns incorrect color when outTemp <= 0 and unit is "degree_C" Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant