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 · 1 comment
Labels
bug Something isn't working stale Issue has not had activity

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
Copy link

stale bot commented Jan 31, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had activity label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Issue has not had activity
Projects
None yet
Development

No branches or pull requests

1 participant