From 8dd3ad72e7a16eca03577d866d0a14d3aa6c0b3d Mon Sep 17 00:00:00 2001 From: justme1968 Date: Sat, 3 Dec 2016 12:48:55 +0000 Subject: [PATCH] 39_alexa.pm: fixed 'Experimental push on scalar is now forbidden' git-svn-id: https://svn.fhem.de/fhem/trunk@12704 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/39_alexa.pm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fhem/FHEM/39_alexa.pm b/fhem/FHEM/39_alexa.pm index b8a539e45..13d739eb0 100644 --- a/fhem/FHEM/39_alexa.pm +++ b/fhem/FHEM/39_alexa.pm @@ -139,7 +139,7 @@ alexa_Get($$@) } $mappings{$characteristic} = [] if( !$mappings{$characteristic} ); - push $mappings{$characteristic}, \%characteristic; + push @{$mappings{$characteristic}}, \%characteristic; } } #Log 1, Dumper \%mappings; @@ -186,22 +186,22 @@ alexa_Get($$@) my $intent = $characteristic .'Intent'. $nr; my $slots = []; - push $slots, { name => 'article', type => 'FHEM_article' }; - push $slots, { name => 'Device', type => 'FHEM_Device' } if( !$mapping->{device} ); - push $slots, { name => 'preposition', type => 'FHEM_preposition' }; - push $slots, { name => 'Room', type => 'FHEM_Room' }; + push @{$slots}, { name => 'article', type => 'FHEM_article' }; + push @{$slots}, { name => 'Device', type => 'FHEM_Device' } if( !$mapping->{device} ); + push @{$slots}, { name => 'preposition', type => 'FHEM_preposition' }; + push @{$slots}, { name => 'Room', type => 'FHEM_Room' }; if( ref($mapping->{valuePrefix}) eq 'ARRAY' ) { - push $slots, { name => "${characteristic}_valuePrefix$nr", type => "${characteristic}_prefix$nr" }; + push @{$slots}, { name => "${characteristic}_valuePrefix$nr", type => "${characteristic}_prefix$nr" }; $types->{"${characteristic}_prefix$nr"} = $mapping->{valuePrefix}; } if( $mapping->{values} && $mapping->{values} =~ /^AMAZON/ ) { - push $slots, { name => "${characteristic}_Value$nr", type => $mapping->{values} }; + push @{$slots}, { name => "${characteristic}_Value$nr", type => $mapping->{values} }; } else { - push $slots, { name => "${characteristic}_Value$nr", type => "${characteristic}_Value$nr" }; + push @{$slots}, { name => "${characteristic}_Value$nr", type => "${characteristic}_Value$nr" }; $types->{"${characteristic}_Value$nr"} = $values if( $values->[0] ); } if( ref($mapping->{valueSuffix}) eq 'ARRAY' ) { - push $slots, { name => "${characteristic}_valueSuffix$nr", type => "${characteristic}_suffix$nr" }; + push @{$slots}, { name => "${characteristic}_valueSuffix$nr", type => "${characteristic}_suffix$nr" }; $types->{"${characteristic}_suffix"} = $mapping->{valueSuffix$nr}; } @@ -245,7 +245,7 @@ alexa_Get($$@) } } } - push $schema->{intents}, {intent => $intent, slots => $slots}; + push @{$schema->{intents}}, {intent => $intent, slots => $slots}; ++$i; }