]> git.basschouten.com Git - openhab-addons.git/commitdiff
[teleinfo] Use new apparent power unit (#9456)
authorolivierkeke <olivierkeke@users.noreply.github.com>
Wed, 23 Dec 2020 03:08:39 +0000 (04:08 +0100)
committerGitHub <noreply@github.com>
Wed, 23 Dec 2020 03:08:39 +0000 (19:08 -0800)
* Use new apparent power unit
* Apply spotless formatting

Signed-off-by: Olivier Marceau <hollysaiqs@marceau.ovh>
bundles/org.openhab.binding.teleinfo/src/main/java/org/openhab/binding/teleinfo/internal/handler/cbemm/evoicc/TeleinfoAbstractCbemmEvoIccElectricityMeterHandler.java
bundles/org.openhab.binding.teleinfo/src/main/java/org/openhab/binding/teleinfo/internal/handler/cbetm/TeleinfoAbstractCbetmElectricityMeterHandler.java

index de596140ff65d9d7436dfd227c22804e6361ac87..87db0052d21d4336757883cd8dfe060808ab2367 100644 (file)
@@ -38,6 +38,6 @@ public abstract class TeleinfoAbstractCbemmEvoIccElectricityMeterHandler
 
     protected void updateStatesForCommonCbemmEvolutionIccChannels(FrameCbemmEvolutionIcc frame) {
         updateStatesForCommonCbemmChannels(frame);
-        updateState(CHANNEL_CBEMM_EVOLUTION_ICC_PAPP, QuantityType.valueOf(frame.getPapp(), Units.WATT));
+        updateState(CHANNEL_CBEMM_EVOLUTION_ICC_PAPP, QuantityType.valueOf(frame.getPapp(), Units.VOLT_AMPERE));
     }
 }
index 7ba38839dc8c0a0a6d827b1df2b09100e07e9c32..d48e9745de5939dc3e4280680d82058b78dd2a51 100644 (file)
@@ -68,7 +68,7 @@ public abstract class TeleinfoAbstractCbetmElectricityMeterHandler extends Telei
             }
 
             updateState(CHANNEL_CBETM_LONG_PMAX, QuantityType.valueOf(frameCbetmLong.getPmax(), Units.WATT));
-            updateState(CHANNEL_CBETM_LONG_PAPP, QuantityType.valueOf(frameCbetmLong.getPapp(), Units.WATT));
+            updateState(CHANNEL_CBETM_LONG_PAPP, QuantityType.valueOf(frameCbetmLong.getPapp(), Units.VOLT_AMPERE));
             updateState(CHANNEL_CBETM_LONG_PPOT, new StringType(frameCbetmLong.getPpot()));
 
             updateState(CHANNEL_CBETM_SHORT_ADIR1, UnDefType.NULL);