You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When no humidity sensor is connected there is an error
Unable to change state of Readings.humidity: Error: undefined is not a valid state value
Always return a value in decodeHumidity, e.g.
**
* Relative humidity values need to be according to the formula
* (value - 51) / 2.04 and it will result in a value between 0%
* and 100%.
* @param reading the encoded humidity value
*/
public static decodeHumidity(reading: number): number | undefined {
let result = (reading-51) / 2.04;
return ((result>=0) && (result<=100)) ? result : 0;
}
The text was updated successfully, but these errors were encountered:
When no humidity sensor is connected there is an error
Unable to change state of Readings.humidity: Error: undefined is not a valid state value
Always return a value in decodeHumidity, e.g.
**
* Relative humidity values need to be according to the formula
* (value - 51) / 2.04 and it will result in a value between 0%
* and 100%.
* @param reading the encoded humidity value
*/
public static decodeHumidity(reading: number): number | undefined {
let result = (reading-51) / 2.04;
return ((result>=0) && (result<=100)) ? result : 0;
}
The text was updated successfully, but these errors were encountered: