39_alexa.pm: added persons mapping for custom skills

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20626 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2019-11-30 10:20:33 +00:00
parent 2357670a01
commit 2d406d459f

View File

@ -42,6 +42,7 @@ alexa_Initialize($)
$hash->{AttrList} = "alexaMapping:textField-long alexaTypes:textField-long fhemIntents:textField-long ". $hash->{AttrList} = "alexaMapping:textField-long alexaTypes:textField-long fhemIntents:textField-long ".
"articles prepositions ". "articles prepositions ".
"echoRooms:textField-long ". "echoRooms:textField-long ".
"persons:textField-long ".
"alexaConfirmationLevel:2,1,0 alexaStatusLevel:2,1 ". "alexaConfirmationLevel:2,1,0 alexaStatusLevel:2,1 ".
"skillId:textField ". "skillId:textField ".
"alexaFHEM-cmd ". "alexaFHEM-cmd ".
@ -102,6 +103,10 @@ alexa_AttrDefaults($)
CommandAttr(undef,"$name echoRooms #<deviceId>=<room>\n" ); CommandAttr(undef,"$name echoRooms #<deviceId>=<room>\n" );
} }
if( !AttrVal( $name, 'persons', undef ) ) {
CommandAttr(undef,"$name persons #<personId>=<name>\n" );
}
if( !AttrVal( $name, 'fhemIntents', undef ) ) { if( !AttrVal( $name, 'fhemIntents', undef ) ) {
CommandAttr(undef,"$name fhemIntents #IntentName=<sample utterance>\n". CommandAttr(undef,"$name fhemIntents #IntentName=<sample utterance>\n".
@ -1292,6 +1297,9 @@ alexa_Attr($$$)
<li>alexaName<br> <li>alexaName<br>
The name to use for a device with alexa.</li> The name to use for a device with alexa.</li>
<br>The following attributes are only relevant for custom skills:
<li>alexaRoom<br> <li>alexaRoom<br>
The room name to use for a device with alexa.</li> The room name to use for a device with alexa.</li>
<li>articles<br> <li>articles<br>
@ -1304,6 +1312,8 @@ alexa_Attr($$$)
maps spoken device types to ServiceClasses. eg: attr alexa alexaTypes light:licht,lampe,lampen blind:rolladen,jalousie,rollo Outlet:steckdose TemperatureSensor:thermometer LockMechanism:schloss OccupancySensor: anwesenheit</li> maps spoken device types to ServiceClasses. eg: attr alexa alexaTypes light:licht,lampe,lampen blind:rolladen,jalousie,rollo Outlet:steckdose TemperatureSensor:thermometer LockMechanism:schloss OccupancySensor: anwesenheit</li>
<li>echoRooms<br> <li>echoRooms<br>
maps echo devices to default rooms.</li> maps echo devices to default rooms.</li>
<li>persons<br>
maps personIds to names.</li>
<li>fhemIntents<br> <li>fhemIntents<br>
maps spoken commands directed to fhem as a whole (i.e. not to specific devices) to events from the alexa device.</li> maps spoken commands directed to fhem as a whole (i.e. not to specific devices) to events from the alexa device.</li>
<li>alexaConfirmationLevel<br> <li>alexaConfirmationLevel<br>