From ccb672baab802b7bb7e9e8b877edb6416ebad83d Mon Sep 17 00:00:00 2001 From: Beta-User <> Date: Fri, 2 Sep 2022 19:21:55 +0000 Subject: [PATCH] 10_RHASSPY: fix part II for dev identification w/o room for old methods git-svn-id: https://svn.fhem.de/fhem/trunk@26373 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/RHASSPY/10_RHASSPY.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fhem/contrib/RHASSPY/10_RHASSPY.pm b/fhem/contrib/RHASSPY/10_RHASSPY.pm index c2cea5ef1..25ecffc4d 100644 --- a/fhem/contrib/RHASSPY/10_RHASSPY.pm +++ b/fhem/contrib/RHASSPY/10_RHASSPY.pm @@ -2012,7 +2012,7 @@ sub getDeviceByName { return 0 if $droom; #no further check if explicit room was requested! my @maybees; - my $oldType = $intent =~ m,(MediaChannels|Colors),x; + my $oldType = $intent =~ m,MediaChannels,x; for (sort keys %{$hash->{helper}{devicemap}{rhasspyRooms}}) { my $dev = $hash->{helper}{devicemap}{rhasspyRooms}{$_}{$name}; @@ -2036,6 +2036,7 @@ sub getDeviceByName { && defined $hash->{helper}{devicemap}{devices}{$dev}{intents}->{$intent}; } } elsif ( $intent && $oldType ) { + $intent = 'Channels' if $intent eq 'MediaChannels'; if ( $type ) { push @maybees, $dev if defined $hash->{helper}{devicemap}{devices}{$dev}->{$intent} && defined $hash->{helper}{devicemap}{devices}{$dev}->{$intent}