[atm90e32] Fix phase angle precision loss and remove unused member (#15238)

This commit is contained in:
Jonathan Swoboda
2026-03-27 08:39:30 -10:00
committed by GitHub
parent 53bd57f3c2
commit 951ad91cb2
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -550,8 +550,8 @@ float ATM90E32Component::get_phase_harmonic_active_power_(uint8_t phase) {
}
float ATM90E32Component::get_phase_angle_(uint8_t phase) {
uint16_t val = this->read16_(ATM90E32_REGISTER_PANGLE + phase) / 10.0;
return (val > 180) ? (float) (val - 360.0f) : (float) val;
float val = this->read16_(ATM90E32_REGISTER_PANGLE + phase) / 10.0f;
return (val > 180.0f) ? val - 360.0f : val;
}
float ATM90E32Component::get_phase_peak_current_(uint8_t phase) {
-1
View File
@@ -134,7 +134,6 @@ class ATM90E32Component : public PollingComponent,
void set_freq_status_text_sensor(text_sensor::TextSensor *sensor) { this->freq_status_text_sensor_ = sensor; }
#endif
uint16_t calculate_voltage_threshold(int line_freq, uint16_t ugain, float multiplier);
int32_t last_periodic_millis = millis();
protected:
#ifdef USE_NUMBER