mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-09 20:57:11 +00:00
73_AutoShuttersControl: fix Bug open Window befor IsDay and closed
git-svn-id: https://svn.fhem.de/fhem/trunk@18742 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
646d80c965
commit
1ebe1d2f73
@ -1,5 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 73_AutoShuttersControl: fix Bug open Window befor IsDay and closed
|
||||
IsDay
|
||||
- changed: 74_Unifi: removed deprecated UnifiSwitch-functions!
|
||||
- bugfix: 74_UnififSwitch: fixed poe restart
|
||||
- feature: 57_Calendar.pm: new features and attributes
|
||||
|
@ -41,7 +41,7 @@ package main;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $version = '0.4.0.6';
|
||||
my $version = '0.4.0.7';
|
||||
|
||||
sub AutoShuttersControl_Initialize($) {
|
||||
my ($hash) = @_;
|
||||
@ -81,10 +81,10 @@ sub AutoShuttersControl_Initialize($) {
|
||||
$hash->{NotifyOrderPrefix} = '51-'; # Order Nummer für NotifyFn
|
||||
|
||||
## Ist nur damit sich bei einem reload auch die Versionsnummer erneuert.
|
||||
foreach my $d ( sort keys %{ $modules{AutoShuttersControl}{defptr} } ) {
|
||||
my $hash = $modules{AutoShuttersControl}{defptr}{$d};
|
||||
$hash->{VERSION} = $version;
|
||||
}
|
||||
# foreach my $d ( sort keys %{ $modules{AutoShuttersControl}{defptr} } ) {
|
||||
# my $hash = $modules{AutoShuttersControl}{defptr}{$d};
|
||||
# $hash->{VERSION} = $version;
|
||||
# }
|
||||
}
|
||||
|
||||
## unserer packagename
|
||||
@ -2053,9 +2053,20 @@ sub ExtractNotifyDevFromEvent($$$) {
|
||||
## Ist Tag oder Nacht für den entsprechende Rolladen
|
||||
sub IsDay($$) {
|
||||
my ( $hash, $shuttersDev ) = @_;
|
||||
$shutters->setShuttersDev($shuttersDev);
|
||||
|
||||
my $name = $hash->{NAME};
|
||||
return ( ShuttersSunrise( $hash, $shuttersDev, 'unix' ) >
|
||||
my $isday = ( ShuttersSunrise( $hash, $shuttersDev, 'unix' ) >
|
||||
ShuttersSunset( $hash, $shuttersDev, 'unix' ) ? 1 : 0 );
|
||||
my $respIsDay = $isday;
|
||||
|
||||
$respIsDay = ( ($shutters->getBrightness > $shutters->getBrightnessMinVal and $isday) ? 1 : 0 )
|
||||
if ( $shutters->getDown eq 'brightness' );
|
||||
|
||||
$respIsDay = ( (($shutters->getBrightness > $shutters->getBrightnessMaxVal and not $isday) or $respIsDay) ? 1 : 0 )
|
||||
if ( $shutters->getUp eq 'brightness' );
|
||||
|
||||
return $respIsDay;
|
||||
}
|
||||
|
||||
sub ShuttersSunrise($$$) {
|
||||
@ -2710,8 +2721,7 @@ sub getFreezeStatus {
|
||||
if ( $shutters->getAntiFreeze eq 'soft' ) {
|
||||
return 1;
|
||||
}
|
||||
elsif ($shutters->getAntiFreeze eq $daytime
|
||||
or $shutters->getAntiFreeze eq $daytime )
|
||||
elsif ($shutters->getAntiFreeze eq $daytime )
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user