mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 07:24:21 +00:00
39_alexa.pm: fixed multiple sample utterances with slots. see forum: https://forum.fhem.de/index.php/topic,65890.msg627381.html#msg627381
git-svn-id: https://svn.fhem.de/fhem/trunk@14128 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
73370b5b8b
commit
b212138c32
@ -469,13 +469,16 @@ Log 1, Dumper $characteristicsOfIntent;
|
||||
$intent_name = "FHEMperlCodeIntent$nr";
|
||||
}
|
||||
|
||||
Log 1, $intent_name;
|
||||
my $slot_names = {};
|
||||
my $u = $utterance;
|
||||
while( $u =~ /\{(.*?)\}/g ) {
|
||||
my $slot = $1;
|
||||
my ($name, $values) = split( /:|=/, $slot, 2 );
|
||||
|
||||
my $slot_name = "${intent_name}_${name}";
|
||||
next if( $slot_names->{$slot_name} );
|
||||
$slot_names->{$slot_name} = 1;
|
||||
|
||||
if( $values ) {
|
||||
if( $values && $values =~ /^AMAZON/ ) {
|
||||
push @{$slots}, { name => $slot_name, type => $values };
|
||||
|
Loading…
x
Reference in New Issue
Block a user