From 804df5c6aada2c2add1e0021ec151acd9e5ff16a Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Mon, 11 Nov 2019 12:56:54 +0000 Subject: [PATCH] 10_MQTT2_DEVICE.pm: allow multiple zigbee networks for the picture (Forum #91394) git-svn-id: https://svn.fhem.de/fhem/trunk@20493 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/10_MQTT2_DEVICE.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/10_MQTT2_DEVICE.pm b/fhem/FHEM/10_MQTT2_DEVICE.pm index ef7763117..786111cf7 100644 --- a/fhem/FHEM/10_MQTT2_DEVICE.pm +++ b/fhem/FHEM/10_MQTT2_DEVICE.pm @@ -9,6 +9,8 @@ use SetExtensions; my $bridgeTimerStarted; my $subscrCheckTimerStarted; sub zigbee2mqtt_devStateIcon255($;$$); +use vars qw($FW_ME); +use vars qw($FW_userAgent); sub MQTT2_DEVICE_Initialize($) @@ -631,10 +633,10 @@ MQTT2_DEVICE_nlData($) for my $n (devspec2array("TYPE=MQTT2_DEVICE")) { my $cid = $defs{$n}{CID}; if($cid) { - $cid =~ s/zigbee_//; + $cid =~ s/zigbee\d*_//; $n2n{$cid} = $n; } - if(AttrVal($n, "readingList","") =~ m,zigbee2mqtt/(.*):,) { + if(AttrVal($n, "readingList","") =~ m,zigbee\d*mqtt/(.*):,) { $n2n{$1} = $n; } }