mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 01:09:47 +00:00
now STATE can be changed by stateFormat
git-svn-id: https://svn.fhem.de/fhem/trunk@6334 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b50ca8e14e
commit
26eb457f3a
@ -68,7 +68,8 @@ sub WOL_Set($@) {
|
||||
RemoveInternalTimer($hash);
|
||||
InternalTimer(gettimeofday()+$hash->{INTERVAL}, "WOL_UpdateReadings", $hash, 0);
|
||||
|
||||
if ($hash->{STATE} eq "on") {
|
||||
my $state = ReadingsVal($hash->{NAME}, "state", "nF");
|
||||
if ($state eq "on") {
|
||||
WOL_GetUpdate($hash);
|
||||
}
|
||||
return undef;
|
||||
@ -148,13 +149,14 @@ sub WOL_UpdateReadings($) {
|
||||
sub WOL_GetUpdate($) {
|
||||
my ($hash) = @_;
|
||||
|
||||
if ($hash->{STATE} eq "on") {
|
||||
my $state = ReadingsVal($hash->{NAME}, "state", "nF");
|
||||
if ($state eq "on") {
|
||||
wake($hash);
|
||||
}
|
||||
|
||||
if ($hash->{REPEAT} > 0 && $hash->{STATE} eq "on" ) {
|
||||
if ($hash->{REPEAT} > 0) {
|
||||
InternalTimer(gettimeofday()+$hash->{REPEAT}, "WOL_GetUpdate", $hash, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
################################################################################
|
||||
sub wake($){
|
||||
|
Loading…
Reference in New Issue
Block a user