2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2024-11-22 02:59:49 +00:00

speechcontrol.template: fix typo

git-svn-id: https://svn.fhem.de/fhem/trunk@29295 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2024-10-26 04:30:03 +00:00
parent fe71f35ab1
commit aa8efed2b2
2 changed files with 9 additions and 9 deletions

View File

@ -126,7 +126,7 @@ par:RADIO_KEEPalexaNAME;Keep current attribute value;{ defined AttrVal('DEVICE',
par:RADIO_SETalexaNAME;Set a new alexaName;{ undef }
par:RADIO_DoNotSetalexaName;Leave alexaName attribute empty;{ defined AttrVal('DEVICE','alexaName',undef) ? 0 : undef }
par:RADIO_Delete_gDT;Discard genericDeviceType attribute;{ undef }
par:RADIO_SKIPP_SCONTROLL;Skipp setting speech controll specific attributes;{ undef }
par:RADIO_SKIP_SCONTROLL;Skip setting speech controll specific attributes;{ undef }
option:{ RADIO_KEEPalexaNAME }
set DEVICE attrTemplate speechcontrol_siri_specials CHECKGDTDONE=1
option:{ RADIO_Delete_gDT }
@ -136,7 +136,7 @@ deleteAttr DEVICE alexaName #optional falls Name zuvor vorhanden
set DEVICE attrTemplate speechcontrol_siri_specials CHECKGDTDONE=1
option:{ RADIO_SETalexaNAME }
set DEVICE attrTemplate speechcontrol_request_alexaName
option:{ RADIO_SKIPP_SCONTROLL }
option:{ RADIO_SKIP_SCONTROLL }
set DEVICE attrTemplate speechcontrol_siri_specials CHECKGDTDONE=1 SKIPSCONTROLL=1

View File

@ -44,8 +44,8 @@ sub Initialize {
# Enter you functions below _this_ line.
sub BasicTest {
my $site = shift;
my $type = shift;
my $site = shift // return 'No site argument provided!';
my $type = shift // return 'No type argument provided!';
Log3('rhasspy',3 , "RHASSPY: Site $site, Type $type");
return "RHASSPY: Site $site, Type $type";
}
@ -56,7 +56,7 @@ sub DataTest {
my $hash = $defs{$name} // return;
my $data;
if ( !eval { $data = decode_json($rawd) ; 1 } ) {
if ( !eval { $data = JSON->new->decode($rawd) ; 1 } ) {
Log3($hash->{NAME}, 1, "JSON decoding error, $rawd seems not to be valid JSON data: $@");
return "Error! $rawd seems not to be valid JSON data!";
}
@ -75,12 +75,12 @@ sub DataTest {
}
sub DialogueTest{
my $name = shift;
my $rawd = shift;
my $name = shift // return 'No RHASSPY name argument provided!';
my $rawd = shift // return 'No JSON data argument provided!';
my $hash = $defs{$name} // return;
my $hash = $defs{$name} // return "RHASSPY name doesn't exist!";
my $data;
if ( !eval { $data = decode_json($rawd) ; 1 } ) {
if ( !eval { $data = JSON->new->decode($rawd) ; 1 } ) {
Log3($hash->{NAME}, 1, "JSON decoding error, $rawd seems not to be valid JSON data: $@");
return "Error! $rawd seems not to be valid JSON data!";
}