ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
xiaomi_hhccpot002.cpp
Go to the documentation of this file.
1#include "xiaomi_hhccpot002.h"
2#include "esphome/core/log.h"
3
5
6ESPHOME_LOG_TAG(TAG, "xiaomi_hhccpot002");
7
9 ESP_LOGCONFIG(TAG, "Xiaomi HHCCPOT002");
10 LOG_SENSOR(" ", "Moisture", this->moisture_sensor_);
11 LOG_SENSOR(" ", "Conductivity", this->conductivity_sensor_);
12}
13
15 publish_optional(this->moisture_sensor_, res.moisture);
16 publish_optional(this->conductivity_sensor_, res.conductivity);
17}
18
19} // namespace esphome::xiaomi_hhccpot002
virtual void dump_config()
void publish_result(const xiaomi_ble::XiaomiParseResult &res) override
ESPHOME_LOG_TAG(TAG, "xiaomi_hhccpot002")
void publish_optional(E *entity, const optional< V > &value)
Publish value to entity when the entity is configured and the value is set.