From cf1ba0779a74af22373b28319b29dc21d9fedd6d Mon Sep 17 00:00:00 2001 From: Beta-User <> Date: Thu, 19 May 2022 16:42:31 +0000 Subject: [PATCH] 10_RHASSPY: fix confirmation after choice bug git-svn-id: https://svn.fhem.de/fhem/trunk@26061 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/RHASSPY/10_RHASSPY.pm | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/fhem/contrib/RHASSPY/10_RHASSPY.pm b/fhem/contrib/RHASSPY/10_RHASSPY.pm index c37ba13d7..e3da7a35a 100644 --- a/fhem/contrib/RHASSPY/10_RHASSPY.pm +++ b/fhem/contrib/RHASSPY/10_RHASSPY.pm @@ -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