-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
miot_th.h
30 lines (22 loc) · 906 Bytes
/
miot_th.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include "esphome/core/component.h"
#include "esphome/components/sensor/sensor.h"
#include "../miot/miot.h"
namespace esphome {
namespace miot_th {
class MiotTH : public miot::MiotComponent, public sensor::Sensor {
public:
void dump_config() override;
void set_humidity(sensor::Sensor *humidity) { this->humidity_ = humidity; }
protected:
sensor::Sensor *humidity_{nullptr};
bool process_object_(const miot::BLEObject &obj) override;
void process_temperature_(const miot::BLEObject &obj);
void process_humidity_(const miot::BLEObject &obj);
void process_temperature_humidity_(const miot::BLEObject &obj);
void process_miaomiaoce_temperature_1001_(const miot::BLEObject &obj);
void process_miaomiaoce_humidity_1008_(const miot::BLEObject &obj);
void process_miaomiaoce_humidity_1002_(const miot::BLEObject &obj);
};
} // namespace miot_th
} // namespace esphome