fix error in adv condition

This commit is contained in:
Marko Oldenburg 2022-01-10 11:01:07 +01:00
parent f1f265b89a
commit a1d19a797d
2 changed files with 12 additions and 17 deletions

View File

@ -5,7 +5,7 @@ UPD 2022-01-02_07:57:18 2677 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2022-01-02_08:52:49 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm UPD 2022-01-02_08:52:49 32016 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2022-01-02_07:57:18 25452 lib/FHEM/Automation/ShuttersControl/Shading.pm UPD 2022-01-02_07:57:18 25452 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2022-01-02_07:57:18 112122 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm UPD 2022-01-02_07:57:18 112122 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2022-01-10_10:41:32 40708 lib/FHEM/Automation/ShuttersControl/Helper.pm UPD 2022-01-10_11:00:42 40571 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2022-01-02_07:57:18 2209 lib/FHEM/Automation/ShuttersControl/Window.pm UPD 2022-01-02_07:57:18 2209 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2022-01-10_10:41:34 11858 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm UPD 2022-01-10_10:41:34 11858 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2022-01-01_20:15:38 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm UPD 2022-01-01_20:15:38 7265 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm

View File

@ -1020,22 +1020,17 @@ sub IsAdv {
my $adv = 0; my $adv = 0;
$year += 1900; $year += 1900;
if ( $month < 2 ) { if ( $month < 1
if ( && $FHEM::Automation::ShuttersControl::ascDev->getAdvEndDate eq
( 'EpiphanyDay' )
$month < 1 {
&& $FHEM::Automation::ShuttersControl::ascDev->getAdvEndDate eq $adv = $monthday < 7 ? 1 : 0;
'EpiphanyDay' }
&& $monthday < 7 elsif ($month < 2
) && $FHEM::Automation::ShuttersControl::ascDev->getAdvEndDate eq
|| ( $month < 2 'CandlemasDay' )
&& $FHEM::Automation::ShuttersControl::ascDev->getAdvEndDate eq {
'CandlemasDay' $adv = $monthday < 3 ? 1 : 0;
&& $monthday < 3 )
)
{
$adv = 1;
}
} }
else { else {
my $time = str2time( $year . '-12-25' ); my $time = str2time( $year . '-12-25' );