mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 02:10:32 +00:00
98_RandomTimer: suppress of not needed events when a RT ist disabled
git-svn-id: https://svn.fhem.de/fhem/trunk@12554 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dd7259b2b9
commit
4259777d37
@ -224,7 +224,8 @@ sub RandomTimer_stopTimeReached($) {
|
|||||||
sub RandomTimer_setActive($$) {
|
sub RandomTimer_setActive($$) {
|
||||||
my ($hash, $value) = @_;
|
my ($hash, $value) = @_;
|
||||||
$hash->{helper}{active} = $value;
|
$hash->{helper}{active} = $value;
|
||||||
readingsSingleUpdate ($hash, "active", $value, 1);
|
my $trigger = (RandomTimer_isDisabled($hash)) ? 0 : 1;
|
||||||
|
readingsSingleUpdate ($hash, "active", $value, $trigger);
|
||||||
}
|
}
|
||||||
########################################################################
|
########################################################################
|
||||||
sub RandomTimer_isAktive ($) {
|
sub RandomTimer_isAktive ($) {
|
||||||
@ -244,7 +245,7 @@ sub RandomTimer_setState($) {
|
|||||||
|
|
||||||
if (RandomTimer_isDisabled($hash)) {
|
if (RandomTimer_isDisabled($hash)) {
|
||||||
#$hash->{STATE} = "disabled";
|
#$hash->{STATE} = "disabled";
|
||||||
readingsSingleUpdate ($hash, "state", "disabled", 1);
|
readingsSingleUpdate ($hash, "state", "disabled", 0);
|
||||||
} else {
|
} else {
|
||||||
my $state = $hash->{helper}{active} ? "on" : "off";
|
my $state = $hash->{helper}{active} ? "on" : "off";
|
||||||
readingsSingleUpdate ($hash, "state", $state, 1);
|
readingsSingleUpdate ($hash, "state", $state, 1);
|
||||||
@ -454,6 +455,9 @@ sub RandomTimer_Wakeup() { # {RandomTimer_Wakeup()}
|
|||||||
1;
|
1;
|
||||||
|
|
||||||
=pod
|
=pod
|
||||||
|
=item device
|
||||||
|
=item summary imitates the random switch functionality of a timer clock (FS20 ZSU)
|
||||||
|
=item summary_DE bildet die Zufallsfunktion einer Zeitschaltuhr nach
|
||||||
=begin html
|
=begin html
|
||||||
|
|
||||||
<a name="RandomTimer"></a>
|
<a name="RandomTimer"></a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user