2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

PHTV: fix for sequential query

git-svn-id: https://svn.fhem.de/fhem/trunk@14400 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2017-05-28 11:10:33 +00:00
parent 1125812454
commit 30b55c9608

View File

@ -1345,7 +1345,7 @@ sub PHTV_GetStatus($;$) {
if ( IsDisabled($name) ); if ( IsDisabled($name) );
# try to fetch only some information to check device availability # 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, "audio/volume" ) if ( $presence eq "present" );
PHTV_SendCommand( $hash, "system" ) if ( $presence eq "absent" ); PHTV_SendCommand( $hash, "system" ) if ( $presence eq "absent" );
@ -1362,6 +1362,7 @@ sub PHTV_GetStatus($;$) {
# Read device info every 15 minutes only # Read device info every 15 minutes only
if ( if (
!$querySent !$querySent
&& $presence eq "present"
&& ( && (
!defined( $hash->{helper}{lastFullUpdate} ) !defined( $hash->{helper}{lastFullUpdate} )
|| ( !$update || ( !$update
@ -1379,7 +1380,7 @@ sub PHTV_GetStatus($;$) {
} }
# read audio volume # read audio volume
if ( !$querySent && $update ) { if ( !$querySent && $update && $presence eq "absent" ) {
PHTV_SendCommand( $hash, "audio/volume" ); PHTV_SendCommand( $hash, "audio/volume" );
$querySent = 1 if $sequential; $querySent = 1 if $sequential;
$hash->{helper}{sequentialQueryCounter}++ if $sequential; $hash->{helper}{sequentialQueryCounter}++ if $sequential;