add selection Adv Date, FirstAdvent or DeadSunday
This commit is contained in:
parent
98529d3c15
commit
07c4755845
@ -100,6 +100,7 @@ sub Initialize {
|
||||
. 'ASC_expert:1 '
|
||||
. 'ASC_blockAscDrivesAfterManual:0,1 '
|
||||
. 'ASC_debug:1 '
|
||||
. 'ASC_advDate:DeadSunday,FirstAdvent '
|
||||
. $readingFnAttributes;
|
||||
$hash->{NotifyOrderPrefix} = '51-'; # Order Nummer für NotifyFn
|
||||
$hash->{FW_detailFn} =
|
||||
|
@ -1,13 +1,13 @@
|
||||
UPD 2020-11-09_06:58:59 97618 FHEM/73_AutoShuttersControl.pm
|
||||
UPD 2020-11-09_07:06:40 74314 lib/FHEM/Automation/ShuttersControl.pm
|
||||
UPD 2020-11-20_11:10:24 97664 FHEM/73_AutoShuttersControl.pm
|
||||
UPD 2020-11-20_11:08:05 74314 lib/FHEM/Automation/ShuttersControl.pm
|
||||
UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
|
||||
UPD 2020-07-26_17:36:29 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm
|
||||
UPD 2020-08-12_11:00:05 31376 lib/FHEM/Automation/ShuttersControl/Shutters.pm
|
||||
UPD 2020-11-09_06:58:59 25599 lib/FHEM/Automation/ShuttersControl/Shading.pm
|
||||
UPD 2020-11-17_07:55:07 110071 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
|
||||
UPD 2020-10-23_07:22:10 45903 lib/FHEM/Automation/ShuttersControl/Helper.pm
|
||||
UPD 2020-11-17_07:59:34 110071 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
|
||||
UPD 2020-11-20_11:15:51 46052 lib/FHEM/Automation/ShuttersControl/Helper.pm
|
||||
UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm
|
||||
UPD 2020-11-09_06:58:59 11609 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
|
||||
UPD 2020-11-20_11:10:18 11742 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
|
||||
UPD 2020-07-03_11:29:10 7251 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm
|
||||
UPD 2020-11-09_06:58:59 52525 lib/FHEM/Automation/ShuttersControl/Shutters/Attr.pm
|
||||
UPD 2020-06-22_09:41:40 2903 lib/FHEM/Automation/ShuttersControl/Shutters/Readings.pm
|
||||
|
@ -392,6 +392,14 @@ sub getBlockAscDrivesAfterManual {
|
||||
return AttrVal( $name, 'ASC_blockAscDrivesAfterManual', 0 );
|
||||
}
|
||||
|
||||
sub getAdvDate {
|
||||
my $self = shift;
|
||||
|
||||
my $name = $self->{name};
|
||||
|
||||
return AttrVal( $name, 'ASC_advDate', 'FirstAdvent' );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1173,7 +1173,11 @@ sub IsAdv {
|
||||
my $time = HTTP::Date::str2time( $year . '-12-25' );
|
||||
my $wday = ( localtime($time) )[6];
|
||||
$wday = $wday ? $wday : 7;
|
||||
$time -= ( $wday + 21 ) * 86400;
|
||||
$time -= ( $FHEM::Automation::ShuttersControl::ascDev
|
||||
->getAdvDate eq 'DeadSunday'
|
||||
? ($wday + 27) * 86400
|
||||
: ($wday + 21) * 86400
|
||||
);
|
||||
$adv = 1 if ( $time < time );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user