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 7df9497
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ protected State getNAThingProperty(String channelId) {
}
return UnDefType.UNDEF;
case CHANNEL_WELCOME_EVENT_VIDEOSTATUS:
return getLastEvent().map(e -> toStringType(e.getVideoStatus())).orElse(UnDefType.UNDEF);
return getLastEvent()
.map(e -> e.getVideoId() != null ? toStringType(e.getVideoStatus()) : UnDefType.UNDEF)
.orElse(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 7df9497

Please sign in to comment.