mirror of
https://github.com/esphome/esphome.git
synced 2025-01-22 05:44:04 +00:00
cdfbe5b523
* refactored xiaomi sensors * fix lint * fixed and added tests * fix namespace * LYWSD02 has no battery level * fixed enum * fix * fix case * fix spaces in empty line... * inform users of old sensors about the change
22 lines
489 B
C++
22 lines
489 B
C++
#include "xiaomi_lywsdcgq.h"
|
|
#include "esphome/core/log.h"
|
|
|
|
#ifdef ARDUINO_ARCH_ESP32
|
|
|
|
namespace esphome {
|
|
namespace xiaomi_lywsdcgq {
|
|
|
|
static const char *TAG = "xiaomi_lywsdcgq";
|
|
|
|
void XiaomiLYWSDCGQ::dump_config() {
|
|
ESP_LOGCONFIG(TAG, "Xiaomi LYWSDCGQ");
|
|
LOG_SENSOR(" ", "Temperature", this->temperature_);
|
|
LOG_SENSOR(" ", "Humidity", this->humidity_);
|
|
LOG_SENSOR(" ", "Battery Level", this->battery_level_);
|
|
}
|
|
|
|
} // namespace xiaomi_lywsdcgq
|
|
} // namespace esphome
|
|
|
|
#endif
|