Skip to content

scaling nuheat to celsius and fahrenheit #22

Description

@iofo

It looks like the nuheat value is just Celsius * 100.
The conversion method does not correspond to this however. Do you have any documentation on the specification of the nuheat API return value?

Thanks

Activity

  1. iofo commented on Jan 14, 2026

    @iofo
    Author

    just to clarify I found this in the javascript of their mynuheat.com which led me down this rabbit hole in the first place.

    `function getTemperatureAndUnit(temp, put_temp_letter) {

    var using_celcius = getStorageValue(key_temperature_unit);
    
    if (temp > 7000)
        return "--";
    
    var temperature = temp / 100;
    
    if (using_celcius == 'true') {
        //round to half
        temperature = Math.round(temperature * 2) / 2;
        if (put_temp_letter) {
            if (temperature<100)
                temp = temperature.toFixed(1) + " &deg;C";
            else
                temp = temperature.toFixed(0) + " &deg;C";
        } else {
            if (temperature < 100)
                temp = temperature.toFixed(1) + "&deg;";
            else
                temp = temperature.toFixed(0) + "&deg;";
        }
    } else {
        temperature = (temperature * 9 / 5) + 32;
        if (put_temp_letter)
            temp = temperature.toFixed(0) + " &deg;F";
        else
            temp = temperature.toFixed(0) + "&deg;";
    }
        
    return temp;
    

    }`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions