diff --git a/bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/type/HomematicTypeGeneratorImpl.java b/bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/type/HomematicTypeGeneratorImpl.java index 147c65c347ead..6577cb77f1e8d 100644 --- a/bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/type/HomematicTypeGeneratorImpl.java +++ b/bundles/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/type/HomematicTypeGeneratorImpl.java @@ -169,8 +169,8 @@ public void generate(HmDevice device) { ChannelGroupTypeUID groupTypeUID = UidUtils.generateChannelGroupTypeUID(channel); ChannelGroupType groupType = channelGroupTypeProvider.getInternalChannelGroupType(groupTypeUID); if (groupType == null || device.isGatewayExtras()) { - String groupLabel = String.format("%s", - MiscUtils.capitalize(channel.getType().replace("_", " "))); + String groupLabel = String.format("%s", channel.getType() == null ? null + : MiscUtils.capitalize(channel.getType().replace("_", " "))); groupType = ChannelGroupTypeBuilder.instance(groupTypeUID, groupLabel) .withChannelDefinitions(channelDefinitions).build(); channelGroupTypeProvider.addChannelGroupType(groupType); @@ -355,7 +355,8 @@ public ParameterOption createOption(String value, String description) { Number defaultValue = (Number) dp.getDefaultValue(); Number maxValue = dp.getMaxValue(); // some datapoints can have a default value that is greater than the maximum value - if (defaultValue.doubleValue() > maxValue.doubleValue()) { + if (defaultValue != null && maxValue != null + && defaultValue.doubleValue() > maxValue.doubleValue()) { maxValue = defaultValue; } builder.withMinimum(MetadataUtils.createBigDecimal(dp.getMinValue()));