mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-30 12:07:09 +00:00
70_Pushover: increase regular user re-validation period to 12h; 15min re-validation period in case an error occurred
git-svn-id: https://svn.fhem.de/fhem/trunk@9711 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7c6437b9f4
commit
f39b401e65
@ -509,6 +509,11 @@ sub Pushover_ReceiveCommand($$$) {
|
|||||||
readingsBulkUpdate( $hash, "available", $available );
|
readingsBulkUpdate( $hash, "available", $available );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($available eq "0") {
|
||||||
|
RemoveInternalTimer($hash);
|
||||||
|
InternalTimer( gettimeofday() + 900, "Pushover_ValidateUser", $hash, 0 )
|
||||||
|
}
|
||||||
|
|
||||||
# Set reading for state
|
# Set reading for state
|
||||||
#
|
#
|
||||||
if ( !defined( $hash->{READINGS}{state}{VAL} )
|
if ( !defined( $hash->{READINGS}{state}{VAL} )
|
||||||
@ -531,10 +536,11 @@ sub Pushover_ValidateUser ($;$) {
|
|||||||
Log3 $name, 5, "Pushover $name: called function Pushover_ValidateUser()";
|
Log3 $name, 5, "Pushover $name: called function Pushover_ValidateUser()";
|
||||||
|
|
||||||
RemoveInternalTimer($hash);
|
RemoveInternalTimer($hash);
|
||||||
InternalTimer( gettimeofday() + 900, "Pushover_ValidateUser", $hash, 0 )
|
if (ReadingsVal($name, "available", "0") ne "1") {
|
||||||
if ($hash->{READINGS}{available}{VAL} eq "0");
|
InternalTimer( gettimeofday() + 900, "Pushover_ValidateUser", $hash, 0 );
|
||||||
InternalTimer( gettimeofday() + 21600, "Pushover_ValidateUser", $hash, 0 )
|
} else {
|
||||||
if ($hash->{READINGS}{available}{VAL} eq "1");
|
InternalTimer( gettimeofday() + 21600, "Pushover_ValidateUser", $hash, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
if ( AttrVal( $name, "disable", 0 ) == 1 );
|
if ( AttrVal( $name, "disable", 0 ) == 1 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user