48_BlinkCamera: remmove perl warning on setup

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@24078 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
viegener 2021-03-24 20:31:34 +00:00
parent 7adfe15056
commit a36f2d44b8

View File

@ -86,10 +86,13 @@ my $repositoryID = '$Id$';
# login changed to V5 api and also new format of response #msg1141218
# reset unique id as additional reset option
# change header for auth to new value token-auth
# adapter also region from login to new tier
# changed alert handing only when network is identified
# Correct perl warning on setup call with empty event timestamp #msg1142674
#
#
#
##############################################################################
##############################################################################
@ -1967,10 +1970,12 @@ sub BlinkCamera_Setup($) {
# remove all readings ebside eventTimestamp to avoid addtl notifications
my $eventTime = ReadingsVal($name,"eventTimestamp",undef);
Log3 $name, 4, "BlinkCamera_Setup $name: init eventtimestamp with ".$eventTime;
CommandDeleteReading(undef, "$name .*");
readingsSingleUpdate($hash, "eventTimestamp", $eventTime, 0 ) if ( defined( $eventTime ) );
if ( defined( $eventTime ) ) {
Log3 $name, 4, "BlinkCamera_Setup $name: init eventtimestamp with ".$eventTime;
readingsSingleUpdate($hash, "eventTimestamp", $eventTime, 0 );
}
foreach my $aKey ( keys %{$hash} ) {
# "thumbnail".$device->{device_id}."Req"
delete( $hash->{$aKey} ) if ( $aKey =~ /^thumbnail/ );