From 1bdd55b8d13e6a6a0e4efd9c36fc96e5032917b7 Mon Sep 17 00:00:00 2001 From: markusbloch <> Date: Thu, 17 Sep 2015 15:38:04 +0000 Subject: [PATCH] FB_CALLLIST: allow non-FB_CALLMONITOR devices when define a FB_CALLLIST (Forum: #41152) git-svn-id: https://svn.fhem.de/fhem/trunk@9267 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/72_FB_CALLLIST.pm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/fhem/FHEM/72_FB_CALLLIST.pm b/fhem/FHEM/72_FB_CALLLIST.pm index f23611162..32a9ca59f 100755 --- a/fhem/FHEM/72_FB_CALLLIST.pm +++ b/fhem/FHEM/72_FB_CALLLIST.pm @@ -77,20 +77,22 @@ sub FB_CALLLIST_Define($$) if(!defined($a[2])) { - $retval = "FB_CALLLIST_define: you must specify a FB_CALLMONITOR object for using FB_CALLLIST"; - return $retval; + return "FB_CALLLIST_define: you must specify a device name for using FB_CALLLIST"; } if(@a != 3) { - $retval = "wrong define syntax: define FB_CALLLIST "; - return $retval; + return "wrong define syntax: define FB_CALLLIST "; } - - unless(defined($defs{$a[2]}) and $defs{$a[2]}->{TYPE} eq "FB_CALLMONITOR") + + unless(defined($defs{$a[2]})) { - $retval = "FB_CALLLIST_Define: $a[2] does not exists or ist not of type FB_CALLMONITOR"; - return $retval; + return "FB_CALLLIST_define: the selected device ".$a[2]." does not exist."; + } + + unless($defs{$a[2]}->{TYPE} eq "FB_CALLMONITOR") + { + Log3 $name, 3, "FB_CALLLIST ($name) - WARNING - selected device ".$a[2]." ist not of type FB_CALLMONITOR"; } $hash->{FB} = $a[2];