diff --git a/bundles/org.openhab.io.neeo/src/main/java/org/openhab/io/neeo/internal/models/NeeoDeviceChannel.java b/bundles/org.openhab.io.neeo/src/main/java/org/openhab/io/neeo/internal/models/NeeoDeviceChannel.java index 2338d49c0..9b4cd7a36 100644 --- a/bundles/org.openhab.io.neeo/src/main/java/org/openhab/io/neeo/internal/models/NeeoDeviceChannel.java +++ b/bundles/org.openhab.io.neeo/src/main/java/org/openhab/io/neeo/internal/models/NeeoDeviceChannel.java @@ -54,8 +54,7 @@ public class NeeoDeviceChannel { private final String label; /** The action/text value */ - @Nullable - private final String value; // could be either a format (text label) or a value to send (button) + private final @Nullable String value; // could be either a format (text label) or a value to send (button) /** The device channel range */ private final NeeoDeviceChannelRange range; @@ -236,8 +235,7 @@ public class NeeoDeviceChannel { * * @return the value */ - @Nullable - public String getValue() { + public @Nullable String getValue() { return value; } diff --git a/bundles/org.openhab.io.neeo/src/main/java/org/openhab/io/neeo/internal/servletservices/NeeoBrainService.java b/bundles/org.openhab.io.neeo/src/main/java/org/openhab/io/neeo/internal/servletservices/NeeoBrainService.java index 75a246026..e47bdff91 100644 --- a/bundles/org.openhab.io.neeo/src/main/java/org/openhab/io/neeo/internal/servletservices/NeeoBrainService.java +++ b/bundles/org.openhab.io.neeo/src/main/java/org/openhab/io/neeo/internal/servletservices/NeeoBrainService.java @@ -251,7 +251,8 @@ public class NeeoBrainService extends DefaultServletService { final NeeoDeviceChannel channel = device.getChannel(pathInfo.getItemName(), pathInfo.getSubType(), pathInfo.getChannelNbr()); if (channel != null && channel.getKind() == NeeoDeviceChannelKind.TRIGGER) { - final ChannelTriggeredEvent event = ThingEventFactory.createTriggerEvent(channel.getValue(), + String value = channel.getValue(); + final ChannelTriggeredEvent event = ThingEventFactory.createTriggerEvent(value == null ? "" : value, new ChannelUID(device.getUid(), channel.getItemName())); logger.debug("Posting triggered event: {}", event); context.getEventPublisher().post(event);