mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
39_alexa.pm: first preparation to return an answer from a fhemIntent
git-svn-id: https://svn.fhem.de/fhem/trunk@13153 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f78f23c7b2
commit
b16f8fab5e
@ -399,9 +399,17 @@ Log 1, Dumper $characteristicsOfIntent;
|
||||
my @parts = split( /,/, $remainder );
|
||||
my $utterance = $parts[$#parts];
|
||||
|
||||
push @{$schema->{intents}}, {intent => "FHEM${intent}Intent", };
|
||||
my $intent_name = "FHEM${intent}Intent";
|
||||
if( $intent =~ m/^(set|get|attr)\s/ ) {
|
||||
$intent_name = "FHEM${1}Intent";
|
||||
} elsif( $intent =~ m/^{.*}$/ ) {
|
||||
$intent_name = 'FHEMperlCodeInent';
|
||||
}
|
||||
#$intent_name =~ s/ //g;
|
||||
|
||||
$samples .= "\nFHEM${intent}Intent $utterance";
|
||||
push @{$schema->{intents}}, {intent => $intent_name, };
|
||||
|
||||
$samples .= "\n$intent_name $utterance";
|
||||
}
|
||||
$samples .= "\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user