smartfritz-promise
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "smartfritz-promise", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "SmartHome for Fritz!Box and Dect!200 Node to communicate with AVM FritzBox over the aha-http-interface", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -115,3 +115,8 @@ /** | ||
// temperature conversion | ||
/* | ||
* Temperature conversion | ||
*/ | ||
const MIN_TEMP = 8; | ||
const MAX_TEMP = 28; | ||
function temp2api(temp) | ||
@@ -126,9 +131,4 @@ { | ||
else { | ||
if (temp < 8) | ||
temp = 8; | ||
else if (temp > 28) | ||
temp = 28; | ||
// 0.5C accuracy | ||
res = Math.round((temp - 8) * 2) + 16; | ||
res = Math.round((Math.min(Math.max(temp, MIN_TEMP), MAX_TEMP) - 8) * 2) + 16; | ||
} | ||
@@ -156,2 +156,5 @@ | ||
// supported temperature range | ||
module.exports.MIN_TEMP = MIN_TEMP; | ||
module.exports.MAX_TEMP = MAX_TEMP; | ||
@@ -158,0 +161,0 @@ /* |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20921
409