1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-04 11:02:19 +01:00

Introduce hex parsing & formatting helper functions (#2882)

This commit is contained in:
Oxan van Leeuwen
2021-12-12 21:15:23 +01:00
committed by GitHub
parent b2f05faee0
commit beeb0c7c5a
20 changed files with 186 additions and 109 deletions

View File

@@ -10,7 +10,7 @@ static const char *const TAG = "xiaomi_cgdk2";
void XiaomiCGDK2::dump_config() {
ESP_LOGCONFIG(TAG, "Xiaomi CGDK2");
ESP_LOGCONFIG(TAG, " Bindkey: %s", hexencode(this->bindkey_, 16).c_str());
ESP_LOGCONFIG(TAG, " Bindkey: %s", format_hex_pretty(this->bindkey_, 16).c_str());
LOG_SENSOR(" ", "Temperature", this->temperature_);
LOG_SENSOR(" ", "Humidity", this->humidity_);
LOG_SENSOR(" ", "Battery Level", this->battery_level_);