-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
device supportRequest for a new/improved device decoderRequest for a new/improved device decoderfeedbackrequest for more information; may be closed id 30d if not receivedrequest for more information; may be closed id 30d if not received
Description
I have a LaCrosse TX compatible temperature/humidity sensor which sometimes report --
for the humidity on the base station.
The raw value in this case is 0x0FF
. Due to the fact, that there is no additional check, the BCD decoder gives me 16.5
for the false value.
What about two and a half extra lines of code to make it nicer?
-- snip --
uint16_t msg_value_raw = (msg_nybbles[5] << 8) | (msg_nybbles[6] << 4) | msg_nybbles[7];
-- snip --
"humidity", "Humidity", DATA_COND, msg_value_raw != 0xff, DATA_FORMAT, "%.1f %%", DATA_DOUBLE, msg_value,
"humidity", "Humidity", DATA_COND, msg_value_raw == 0xff, DATA_STRING, "invalid",
-- snip --
Metadata
Metadata
Assignees
Labels
device supportRequest for a new/improved device decoderRequest for a new/improved device decoderfeedbackrequest for more information; may be closed id 30d if not receivedrequest for more information; may be closed id 30d if not received