mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-13 08:03:32 +02:00
Fix compile with latest esp-idf on esp32c6 (#5677)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "pzem004t.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace pzem004t {
|
||||
@@ -75,7 +76,7 @@ void PZEM004T::loop() {
|
||||
uint32_t energy = (uint32_t(resp[1]) << 16) | (uint32_t(resp[2]) << 8) | (uint32_t(resp[3]));
|
||||
if (this->energy_sensor_ != nullptr)
|
||||
this->energy_sensor_->publish_state(energy);
|
||||
ESP_LOGD(TAG, "Got Energy %u Wh", energy);
|
||||
ESP_LOGD(TAG, "Got Energy %" PRIu32 " Wh", energy);
|
||||
this->write_state_(DONE);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user