mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[homewizard] Fix NumberFormatException
(#17792)
Signed-off-by: Leo Siepel <leosiepel@gmail.com> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
48429361b4
commit
12a09aadb3
@ -58,13 +58,13 @@ public class DataPayload {
|
||||
private int longPowerFailCount;
|
||||
|
||||
@SerializedName("active_voltage_v")
|
||||
private int activeVoltage;
|
||||
private double activeVoltage;
|
||||
@SerializedName("active_voltage_l1_v")
|
||||
private int activeVoltageL1;
|
||||
private double activeVoltageL1;
|
||||
@SerializedName("active_voltage_l2_v")
|
||||
private int activeVoltageL2;
|
||||
private double activeVoltageL2;
|
||||
@SerializedName("active_voltage_l3_v")
|
||||
private int activeVoltageL3;
|
||||
private double activeVoltageL3;
|
||||
|
||||
@SerializedName("active_current_a")
|
||||
private double activeCurrent;
|
||||
@ -175,7 +175,7 @@ public class DataPayload {
|
||||
*
|
||||
* @return current active voltage
|
||||
*/
|
||||
public int getActiveVoltage() {
|
||||
public double getActiveVoltage() {
|
||||
return activeVoltage;
|
||||
}
|
||||
|
||||
@ -184,7 +184,7 @@ public class DataPayload {
|
||||
*
|
||||
* @return active voltage on phase 1
|
||||
*/
|
||||
public int getActiveVoltageL1() {
|
||||
public double getActiveVoltageL1() {
|
||||
return activeVoltageL1;
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ public class DataPayload {
|
||||
*
|
||||
* @return active voltage on phase 2
|
||||
*/
|
||||
public int getActiveVoltageL2() {
|
||||
public double getActiveVoltageL2() {
|
||||
return activeVoltageL2;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ public class DataPayload {
|
||||
*
|
||||
* @return active voltage on phase 3
|
||||
*/
|
||||
public int getActiveVoltageL3() {
|
||||
public double getActiveVoltageL3() {
|
||||
return activeVoltageL3;
|
||||
}
|
||||
|
||||
|
@ -47,10 +47,10 @@ public class P1PayloadTest {
|
||||
assertThat(key.getActivePowerL1W(), is(-676));
|
||||
assertThat(key.getActivePowerL2W(), is(133));
|
||||
assertThat(key.getActivePowerL3W(), is(18));
|
||||
assertThat(key.getActiveVoltage(), is(220));
|
||||
assertThat(key.getActiveVoltageL1(), is(221));
|
||||
assertThat(key.getActiveVoltageL2(), is(222));
|
||||
assertThat(key.getActiveVoltageL3(), is(223));
|
||||
assertThat(key.getActiveVoltage(), is(220.0));
|
||||
assertThat(key.getActiveVoltageL1(), is(221.0));
|
||||
assertThat(key.getActiveVoltageL2(), is(222.0));
|
||||
assertThat(key.getActiveVoltageL3(), is(223.0));
|
||||
assertThat(key.getTotalEnergyExportT1Kwh(), is(8874.0));
|
||||
assertThat(key.getTotalEnergyExportT2Kwh(), is(7788.0));
|
||||
assertThat(key.getTotalEnergyImportT1Kwh(), is(10830.511));
|
||||
@ -80,10 +80,10 @@ public class P1PayloadTest {
|
||||
assertThat(key.getActivePowerL1W(), is(0));
|
||||
assertThat(key.getActivePowerL2W(), is(0));
|
||||
assertThat(key.getActivePowerL3W(), is(0));
|
||||
assertThat(key.getActiveVoltage(), is(0));
|
||||
assertThat(key.getActiveVoltageL1(), is(0));
|
||||
assertThat(key.getActiveVoltageL2(), is(0));
|
||||
assertThat(key.getActiveVoltageL3(), is(0));
|
||||
assertThat(key.getActiveVoltage(), is(0.0));
|
||||
assertThat(key.getActiveVoltageL1(), is(0.0));
|
||||
assertThat(key.getActiveVoltageL2(), is(0.0));
|
||||
assertThat(key.getActiveVoltageL3(), is(0.0));
|
||||
assertThat(key.getAnyPowerFailCount(), is(0));
|
||||
assertThat(key.getLongPowerFailCount(), is(0));
|
||||
assertThat(key.getTotalEnergyExportT1Kwh(), is(0.0));
|
||||
|
Loading…
Reference in New Issue
Block a user