mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-09 20:57:11 +00:00
73_AutoShuttersControl: fix bug then create timer, timer set to 1970
git-svn-id: https://svn.fhem.de/fhem/trunk@18652 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7a0d75e4d4
commit
7a56a0ec7d
@ -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 then create timer, timer set to
|
||||
1970
|
||||
- new: 98_serviced: new modul for linux services (systemd and initd)
|
||||
- bugfix: 12_HProtocolGateway: start poll timer
|
||||
- bugfix: 73_AutoShuttersControl: fix many bugs, support for max window
|
||||
|
@ -41,7 +41,7 @@ package main;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $version = '0.4.0.4';
|
||||
my $version = '0.4.0.5';
|
||||
|
||||
sub AutoShuttersControl_Initialize($) {
|
||||
my ($hash) = @_;
|
||||
@ -1184,9 +1184,12 @@ sub EventProcessingBrightness($@) {
|
||||
if ( $homemode eq 'none' );
|
||||
$shutters->setLastDrive('maximum brightness threshold exceeded');
|
||||
|
||||
if ( $shutters->getModeUp eq $homemode
|
||||
or $homemode eq 'none'
|
||||
or $shutters->getModeUp eq 'always' )
|
||||
if (
|
||||
$shutters->getModeUp eq $homemode
|
||||
or ( $shutters->getModeUp eq 'absent'
|
||||
and $homemode eq 'gone' )
|
||||
or $shutters->getModeUp eq 'always'
|
||||
)
|
||||
{
|
||||
if (
|
||||
(
|
||||
@ -1245,9 +1248,12 @@ sub EventProcessingBrightness($@) {
|
||||
if ( $homemode eq 'none' );
|
||||
$shutters->setLastDrive('minimum brightness threshold fell below');
|
||||
|
||||
if ( $shutters->getModeDown eq $homemode
|
||||
or $homemode eq 'none'
|
||||
or $shutters->getModeDown eq 'always' )
|
||||
if (
|
||||
$shutters->getModeUp eq $homemode
|
||||
or ( $shutters->getModeUp eq 'absent'
|
||||
and $homemode eq 'gone' )
|
||||
or $shutters->getModeUp eq 'always'
|
||||
)
|
||||
{
|
||||
ShuttersCommandSet( $hash, $shuttersDev, $posValue );
|
||||
}
|
||||
@ -1604,8 +1610,7 @@ sub CreateSunRiseSetShuttersTimer($$) {
|
||||
"%e.%m.%Y - %H:%M", localtime($shuttersSunsetUnixtime)
|
||||
)
|
||||
: 'AutoShuttersControl off'
|
||||
),
|
||||
1
|
||||
)
|
||||
);
|
||||
readingsBulkUpdate(
|
||||
$shuttersDevHash,
|
||||
@ -1615,10 +1620,9 @@ sub CreateSunRiseSetShuttersTimer($$) {
|
||||
? strftime( "%e.%m.%Y - %H:%M",
|
||||
localtime($shuttersSunriseUnixtime) )
|
||||
: 'AutoShuttersControl off'
|
||||
),
|
||||
1
|
||||
)
|
||||
);
|
||||
readingsEndUpdate( $shuttersDevHash, 1 );
|
||||
readingsEndUpdate( $shuttersDevHash, 0 );
|
||||
|
||||
readingsBeginUpdate($hash);
|
||||
readingsBulkUpdateIfChanged(
|
||||
|
Loading…
x
Reference in New Issue
Block a user