mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-26 15:21:41 +01:00
[fronius] Accept null value as zero for inverterdatachannelpac channel (#9087)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This commit is contained in:
parent
3160856dfb
commit
49a908c6ff
@ -93,7 +93,12 @@ public class FroniusSymoInverterHandler extends FroniusBaseThingHandler {
|
|||||||
}
|
}
|
||||||
return day;
|
return day;
|
||||||
case FroniusBindingConstants.InverterDataChannelPac:
|
case FroniusBindingConstants.InverterDataChannelPac:
|
||||||
return inverterRealtimeResponse.getBody().getData().getPac();
|
ValueUnit pac = inverterRealtimeResponse.getBody().getData().getPac();
|
||||||
|
if (pac == null) {
|
||||||
|
pac = new ValueUnit();
|
||||||
|
pac.setValue(0);
|
||||||
|
}
|
||||||
|
return pac;
|
||||||
case FroniusBindingConstants.InverterDataChannelTotal:
|
case FroniusBindingConstants.InverterDataChannelTotal:
|
||||||
ValueUnit total = inverterRealtimeResponse.getBody().getData().getTotalEnergy();
|
ValueUnit total = inverterRealtimeResponse.getBody().getData().getTotalEnergy();
|
||||||
if (total != null) {
|
if (total != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user