2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-13 15:19:52 +00:00

10_RHASSPY: ignore comments in sentence endings for testmodes

git-svn-id: https://svn.fhem.de/fhem/trunk@26079 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2022-05-22 14:12:28 +00:00
parent 5ab18039d9
commit 29c8138e51

View File

@ -3030,6 +3030,7 @@ sub testmode_next {
if ( $hash->{testline} < @{$hash->{helper}->{test}->{content}} ) {
my @ca_strings = split m{,}x, ReadingsVal($hash->{NAME},'intents','');
$line = (split m{[#]}x,$line)[0]; #ignore comments
$line = _replaceDecimalPoint($hash,$line);
my $sendData = {
input => $line,
@ -3069,7 +3070,9 @@ sub testmode_end {
my $line = $rawresult->{$resu};
if ( defined $line->[1] ) {
my $single = $line->[0];
push @{$aresult}, qq( [RHASSPY] Input: $single);
my @tokens = split m{[#]}x, $single, 2;
push @{$aresult}, qq( [RHASSPY] Input: $tokens[0]);
push @{$aresult}, qq( Id: $tokens[1]) if defined $tokens[1];
for ( 1..@{$line}-1) {
$single = $line->[$_];
push @{$aresult}, qq( $single);