diff --git a/fhem/CHANGED b/fhem/CHANGED index d852c8521..106a5052a 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,7 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: PRESENCE: new reading "presence" which contains the current (or last known) + presence state (can be "absent" or "present") - bugfix: 70_Jabber.pm: hardening XML::Stream Process() call and fix of ssl_verify - feature: readingsGroup: allow devspec :FILTER= expressions in device selection - added: 73_km200.pm for the Buderus KM200 heating controller (Sailor) diff --git a/fhem/FHEM/73_PRESENCE.pm b/fhem/FHEM/73_PRESENCE.pm index 11df26c09..b22cd9d33 100755 --- a/fhem/FHEM/73_PRESENCE.pm +++ b/fhem/FHEM/73_PRESENCE.pm @@ -423,10 +423,12 @@ PRESENCE_Read($) if($buf eq "absence") { readingsBulkUpdate($hash, "state", "absent"); + readingsBulkUpdate($hash, "presence", "absent"); } elsif($buf =~ /present;(.+?)$/) { readingsBulkUpdate($hash, "state", "present"); + readingsBulkUpdate($hash, "presence", "present"); if($1 =~ /^(.*);(.+)$/) { @@ -941,6 +943,7 @@ PRESENCE_ProcessLocalScan($) if($a[2] eq "present") { readingsBulkUpdate($hash, "state", "present"); + readingsBulkUpdate($hash, "presence", "present"); readingsBulkUpdate($hash, "device_name", $a[3]) if(defined($a[3]) and $hash->{MODE} =~ /^(lan-bluetooth|local-bluetooth)$/ ); if($hash->{MODE} eq "fritzbox" and defined($a[4])) @@ -951,7 +954,7 @@ PRESENCE_ProcessLocalScan($) elsif($a[2] eq "absent") { readingsBulkUpdate($hash, "state", "absent"); - + readingsBulkUpdate($hash, "presence", "absent"); if($hash->{MODE} eq "fritzbox" and defined($a[4])) { readingsBulkUpdate($hash, "speed", $a[4]); @@ -1243,7 +1246,8 @@ Options: