mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
98_todoist: start polling after restart
git-svn-id: https://svn.fhem.de/fhem/trunk@18458 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b8cf6358fe
commit
c69701b379
@ -17,7 +17,7 @@ eval "use Date::Parse;1" or $missingModule .= "Date::Parse ";
|
||||
|
||||
#######################
|
||||
# Global variables
|
||||
my $version = "1.2.0.6";
|
||||
my $version = "1.2.0.7";
|
||||
|
||||
my $srandUsed;
|
||||
|
||||
@ -158,7 +158,6 @@ sub todoist_Define($$) {
|
||||
|
||||
$hash->{NOTIFYDEV}= "global";
|
||||
|
||||
## start polling
|
||||
if ($init_done) {
|
||||
## at first, we delete old readings. List could have changed
|
||||
CommandDeleteReading(undef, "$hash->{NAME} (T|t)ask_.*");
|
||||
@ -168,9 +167,11 @@ sub todoist_Define($$) {
|
||||
readingsSingleUpdate($hash,"state","inactive",1) if ($hash->{helper}{PWD_NEEDED} || ReadingsVal($name,"state","-") eq "-");
|
||||
## remove timers
|
||||
RemoveInternalTimer($hash,"todoist_GetTasks");
|
||||
todoist_GetTasks($hash) if (!IsDisabled($name) && !$hash->{helper}{PWD_NEEDED});
|
||||
}
|
||||
|
||||
## start polling
|
||||
todoist_GetTasks($hash) if (!IsDisabled($name) && !$hash->{helper}{PWD_NEEDED});
|
||||
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user