From bed9dd7ffc86f14f622e43840cbee857c6b19031 Mon Sep 17 00:00:00 2001 From: jpawlowski Date: Tue, 28 Mar 2017 19:13:22 +0000 Subject: [PATCH] 20_ROOMMATE,20_GUEST: fix variable git-svn-id: https://svn.fhem.de/fhem/trunk@13837 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/20_GUEST.pm | 6 +++--- fhem/FHEM/20_ROOMMATE.pm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fhem/FHEM/20_GUEST.pm b/fhem/FHEM/20_GUEST.pm index 64aa1374a..135cfdc72 100644 --- a/fhem/FHEM/20_GUEST.pm +++ b/fhem/FHEM/20_GUEST.pm @@ -333,15 +333,15 @@ sub GUEST_Notify($$) { m/^[\s\t ]*([A-Za-z\d_\.\-\/]+):([A-Za-z\d_\.\-\/]+)?[\s\t ]*$/ ) { - $d = $1; - $reading = $2; + $d = $1; + $r = $2; } my $presenceState = ReadingsVal( $d, $r, ReadingsVal( $d, "state", "" ) ); next unless ( $presenceState =~ -m/^(absent|disappeared|unavailable|disconnected)|(present|appeared|available|connected|)$/i +m/^(0|false|absent|disappeared|unavailable|unreachable|disconnected)|(1|true|present|appeared|available|reachable|connected|)$/i ); $counter->{absent}++ if ($1); diff --git a/fhem/FHEM/20_ROOMMATE.pm b/fhem/FHEM/20_ROOMMATE.pm index c36553755..acf924617 100644 --- a/fhem/FHEM/20_ROOMMATE.pm +++ b/fhem/FHEM/20_ROOMMATE.pm @@ -336,15 +336,15 @@ sub ROOMMATE_Notify($$) { m/^[\s\t ]*([A-Za-z\d_\.\-\/]+):([A-Za-z\d_\.\-\/]+)?[\s\t ]*$/ ) { - $d = $1; - $reading = $2; + $d = $1; + $r = $2; } my $presenceState = ReadingsVal( $d, $r, ReadingsVal( $d, "state", "" ) ); next unless ( $presenceState =~ -m/^(absent|disappeared|unavailable|disconnected)|(present|appeared|available|connected|)$/i +m/^(0|false|absent|disappeared|unavailable|unreachable|disconnected)|(1|true|present|appeared|available|reachable|connected|)$/i ); $counter->{absent}++ if ($1);