[solarmax] Improve binding with respect to channel Current Power Generated (#16397)

Modified units for CHANNEL_CURRENT_POWER GENERATED to Units.WATT (was: Units.WATT_HOURS)

Signed-off-by: peter-schaeffer <120140346+peter-schaeffer@users.noreply.github.com>
This commit is contained in:
peter-schaeffer 2024-02-16 09:50:57 +01:00 committed by GitHub
parent 779d1c5193
commit 6b532388b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ public enum SolarMaxChannel {
CHANNEL_ENERGY_GENERATED_LAST_YEAR(SolarMaxCommandKey.energyGeneratedLastYear.name(), Units.WATT_HOUR),
CHANNEL_ENERGY_GENERATED_THIS_MONTH(SolarMaxCommandKey.energyGeneratedThisMonth.name(), Units.WATT_HOUR),
CHANNEL_ENERGY_GENERATED_THIS_YEAR(SolarMaxCommandKey.energyGeneratedThisYear.name(), Units.WATT_HOUR),
CHANNEL_CURRENT_POWER_GENERATED(SolarMaxCommandKey.currentPowerGenerated.name(), Units.WATT_HOUR),
CHANNEL_CURRENT_POWER_GENERATED(SolarMaxCommandKey.currentPowerGenerated.name(), Units.WATT),
CHANNEL_AC_FREQUENCY(SolarMaxCommandKey.acFrequency.name(), Units.HERTZ),
CHANNEL_AC_PHASE1_VOLTAGE(SolarMaxCommandKey.acPhase1Voltage.name(), Units.VOLT),
CHANNEL_AC_PHASE2_VOLTAGE(SolarMaxCommandKey.acPhase2Voltage.name(), Units.VOLT),

View File

@ -182,7 +182,7 @@ public class SolarMaxData {
}
public Number getCurrentPowerGenerated() {
return getIntegerValueFrom(SolarMaxCommandKey.currentPowerGenerated, 0.5);
return getDecimalValueFrom(SolarMaxCommandKey.currentPowerGenerated, 0.5);
}
Number getAcFrequency() {