Skip to content

Commit a383fed

Browse files
committed
Ensure heater type property is non-null
1 parent 22afb22 commit a383fed

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • bundles/org.openhab.binding.haywardomnilogiclocal/src/main/java/org/openhab/binding/haywardomnilogiclocal/internal/discovery

bundles/org.openhab.binding.haywardomnilogiclocal/src/main/java/org/openhab/binding/haywardomnilogiclocal/internal/discovery/HaywardDiscoveryService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ public synchronized void mspConfigDiscovery(String xmlResponse) {
125125
if (heaterId != null) {
126126
heaterProps.put(HaywardBindingConstants.PROPERTY_SYSTEM_ID, heaterId);
127127
}
128-
if (heater.getType() != null) {
129-
heaterProps.put(HaywardBindingConstants.PROPERTY_HEATER_TYPE, heater.getType());
128+
String type = heater.getType();
129+
if (type != null) {
130+
heaterProps.put(HaywardBindingConstants.PROPERTY_HEATER_TYPE, type);
130131
}
131132
onDeviceDiscovered(HaywardBindingConstants.THING_TYPE_HEATER,
132133
heaterId != null ? heaterId : "Heater", heaterProps);

0 commit comments

Comments
 (0)