Report humidity for Oregon 0x1A2D. This closes #221.
This commit is contained in:
parent
aa16302e1e
commit
35dbc0a980
1 changed files with 3 additions and 1 deletions
|
|
@ -115,10 +115,12 @@ std::string ProtocolOregon::decode1A2D(const std::string &data) {
|
||||||
if (neg) {
|
if (neg) {
|
||||||
temperature = -temperature;
|
temperature = -temperature;
|
||||||
}
|
}
|
||||||
|
int humidity = (hum1 * 10.0) + hum2;
|
||||||
|
|
||||||
std::stringstream retString;
|
std::stringstream retString;
|
||||||
retString << "class:sensor;protocol:oregon;model:1A2D;id:" << static_cast<int>(address)
|
retString << "class:sensor;protocol:oregon;model:1A2D;id:" << static_cast<int>(address)
|
||||||
<< ";temp:" << std::fixed << std::setprecision(1) << temperature << ";";
|
<< ";temp:" << std::fixed << std::setprecision(1) << temperature
|
||||||
|
<< ";humidity:" << humidity << ";";
|
||||||
|
|
||||||
return retString.str();
|
return retString.str();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue