mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00: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:
		| @@ -52,7 +52,8 @@ 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) { | ||||
|   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]); | ||||
|     return false; | ||||
|   } | ||||
|   | ||||
| @@ -12,7 +12,8 @@ namespace mopeka_pro_check { | ||||
| enum SensorType { | ||||
|   STANDARD_BOTTOM_UP = 0x03, | ||||
|   TOP_DOWN_AIR_ABOVE = 0x04, | ||||
|   BOTTOM_UP_WATER = 0x05 | ||||
|   BOTTOM_UP_WATER = 0x05, | ||||
|   PLUS_BOTTOM_UP = 0x08 | ||||
|   // all other values are reserved | ||||
| }; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user