1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 22:22:22 +01: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:
DAVe3283
2023-11-05 16:13:01 -07:00
committed by GitHub
parent 3ee85d7516
commit e0cee472c3
29 changed files with 132 additions and 88 deletions

View File

@@ -217,7 +217,7 @@ void CSE7761Component::get_data_() {
this->voltage_sensor_->publish_state(voltage);
}
for (uint32_t channel = 0; channel < 2; channel++) {
for (uint8_t channel = 0; channel < 2; channel++) {
// Active power = PowerPA * PowerPAC * 1000 / 0x80000000
float active_power = (float) this->data_.active_power[channel] / this->coefficient_by_unit_(POWER_PAC); // W
float amps = (float) this->data_.current_rms[channel] / this->coefficient_by_unit_(RMS_IAC); // A