2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-15 22:26:04 +00:00

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
This commit is contained in:
Beta-User 2022-09-02 19:21:55 +00:00
parent b39d4937ca
commit ccb672baab

View File

@ -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}