2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-12 02:39:57 +00:00

10_RHASSPY: fix confirmation after choice bug

git-svn-id: https://svn.fhem.de/fhem/trunk@26061 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2022-05-19 16:42:31 +00:00
parent df52f0ccbd
commit cf1ba0779a

View File

@ -2015,8 +2015,14 @@ sub getDeviceByName {
&& defined $hash->{helper}{devicemap}{devices}{$dev}{prio}->{outsideRoom}
&& $hash->{helper}{devicemap}{devices}{$dev}{prio}->{outsideRoom} =~ m{\b$type\b}xms;
if ( $intent ) {
push @maybees, $dev if defined $hash->{helper}{devicemap}{devices}{$dev}->{intents}
&& defined $hash->{helper}{devicemap}{devices}{$dev}{intents}->{$intent};
if ( $type ) {
push @maybees, $dev if defined $hash->{helper}{devicemap}{devices}{$dev}->{intents}
&& defined $hash->{helper}{devicemap}{devices}{$dev}{intents}->{$intent}
&& defined $hash->{helper}{devicemap}{devices}{$dev}{intents}->{$intent}->{$type};
} else {
push @maybees, $dev if defined $hash->{helper}{devicemap}{devices}{$dev}->{intents}
&& defined $hash->{helper}{devicemap}{devices}{$dev}{intents}->{$intent};
}
} else {
push @maybees, $dev;
}
@ -5731,13 +5737,14 @@ sub handleIntentConfirmAction {
$data_old->{Confirmation} = 1;
my $intent = $data_old->{intent};
delete $hash->{helper}{'.delayed'}{$identity};
my $device = $hash->{NAME};
# Passenden Intent-Handler aufrufen
if (ref $dispatchFns->{$intent} eq 'CODE') {
$device = $dispatchFns->{$intent}->($hash, $data_old);
}
delete $hash->{helper}{'.delayed'}{$identity};
#delete $hash->{helper}{'.delayed'}{$identity};
return $device;
}
@ -5766,7 +5773,7 @@ sub handleIntentChoice {
if (ref $dispatchFns->{$intent} eq 'CODE') {
$device = $dispatchFns->{$intent}->($hash, $data_old);
}
delete $hash->{helper}{'.delayed'}{$identity};
#delete $hash->{helper}{'.delayed'}{$identity};
return $device;
}
@ -6692,15 +6699,15 @@ yellow=rgb FFFF00</code></p>
<li>GetTime</li>
<li>GetDate</li>
<li>Timer</li> Timer info as described in <i>SetTimedOnOff</i> is mandatory, {Room} and/or {Label} are optional to distinguish between different timers. {CancelTimer} key will force RHASSPY to try to remove a running timer (using optional {Room} and/or {Label} key to identify the respective timer), {GetTimer} key will be treated as request if there's a timer running (optionally also identified by {Room} and/or {Label} keys).
<li>SetTimer</li> (Outdated, use generic "Timer" instead!) Set a timer, required info as mentionned in <i>Timer</i>
Required tags to set a timer: at least one of {Hour}, {Hourabs}, {Min} or {Sec}. {Label} and {Room} are optional to distinguish between different timers. If {Hourabs} is provided, all timer info will be regarded as absolute time of day info, otherwise everything is calculated using a "from now" logic.
<li>SetTimer</li> Set a timer, required info as mentionned in <i>Timer</i>
<li>GetTimer</li> Get timer info as mentionned in <i>Timer</i>, key {GetTimer} is not explicitely required.
<li>GetTimer</li> (Outdated, use generic "Timer" instead!) Get timer info as mentionned in <i>Timer</i>, key {GetTimer} is not explicitely required.
<li>ConfirmAction</li>
{Mode} with value 'OK'. All other calls will be interpreted as CancelAction intent call.
<li>CancelAction</li>{Mode} is recommended.
<li>Choice</li>One or more of {Room}, {Device} or {Scene}
<li>ChoiceRoom</li>{Room}
<li>ChoiceDevice</li>{Device}
<li>ChoiceRoom</li> {Room} NOTE: Useage of generic "Choice" intent instead is highly recommended!
<li>ChoiceDevice</li> {Device} NOTE: Useage of generic "Choice" intent instead is highly recommended!
<li>ReSpeak</li>
</ul>