Skip to content

Commit

Permalink
Video status only set when there is a video in the event
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo committed Jul 4, 2020
1 parent 9c03927 commit 7b620e9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ protected State getNAThingProperty(String channelId) {
}
return UnDefType.UNDEF;
case CHANNEL_WELCOME_EVENT_VIDEOSTATUS:
return getLastEvent().map(e -> toStringType(e.getVideoStatus())).orElse(UnDefType.UNDEF);
if (getLastEvent().isPresent() && getLastEvent().get().getVideoId() != null) {
return getLastEvent().map(e -> toStringType(e.getVideoStatus())).orElse(UnDefType.UNDEF);
} else {
return UnDefType.UNDEF;
}
case CHANNEL_WELCOME_EVENT_ISARRIVAL:
return getLastEvent().map(e -> toOnOffType(e.getIsArrival())).orElse(UnDefType.UNDEF);
case CHANNEL_WELCOME_EVENT_MESSAGE:
Expand Down

0 comments on commit 7b620e9

Please sign in to comment.