[smartmeter] Fix NPE while trying to get ChannelType (#10007)
Fixes #10006 Signed-off-by: Stefan Triller <github@stefantriller.de>
This commit is contained in:
@@ -107,6 +107,7 @@ public class SmartMeterChannelTypeProvider implements ChannelTypeProvider, Meter
|
||||
* @return The {@link ChannelTypeUID} or null.
|
||||
*/
|
||||
public ChannelTypeUID getChannelTypeIdForObis(String obis) {
|
||||
return obisChannelMap.get(obis).getUID();
|
||||
ChannelType channeltype = obisChannelMap.get(obis);
|
||||
return channeltype != null ? channeltype.getUID() : null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user