From 30b55c96084da62b58cf558dc78565bac0723bf8 Mon Sep 17 00:00:00 2001 From: jpawlowski Date: Sun, 28 May 2017 11:10:33 +0000 Subject: [PATCH] PHTV: fix for sequential query git-svn-id: https://svn.fhem.de/fhem/trunk@14400 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/70_PHTV.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/70_PHTV.pm b/fhem/FHEM/70_PHTV.pm index 1e871a022..42e1db7e0 100644 --- a/fhem/FHEM/70_PHTV.pm +++ b/fhem/FHEM/70_PHTV.pm @@ -1345,7 +1345,7 @@ sub PHTV_GetStatus($;$) { if ( IsDisabled($name) ); # try to fetch only some information to check device availability - if ( !$update ) { + unless ($update) { PHTV_SendCommand( $hash, "audio/volume" ) if ( $presence eq "present" ); PHTV_SendCommand( $hash, "system" ) if ( $presence eq "absent" ); @@ -1361,7 +1361,8 @@ sub PHTV_GetStatus($;$) { # Read device info every 15 minutes only if ( - !$querySent + !$querySent + && $presence eq "present" && ( !defined( $hash->{helper}{lastFullUpdate} ) || ( !$update @@ -1379,7 +1380,7 @@ sub PHTV_GetStatus($;$) { } # read audio volume - if ( !$querySent && $update ) { + if ( !$querySent && $update && $presence eq "absent" ) { PHTV_SendCommand( $hash, "audio/volume" ); $querySent = 1 if $sequential; $hash->{helper}{sequentialQueryCounter}++ if $sequential;