diff --git a/FHEM/52_I2C_LCD.pm b/FHEM/52_I2C_LCD.pm index c79415654..bf04e51d0 100644 --- a/FHEM/52_I2C_LCD.pm +++ b/FHEM/52_I2C_LCD.pm @@ -153,7 +153,8 @@ I2C_LCD_Attr($$$$) { $newMapping{$key} = $value; } $hash->{mapping} = \%newMapping; - I2C_LCD_Init($hash,split (' ',$hash->{DEF})) if ($main::init_done); + my @def = split (' ',$hash->{DEF}); + I2C_LCD_Init($hash,\@def) if ($main::init_done); last; }; $main::attr{$name}{$attribute}=$value; @@ -161,7 +162,8 @@ I2C_LCD_Attr($$$$) { } } }; - my $ret = I2C_LCD_Catch($@) if $@; +# my $ret = I2C_LCD_Catch($@) if $@; + my $ret = $@; if ($ret) { $hash->{STATE} = "error setting $attribute to $value: ".$ret; return "cannot $command attribute $attribute to $value for $name: ".$ret;