2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 07:19:24 +00:00

31_HUEDevice.pm: fixed perl warning

git-svn-id: https://svn.fhem.de/fhem/trunk@25577 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2022-01-28 16:11:15 +00:00
parent 907379fcd0
commit cc41c7c1e0

View File

@ -1162,7 +1162,14 @@ HUEDevice_Set($@)
if( $hash->{IODev}{has_v2_api} ) {
my $id = HUEBridge_V2IdOfV1Id( $hash->{IODev}, 'light', "/lights/$hash->{ID}" );
$list .= eval { " v2effect:". join(',', @{$hash->{IODev}{helper}{resource}{by_id}{$id}{effects}{effect_values}} ) } if( $id );
if( $id
&& $hash->{IODev}{helper}{resource}{by_id}{$id}
&& $hash->{IODev}{helper}{resource}{by_id}{$id}{effects} ) {
$list .= eval { " v2effect:". join(',', @{$hash->{IODev}{helper}{resource}{by_id}{$id}{effects}{effect_values}} ) };
if($@) {
Log3 $name, 2, "$name: error reading effects: ". $@;
}
}
}
}