Add support for Lippert LP sensors in mopeka_pro_check component (#4118)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes https://github.com/esphome/feature-requests/issues/1988
This commit is contained in:
Bob Perciaccante 2023-02-08 17:07:41 -05:00 committed by GitHub
parent a9dc491a54
commit e460792c43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,7 @@ bool MopekaProCheck::parse_device(const esp32_ble_tracker::ESPBTDevice &device)
// Now parse the data - See Datasheet for definition
if (static_cast<SensorType>(manu_data.data[0]) != STANDARD_BOTTOM_UP &&
static_cast<SensorType>(manu_data.data[0]) != LIPPERT_BOTTOM_UP &&
static_cast<SensorType>(manu_data.data[0]) != PLUS_BOTTOM_UP) {
ESP_LOGE(TAG, "Unsupported Sensor Type (0x%X)", manu_data.data[0]);
return false;

View File

@ -15,6 +15,7 @@ enum SensorType {
STANDARD_BOTTOM_UP = 0x03,
TOP_DOWN_AIR_ABOVE = 0x04,
BOTTOM_UP_WATER = 0x05,
LIPPERT_BOTTOM_UP = 0x06,
PLUS_BOTTOM_UP = 0x08
// all other values are reserved
};