Skip to content

LaCrosse TX, invalid humidity value #2329

@rstephan

Description

@rstephan

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

No one assigned

    Labels

    device supportRequest for a new/improved device decoderfeedbackrequest for more information; may be closed id 30d if not received

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions