mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
Add support for MHO-C401 (#1486)
Committer: nikito7 Co-authored-by: vevsvevs <v-v@mail.ru> Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Co-authored-by: nikito7 <root@vbox.lan>
This commit is contained in:
@@ -194,6 +194,9 @@ optional<XiaomiParseResult> parse_xiaomi_header(const esp32_ble_tracker::Service
|
||||
result.name = "MJYD02YLA";
|
||||
if (raw.size() == 19)
|
||||
result.raw_offset -= 6;
|
||||
} else if ((raw[2] == 0x87) && (raw[3] == 0x03)) { // square body, e-ink display
|
||||
result.type = XiaomiParseResult::TYPE_MHOC401;
|
||||
result.name = "MHOC401";
|
||||
} else {
|
||||
ESP_LOGVV(TAG, "parse_xiaomi_header(): unknown device, no magic bytes.");
|
||||
return {};
|
||||
|
||||
@@ -21,7 +21,8 @@ struct XiaomiParseResult {
|
||||
TYPE_JQJCY01YM,
|
||||
TYPE_MUE4094RT,
|
||||
TYPE_WX08ZM,
|
||||
TYPE_MJYD02YLA
|
||||
TYPE_MJYD02YLA,
|
||||
TYPE_MHOC401
|
||||
} type;
|
||||
std::string name;
|
||||
optional<float> temperature;
|
||||
|
||||
Reference in New Issue
Block a user