mirror of
https://github.com/esphome/esphome.git
synced 2024-11-13 02:37:47 +01:00
Add support for Mopeka Pro+ Residential sensor (#3393)
* Add support for Pro+ Residential sensor (enum) The Mopeka Pro+ Residential sensor is very similar to the Pro sensor, but includes a longer range antenna, and maybe hardware? The Pro+ identifies itself with 0x08 sensor type. * Add logic to support Pro+ Residential sensor * Fix formatting
This commit is contained in:
parent
988d3ea8ba
commit
9576d246ee
2 changed files with 4 additions and 2 deletions
|
@ -52,7 +52,8 @@ bool MopekaProCheck::parse_device(const esp32_ble_tracker::ESPBTDevice &device)
|
||||||
|
|
||||||
// Now parse the data - See Datasheet for definition
|
// Now parse the data - See Datasheet for definition
|
||||||
|
|
||||||
if (static_cast<SensorType>(manu_data.data[0]) != STANDARD_BOTTOM_UP) {
|
if (static_cast<SensorType>(manu_data.data[0]) != STANDARD_BOTTOM_UP &&
|
||||||
|
static_cast<SensorType>(manu_data.data[0]) != PLUS_BOTTOM_UP) {
|
||||||
ESP_LOGE(TAG, "Unsupported Sensor Type (0x%X)", manu_data.data[0]);
|
ESP_LOGE(TAG, "Unsupported Sensor Type (0x%X)", manu_data.data[0]);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,8 @@ namespace mopeka_pro_check {
|
||||||
enum SensorType {
|
enum SensorType {
|
||||||
STANDARD_BOTTOM_UP = 0x03,
|
STANDARD_BOTTOM_UP = 0x03,
|
||||||
TOP_DOWN_AIR_ABOVE = 0x04,
|
TOP_DOWN_AIR_ABOVE = 0x04,
|
||||||
BOTTOM_UP_WATER = 0x05
|
BOTTOM_UP_WATER = 0x05,
|
||||||
|
PLUS_BOTTOM_UP = 0x08
|
||||||
// all other values are reserved
|
// all other values are reserved
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue