mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
speechrecogn.template: bugfixes in internal calls
git-svn-id: https://svn.fhem.de/fhem/trunk@21470 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
76d9a895f6
commit
086e2c5b1c
@ -85,8 +85,8 @@ order:10000200
|
||||
desc:generic template to set attributes for identifying this device by speech recognition software. This template will call several sub-templates - dependent on the speech recognition solutions which are in use in your installation. Pls. do not use one of the subtemplates directly. Call e.g. with set xy attrTemplate speech_recognition_general_naming_master_template
|
||||
option:{my @devices=devspec2array("TYPE=alexa");; $devices[0] ? return 1 : return 0}
|
||||
set DEVICE attrTemplate speech_recognition_alexa_specials
|
||||
option:{my @devices=devspec2array("TYPE=siri");; $devices[0] ? AttrVal("DEVICE","genericDeviceType","none") eq "none" ? 0 : 1 : 0 }
|
||||
set DEVICE attrTemplate speech_recognition_siri_specials
|
||||
option:{my @devices=devspec2array("TYPE=siri");; my @alexas=devspec2array("TYPE=alexa");; ($devices[0] && !$alexas[0]) ? AttrVal("DEVICE","genericDeviceType","none") eq "none" ? 0 : 1 : 0 }
|
||||
#set DEVICE attrTemplate speech_recognition_siri_specials
|
||||
option:{my @devices=devspec2array("TYPE=gassistant");; $devices[0] ? return 1 : return 0}
|
||||
|
||||
#######
|
||||
@ -105,6 +105,8 @@ par:RADIO_Delete_gDT;Discard genericDeviceType attribute;{ undef }
|
||||
option:{ RADIO_Delete_gDT }
|
||||
deleteAttr DEVICE genericDeviceType
|
||||
option:{ RADIO_DoNotSetalexaName }
|
||||
deleteAttr DEVICE alexaName #optional falls Name zuvor vorhanden
|
||||
set DEVICE attrTemplate speech_recognition_siri_specials CHECKGDTDONE=1
|
||||
option:{ RADIO_SETalexaNAME }
|
||||
set DEVICE attrTemplate speech_recognition_request_alexaName
|
||||
|
||||
@ -112,10 +114,12 @@ name:speech_recognition_request_alexaName
|
||||
filter:NAME=speechrecognTesting
|
||||
order:1000020b
|
||||
desc:generic template to ask for alexaName attribute setting. Only intented for internal use by speech_recognition_request_alexaName
|
||||
par:ALEXAISNAME;Current attribute value alexaName;{ AttrVal("DEVICE","alexaName","(not set)") }
|
||||
par:ALEXANAME;Please enter alexaName. Current value: ALEXAISNAME;{ undef }
|
||||
#par:ALEXAISNAME;Current attribute value alexaName;{ AttrVal("DEVICE","alexaName","(not set)") }
|
||||
par:ALEXANAME;Please enter alexaName;{ undef }
|
||||
option:{my @devices=devspec2array("TYPE=(alexa)");; $devices[0] ? return 1 : return 0}
|
||||
attr DEVICE alexaName ALEXANAME
|
||||
option:{my @devices=devspec2array("TYPE=siri");; $devices[0] ? return 1 : return 0}
|
||||
set DEVICE attrTemplate speech_recognition_siri_specials CHECKGDTDONE=1
|
||||
|
||||
####
|
||||
#siri specials
|
||||
@ -125,12 +129,14 @@ filter:NAME=speechrecognTesting
|
||||
order:1000021a
|
||||
desc:generic template to set speech recognition attribute alexaName, call e.g. with set xy attrTemplate speech_recognition_siri_specials ALEXANAME=myAlexaName
|
||||
option:{my @devices=devspec2array("TYPE=(siri)");; $devices[0] ? return 1 : return 0}
|
||||
par:CHECKGDTDONE;Set this to to 1 if answer was no in previous template;{ 0 }
|
||||
par:RADIO_SETsiriNAME;Set a new siriName;{ undef }
|
||||
par:RADIO_DoNotSetsiriName;Leave siriName attribute empty;{ undef }
|
||||
par:RADIO_Delete_gDT;Discard genericDeviceType attribute;{ undef }
|
||||
option:{ RADIO_Delete_gDT }
|
||||
par:RADIO_Delete_gDT;Discard genericDeviceType attribute;{ CHECKGDTDONE ? 0 : undef }
|
||||
option:{ RADIO_Delete_gDT && }
|
||||
deleteAttr DEVICE genericDeviceType
|
||||
option:{ RADIO_DoNotSetsiriName }
|
||||
deleteAttr DEVICE siriName
|
||||
option:{ RADIO_SETsiriNAME }
|
||||
set DEVICE attrTemplate speech_recognition_request_siriName
|
||||
|
||||
@ -138,8 +144,8 @@ name:speech_recognition_request_siriName
|
||||
filter:NAME=speechrecognTesting
|
||||
order:1000021b
|
||||
desc:generic template to ask for siriName attribute setting. Only intented for internal use by speech_recognition_request_siriName
|
||||
par:SIRIISNAME;Current attribute value alexaName;{ AttrVal("DEVICE","siriName","(not set)") }
|
||||
par:SIRINAME;Please enter siriName. Current value: SIRIISNAME;{ undef }
|
||||
#par:SIRIISNAME;Current attribute value alexaName;{ AttrVal("DEVICE","siriName","(not set)") }
|
||||
par:SIRINAME;Please enter siriName;{ undef }
|
||||
option:{my @devices=devspec2array("TYPE=(siri)");; $devices[0] ? return 1 : return 0}
|
||||
attr DEVICE siriName SIRINAME
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user