mirror of
https://github.com/esphome/esphome.git
synced 2025-03-02 06:52:27 +01:00
* 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
23 lines
607 B
C++
23 lines
607 B
C++
#include "xiaomi_hhccjcy01.h"
|
|
#include "esphome/core/log.h"
|
|
|
|
#ifdef ARDUINO_ARCH_ESP32
|
|
|
|
namespace esphome {
|
|
namespace xiaomi_hhccjcy01 {
|
|
|
|
static const char *TAG = "xiaomi_hhccjcy01";
|
|
|
|
void XiaomiHHCCJCY01::dump_config() {
|
|
ESP_LOGCONFIG(TAG, "Xiaomi HHCCJCY01");
|
|
LOG_SENSOR(" ", "Temperature", this->temperature_);
|
|
LOG_SENSOR(" ", "Moisture", this->moisture_);
|
|
LOG_SENSOR(" ", "Conductivity", this->conductivity_);
|
|
LOG_SENSOR(" ", "Illuminance", this->illuminance_);
|
|
LOG_SENSOR(" ", "Battery Level", this->battery_level_);
|
|
}
|
|
|
|
} // namespace xiaomi_hhccjcy01
|
|
} // namespace esphome
|
|
|
|
#endif
|