mirror of
https://github.com/esphome/esphome.git
synced 2025-01-03 11:21:43 +01:00
mark codeowner, make functions protected
This commit is contained in:
parent
6f36463786
commit
212604bebe
3 changed files with 8 additions and 4 deletions
|
@ -28,15 +28,15 @@ class ATCMiThermometer : public Component, public esp32_ble_tracker::ESPBTDevice
|
|||
void set_humidity(sensor::Sensor *humidity) { humidity_ = humidity; }
|
||||
void set_battery_level(sensor::Sensor *battery_level) { battery_level_ = battery_level; }
|
||||
|
||||
optional<ParseResult> parse_header(const esp32_ble_tracker::ServiceData &service_data);
|
||||
bool parse_message(const std::vector<uint8_t> &message, ParseResult &result);
|
||||
bool report_results(const optional<ParseResult> &result, const std::string &address);
|
||||
|
||||
protected:
|
||||
uint64_t address_;
|
||||
sensor::Sensor *temperature_{nullptr};
|
||||
sensor::Sensor *humidity_{nullptr};
|
||||
sensor::Sensor *battery_level_{nullptr};
|
||||
|
||||
optional<ParseResult> parse_header(const esp32_ble_tracker::ServiceData &service_data);
|
||||
bool parse_message(const std::vector<uint8_t> &message, ParseResult &result);
|
||||
bool report_results(const optional<ParseResult> &result, const std::string &address);
|
||||
};
|
||||
|
||||
} // namespace atc_mithermometer
|
||||
|
|
|
@ -36,3 +36,5 @@ def to_code(config):
|
|||
if CONF_BATTERY_LEVEL in config:
|
||||
sens = yield sensor.new_sensor(config[CONF_BATTERY_LEVEL])
|
||||
cg.add(var.set_battery_level(sens))
|
||||
|
||||
CODEOWNERS = ['@ahpohl']
|
|
@ -40,3 +40,5 @@ def to_code(config):
|
|||
if CONF_BATTERY_LEVEL in config:
|
||||
sens = yield sensor.new_sensor(config[CONF_BATTERY_LEVEL])
|
||||
cg.add(var.set_battery_level(sens))
|
||||
|
||||
CODEOWNERS = ['@ahpohl']
|
Loading…
Reference in a new issue