add xiaomi BLE Thermometer lywsd02 model support (#664)

* add xiaomi BLE Thermometer lywsd02 model support

* remove battery level

* Update sensor.py

to pass the lint test
https://github.com/esphome/esphome/pull/664

* fix trailing space


Co-authored-by: Guoxue <gx@m15.cn>
Co-authored-by: mr G1K <mr@g1k.ru>
This commit is contained in:
junnikokuki
2019-08-28 03:06:39 +08:00
committed by Otto Winter
parent 9770bc371b
commit 65d08beaa4
6 changed files with 115 additions and 4 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ namespace esphome {
namespace xiaomi_ble {
struct XiaomiParseResult {
enum { TYPE_MIJIA, TYPE_MIFLORA } type;
enum { TYPE_MIJIA, TYPE_MIFLORA, TYPE_LYWSD02 } type;
optional<float> temperature;
optional<float> humidity;
optional<float> battery_level;