mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[smartmeter] Fix NPE while trying to get ChannelType (#10007)
Fixes #10006 Signed-off-by: Stefan Triller <github@stefantriller.de>
This commit is contained in:
parent
4c7f9efffa
commit
f2ea947424
@ -107,6 +107,7 @@ public class SmartMeterChannelTypeProvider implements ChannelTypeProvider, Meter
|
|||||||
* @return The {@link ChannelTypeUID} or null.
|
* @return The {@link ChannelTypeUID} or null.
|
||||||
*/
|
*/
|
||||||
public ChannelTypeUID getChannelTypeIdForObis(String obis) {
|
public ChannelTypeUID getChannelTypeIdForObis(String obis) {
|
||||||
return obisChannelMap.get(obis).getUID();
|
ChannelType channeltype = obisChannelMap.get(obis);
|
||||||
|
return channeltype != null ? channeltype.getUID() : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user