mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
39_alexa.pm: include RoomListIntent and DeviceListIntent in get interactionModel
git-svn-id: https://svn.fhem.de/fhem/trunk@12769 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
57c66a8a91
commit
347a5c997d
@ -289,6 +289,8 @@ Log 1, Dumper $characteristicsOfIntent;
|
|||||||
|
|
||||||
$mapping->{verb} = [$mapping->{verb}] if( ref($mapping->{verb}) ne 'ARRAY' );
|
$mapping->{verb} = [$mapping->{verb}] if( ref($mapping->{verb}) ne 'ARRAY' );
|
||||||
foreach my $verb (@{$mapping->{verb}}) {
|
foreach my $verb (@{$mapping->{verb}}) {
|
||||||
|
$samples .= "\n" if( $samples );
|
||||||
|
|
||||||
my @articles = ('','{article}');
|
my @articles = ('','{article}');
|
||||||
if( ref($mapping->{articles}) eq 'ARRAY' ) {
|
if( ref($mapping->{articles}) eq 'ARRAY' ) {
|
||||||
$articles[1] = "{${characteristic}_article}";
|
$articles[1] = "{${characteristic}_article}";
|
||||||
@ -327,8 +329,21 @@ Log 1, Dumper $characteristicsOfIntent;
|
|||||||
|
|
||||||
++$i;
|
++$i;
|
||||||
}
|
}
|
||||||
$samples .= "\n";
|
|
||||||
}
|
}
|
||||||
|
$samples .= "\n";
|
||||||
|
|
||||||
|
push @{$schema->{intents}}, {intent => "StatusIntent",
|
||||||
|
slots => [ { name => 'Device', type => 'FHEM_Device' },
|
||||||
|
{ name => 'Room', type => 'FHEM_Room' } ]};
|
||||||
|
push @{$schema->{intents}}, {intent => "RoomListIntent", };
|
||||||
|
push @{$schema->{intents}}, {intent => "DeviceListIntent",
|
||||||
|
slots => [ { name => 'Device', type => 'FHEM_Device' }, ]};
|
||||||
|
|
||||||
|
$samples .= "\nRoomListIntent raumliste";
|
||||||
|
$samples .= "\nDeviceListIntent geräteliste";
|
||||||
|
$samples .= "\nDeviceListIntent geräteliste {Room}";
|
||||||
|
$samples .= "\nDeviceListIntent geräteliste für {artikel} {Room}";
|
||||||
|
$samples .= "\n";
|
||||||
|
|
||||||
my $json = JSON->new;
|
my $json = JSON->new;
|
||||||
$json->pretty(1);
|
$json->pretty(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user