2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 08:11:44 +00:00

RESIDENTStk: fix notifications triggered by attribute or device updates

git-svn-id: https://svn.fhem.de/fhem/trunk@14050 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2017-04-20 20:50:02 +00:00
parent 3ed34ea73c
commit 7aaf06324c

View File

@ -1083,7 +1083,9 @@ sub RESIDENTStk_Notify($$) {
foreach ( @{$events} ) { foreach ( @{$events} ) {
# init RESIDENTS, ROOMMATE or GUEST devices after boot # init RESIDENTS, ROOMMATE or GUEST devices after boot
if ( $_ =~ m/^INITIALIZED|REREADCFG|MODIFIED|(?:UN)?DEFINED.*$/ ) { if ( $_ =~
m/^INITIALIZED|REREADCFG|DEFINED.+|MODIFIED.+|DELETED.+$/ )
{
RESIDENTStk_findResidentSlaves($hash) RESIDENTStk_findResidentSlaves($hash)
if ( $TYPE eq "RESIDENTS" ); if ( $TYPE eq "RESIDENTS" );
RESIDENTStk_findDummySlaves($name) RESIDENTStk_findDummySlaves($name)
@ -1091,7 +1093,7 @@ sub RESIDENTStk_Notify($$) {
return ""; return "";
} }
# only process attribute events from slave devices # only process attribute events
next next
unless ( $_ =~ unless ( $_ =~
m/^((?:DELETE)?ATTR)\s+([A-Za-z\d._]+)\s+([A-Za-z\d_\.\-\/]+)(?:\s+(.*)\s*)?$/ m/^((?:DELETE)?ATTR)\s+([A-Za-z\d._]+)\s+([A-Za-z\d_\.\-\/]+)(?:\s+(.*)\s*)?$/
@ -1106,7 +1108,7 @@ m/^((?:DELETE)?ATTR)\s+([A-Za-z\d._]+)\s+([A-Za-z\d_\.\-\/]+)(?:\s+(.*)\s*)?$/
# filter attributes to be processed # filter attributes to be processed
next next
unless ( $attr eq $prefix . "wakeupDevice" unless ( $attr eq $prefix . "wakeupDevice"
|| $attr eq $prefix . "presenceDevice" || $attr eq $prefix . "presenceDevices"
|| $attr eq $prefix . "wakeupResetSwitcher" ); || $attr eq $prefix . "wakeupResetSwitcher" );
# when attributes of RESIDENTS, ROOMMATE or GUEST were changed # when attributes of RESIDENTS, ROOMMATE or GUEST were changed