mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
RESIDENTStk: fix for andNoHoliday
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@14160 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8cae667b6d
commit
0fa50c1f2a
@ -2801,15 +2801,28 @@ sub RESIDENTStk_wakeupRun($;$) {
|
|||||||
. "weekday restriction in use - not triggering wake-up program this time";
|
. "weekday restriction in use - not triggering wake-up program this time";
|
||||||
}
|
}
|
||||||
elsif (
|
elsif (
|
||||||
!$forceRun
|
!$forceRun
|
||||||
&& !$days{$today}
|
|
||||||
|
# && !$days{$today}
|
||||||
|
# && (
|
||||||
|
# ( $wakeupHolidays eq "andHoliday" && !$holidayToday )
|
||||||
|
# || ( $wakeupHolidays eq "andNoHoliday"
|
||||||
|
# && $holidayToday )
|
||||||
|
# || ( $wakeupHolidays eq "orHoliday" && !$holidayToday )
|
||||||
|
# || ( $wakeupHolidays eq "orNoHoliday"
|
||||||
|
# && $holidayToday )
|
||||||
|
# )
|
||||||
&& (
|
&& (
|
||||||
( $wakeupHolidays eq "andHoliday" && !$holidayToday )
|
(
|
||||||
|| ( $wakeupHolidays eq "andNoHoliday"
|
$days{$today}
|
||||||
&& $holidayToday )
|
&& ( ( $wakeupHolidays eq "andHoliday" && !$holidayToday )
|
||||||
|| ( $wakeupHolidays eq "orHoliday" && !$holidayToday )
|
|| ( $wakeupHolidays eq "andNoHoliday" && $holidayToday ) )
|
||||||
|| ( $wakeupHolidays eq "orNoHoliday"
|
)
|
||||||
&& $holidayToday )
|
|| (
|
||||||
|
!$days{$today}
|
||||||
|
&& ( ( $wakeupHolidays eq "orHoliday" && !$holidayToday )
|
||||||
|
|| ( $wakeupHolidays eq "orNoHoliday" && $holidayToday ) )
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -3579,7 +3592,8 @@ sub RESIDENTStk_DoModuleTrigger($$@) {
|
|||||||
my $d = $2;
|
my $d = $2;
|
||||||
|
|
||||||
return "DoModuleTrigger() can only handle module related events"
|
return "DoModuleTrigger() can only handle module related events"
|
||||||
if ( ( $hash->{NAME} && $hash->{NAME} eq "global" ) || $d eq "global" );
|
if ( ( $hash->{NAME} && $hash->{NAME} eq "global" )
|
||||||
|
|| $d eq "global" );
|
||||||
return DoTrigger( "global", "$TYPE:$newState", $noreplace )
|
return DoTrigger( "global", "$TYPE:$newState", $noreplace )
|
||||||
unless ( $e =~ /^INITIALIZED|INITIALIZING|MODIFIED|DELETED$/ );
|
unless ( $e =~ /^INITIALIZED|INITIALIZING|MODIFIED|DELETED$/ );
|
||||||
return "$e: missing device name"
|
return "$e: missing device name"
|
||||||
@ -3617,7 +3631,8 @@ sub RESIDENTStk_DoModuleTrigger($$@) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $ret = DoTrigger( "global", "$TYPE:$e $d", $noreplace )
|
my $ret = DoTrigger( "global", "$TYPE:$e $d", $noreplace )
|
||||||
if ( $e ne "DELETED" && ( !$hash->{MOD_INIT} || $e eq "INITIALIZING" ) );
|
if ( $e ne "DELETED"
|
||||||
|
&& ( !$hash->{MOD_INIT} || $e eq "INITIALIZING" ) );
|
||||||
push @rets, $ret if ( defined($ret) && $ret ne "" );
|
push @rets, $ret if ( defined($ret) && $ret ne "" );
|
||||||
|
|
||||||
####
|
####
|
||||||
@ -3681,8 +3696,10 @@ sub RESIDENTStk_DoModuleTrigger($$@) {
|
|||||||
|
|
||||||
sub RESIDENTStk_DoInitDev(@) {
|
sub RESIDENTStk_DoInitDev(@) {
|
||||||
my (@devices) = @_;
|
my (@devices) = @_;
|
||||||
|
|
||||||
my @rets;
|
my @rets;
|
||||||
foreach my $d (@devices) {
|
foreach my $d (@devices) {
|
||||||
|
$d = $d->{NAME} if ( ref($d) eq "HASH" );
|
||||||
next unless ( $defs{$d} );
|
next unless ( $defs{$d} );
|
||||||
$defs{$d}{MOD_INIT} = 1;
|
$defs{$d}{MOD_INIT} = 1;
|
||||||
my $ret = CallFn( $d, "InitDevFn", $defs{$d} );
|
my $ret = CallFn( $d, "InitDevFn", $defs{$d} );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user