2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 08:11:44 +00:00

contrib/GDS/55_GDS.pm: minor bugfix to prevent perl warning

git-svn-id: https://svn.fhem.de/fhem/trunk@13494 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2017-02-23 18:25:48 +00:00
parent 6af52d8037
commit 7cb592185f

View File

@ -1016,14 +1016,14 @@ sub decodeCAPData($$$){
while(($k, $v) = each %readings){ while(($k, $v) = each %readings){
# skip update if no valid data is available # skip update if no valid data is available
next unless(defined($v)); next unless(defined($v));
readingsSingleUpdate($hash, $k, latin1ToUtf8($v),1); readingsBulkUpdate($hash, $k, latin1ToUtf8($v));
} }
# convert color value to hex # convert color value to hex
my $r = ReadingsVal($name, 'a_'.$anum.'_eventCode_AREA_COLOR', ''); my $r = ReadingsVal($name, 'a_'.$anum.'_eventCode_AREA_COLOR', '');
if(length($r)) { if(length($r)) {
my $v = sprintf( "%02x%02x%02x", split(" ", $r)); my $v = sprintf( "%02x%02x%02x", split(" ", $r));
readingsSingleUpdate($hash, 'a_'.$anum.'_eventCode_AREA_COLOR_hex', $v,1); readingsBulkUpdate($hash, 'a_'.$anum.'_eventCode_AREA_COLOR_hex', $v);
} }
readingsEndUpdate($hash, 1); readingsEndUpdate($hash, 1);