mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-15 16:19:11 +00:00
FULLY: Fixed speak and overlayMessage
git-svn-id: https://svn.fhem.de/fhem/trunk@25516 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a541759b3c
commit
454fe2d41f
@ -1,5 +1,6 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 89_FULLY: Fixed speak and overlayMessage commands.
|
||||
- bugfix: 74_XiaomiBTLESens: fix incurrect temperatur then value is negativ
|
||||
- feature: 30_HUEBridge: support eventstream api (push events)
|
||||
- change: 70_DENON_AVR: added soundformat strings. patch by All-Ex
|
||||
|
@ -447,14 +447,16 @@ sub FULLY_Set ($@)
|
||||
push (@p, { "key" => "motionDetection", "value" => "$value" });
|
||||
}
|
||||
elsif ($opt eq 'speak') {
|
||||
my $text = shift @a // return 'Usage: set $name speak "{Text}"';
|
||||
my $text = join(' ',@a);
|
||||
return 'Usage: set $name speak {Text}' if (!defined($text) || $text eq '');
|
||||
my $enctext = FULLY_SubstDeviceReading ($text);
|
||||
push (@c, "textToSpeech");
|
||||
push (@p, { "text" => "$enctext" });
|
||||
}
|
||||
elsif ($opt eq 'overlayMessage') {
|
||||
my $text = shift @a // return 'Usage: set $name overlayMessage "{Text}"';
|
||||
my $enctext = FULLY_SubstDeviceReading ($text);
|
||||
my $text = join(' ',@a);
|
||||
return 'Usage: set $name overlayMessage [{Text}]' if (!defined($text));;
|
||||
my $enctext = $text ne '' ? FULLY_SubstDeviceReading ($text) : '';
|
||||
push (@c, "setOverlayMessage");
|
||||
push (@p, { "text" => "$enctext" });
|
||||
}
|
||||
@ -497,8 +499,8 @@ sub FULLY_Set ($@)
|
||||
elsif ($opt eq 'setStringSetting' || $opt eq 'setBooleanSetting') {
|
||||
return "FULLY: Command $opt only available in expert mode" if ($expert == 0);
|
||||
my $key = shift @a;
|
||||
my $value = shift @a;
|
||||
return "Usage: set $name $opt {key} {value}" if (!defined ($value));
|
||||
my $value = join(' ',@a);
|
||||
return "Usage: set $name $opt {key} {value}" if (!defined($value) || $value eq '');
|
||||
push (@c, $opt);
|
||||
push (@p, { "key" => "$key", "value" => "$value" });
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user