2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

20_ROOMMATE,20_GUEST: fix variable

git-svn-id: https://svn.fhem.de/fhem/trunk@13837 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2017-03-28 19:13:22 +00:00
parent b15a175ecc
commit bed9dd7ffc
2 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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);