mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-12 22:56:34 +00:00
73_AutoShuttersControl: fix IsDay Fn for weekend condition and more
git-svn-id: https://svn.fhem.de/fhem/trunk@23008 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
bce86b5c76
commit
72c8bbd2b9
@ -1,5 +1,8 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# 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.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 73_AutoShuttersControl: fix IsDay Fn for weekend condition
|
||||||
|
- fix detected IsDay for Brightness
|
||||||
|
- https://git.cooltux.net/FHEM/mod-AutoShuttersControl/issues/25
|
||||||
- feature: 72_XiaomiDevice: New fan type FA1
|
- feature: 72_XiaomiDevice: New fan type FA1
|
||||||
- change: 50_TelegramBot: sendVideo and support for video format
|
- change: 50_TelegramBot: sendVideo and support for video format
|
||||||
- bugfix: 89_FULLY: Removed log messages
|
- bugfix: 89_FULLY: Removed log messages
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Developed with Kate
|
# Developed with Kate
|
||||||
#
|
#
|
||||||
# (c) 2018-2020 Copyright: Marko Oldenburg (leongaultier at gmail dot com)
|
# (c) 2018-2020 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||||
# All rights reserved
|
# All rights reserved
|
||||||
#
|
#
|
||||||
# Special thanks goes to:
|
# Special thanks goes to:
|
||||||
@ -41,6 +41,12 @@
|
|||||||
# !!!!! - Innerhalb einer Shutterschleife kein CommandAttr verwenden. Bring Fehler!!! Kommen Raumnamen in die Shutterliste !!!!!!
|
# !!!!! - Innerhalb einer Shutterschleife kein CommandAttr verwenden. Bring Fehler!!! Kommen Raumnamen in die Shutterliste !!!!!!
|
||||||
#
|
#
|
||||||
|
|
||||||
|
package main;
|
||||||
|
|
||||||
|
use Meta;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
package FHEM::AutoShuttersControl;
|
package FHEM::AutoShuttersControl;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
@ -1258,7 +1264,7 @@ sub Initialize {
|
|||||||
],
|
],
|
||||||
"release_status": "testing",
|
"release_status": "testing",
|
||||||
"license": "GPL_2",
|
"license": "GPL_2",
|
||||||
"version": "v0.10.9",
|
"version": "v0.10.10",
|
||||||
"author": [
|
"author": [
|
||||||
"Marko Oldenburg <leongaultier@gmail.com>"
|
"Marko Oldenburg <leongaultier@gmail.com>"
|
||||||
],
|
],
|
||||||
|
@ -506,7 +506,7 @@ sub Notify {
|
|||||||
{ # Kommt ein globales Event und beinhaltet folgende Syntax wird die Funktion zur Verarbeitung aufgerufen
|
{ # Kommt ein globales Event und beinhaltet folgende Syntax wird die Funktion zur Verarbeitung aufgerufen
|
||||||
if (
|
if (
|
||||||
grep
|
grep
|
||||||
m{^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAstroModeMorning|.*ASC_AutoAstroModeMorningHorizon|.*ASC_AutoAstroModeEvening|.*ASC_AutoAstroModeEveningHorizon|.*ASC_Time_Up_Early|.*ASC_Time_Up_Late|.*ASC_Time_Down_Early|.*ASC_Time_Down_Late|.*ASC_autoAstroModeMorning|.*ASC_autoAstroModeMorningHorizon|.*ASC_PrivacyDownValue_beforeNightClose|.*ASC_PrivacyUpValue_beforeDayOpen|.*ASC_autoAstroModeEvening|.*ASC_autoAstroModeEveningHorizon|.*ASC_Roommate_Device|.*ASC_WindowRec|.*ASC_residentsDev|.*ASC_rainSensor|.*ASC_windSensor|.*ASC_tempSensor|.*ASC_BrightnessSensor|.*ASC_twilightDevice|.*ASC_ExternalTrigger|.*ASC_Shading_StateChange_SunnyCloudy)(\s.*|$)}xms,
|
m{^(ATTR|DELETEATTR)\s(.*ASC_Time_Up_WE_Holiday|.*ASC_Up|.*ASC_Down|.*ASC_AutoAstroModeMorning|.*ASC_AutoAstroModeMorningHorizon|.*ASC_AutoAstroModeEvening|.*ASC_AutoAstroModeEveningHorizon|.*ASC_Time_Up_Early|.*ASC_Time_Up_Late|.*ASC_Time_Down_Early|.*ASC_Time_Down_Late|.*ASC_autoAstroModeMorning|.*ASC_autoAstroModeMorningHorizon|.*ASC_PrivacyDownValue_beforeNightClose|.*ASC_PrivacyUpValue_beforeDayOpen|.*ASC_autoAstroModeEvening|.*ASC_autoAstroModeEveningHorizon|.*ASC_Roommate_Device|.*ASC_WindowRec|.*ASC_residentsDev|.*ASC_rainSensor|.*ASC_windSensor|.*ASC_tempSensor|.*ASC_BrightnessSensor|.*ASC_twilightDevice|.*ASC_ExternalTrigger|.*ASC_Shading_StateChange_SunnyCloudy|.*ASC_TempSensor|.*ASC_Shading_Mode)(\s.*|$)}xms,
|
||||||
@{$events}
|
@{$events}
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -571,7 +571,7 @@ sub Set {
|
|||||||
elsif ( lc $cmd eq 'controlshading' ) {
|
elsif ( lc $cmd eq 'controlshading' ) {
|
||||||
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
|
return "usage: $cmd" if ( scalar( @{$aArg} ) > 1 );
|
||||||
|
|
||||||
my $response = CheckASC_ConditionsForShadingFn($hash);
|
my $response = CheckASC_ConditionsForShadingFn($hash,$aArg->[0]);
|
||||||
readingsSingleUpdate(
|
readingsSingleUpdate(
|
||||||
$hash, $cmd,
|
$hash, $cmd,
|
||||||
(
|
(
|
||||||
@ -985,8 +985,6 @@ sub ShuttersCommandSet {
|
|||||||
(
|
(
|
||||||
CheckIfShuttersWindowRecOpen($shuttersDev) == 2
|
CheckIfShuttersWindowRecOpen($shuttersDev) == 2
|
||||||
&& $shutters->getShuttersPlace eq 'terrace'
|
&& $shutters->getShuttersPlace eq 'terrace'
|
||||||
&& ( $shutters->getLockOut eq 'soft'
|
|
||||||
|| $shutters->getLockOut eq 'hard' )
|
|
||||||
&& !$shutters->getQueryShuttersPos($posValue)
|
&& !$shutters->getQueryShuttersPos($posValue)
|
||||||
)
|
)
|
||||||
|| (
|
|| (
|
||||||
@ -1017,7 +1015,9 @@ sub ShuttersCommandSet {
|
|||||||
)
|
)
|
||||||
|| ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
|
|| ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
|
||||||
&& $shutters->getShuttersPlace eq 'terrace'
|
&& $shutters->getShuttersPlace eq 'terrace'
|
||||||
&& !$shutters->getQueryShuttersPos($posValue) )
|
&& !$shutters->getQueryShuttersPos($posValue)
|
||||||
|
&& ( $shutters->getLockOut eq 'soft'
|
||||||
|
|| $shutters->getLockOut eq 'hard' ) )
|
||||||
|| ( $shutters->getRainProtectionStatus eq 'protected'
|
|| ( $shutters->getRainProtectionStatus eq 'protected'
|
||||||
|| $shutters->getWindProtectionStatus eq 'protected' )
|
|| $shutters->getWindProtectionStatus eq 'protected' )
|
||||||
)
|
)
|
||||||
|
@ -209,8 +209,21 @@ m{^(DELETEATTR|ATTR) #global ATTR myASC ASC_tempSensor Cellar
|
|||||||
(.*)?}xms
|
(.*)?}xms
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
CommandSet( undef, $name . ' controlShading on' )
|
# ATTR RolloKinZimSteven_F1 ASC_Shading_Mode off
|
||||||
if ( ReadingsVal( $name, 'controlShading', 'off' ) ne 'off' );
|
if ( $events =~ m{^ATTR\s(.*)\sASC_Shading_Mode\s(off)}xms ) {
|
||||||
|
my %funcHash = (
|
||||||
|
hash => $hash,
|
||||||
|
shuttersdevice => $1,
|
||||||
|
value => $2,
|
||||||
|
attrEvent => 1,
|
||||||
|
);
|
||||||
|
|
||||||
|
FHEM::Automation::ShuttersControl::Shading::_CheckShuttersConditionsForShadingFn(\%funcHash);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
CommandSet( undef, $name . ' controlShading on' )
|
||||||
|
if ( ReadingsVal( $name, 'controlShading', 'off' ) ne 'off' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -913,11 +926,13 @@ sub EventProcessingResidents {
|
|||||||
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
|
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev(
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev(
|
||||||
$shuttersDev);
|
$shuttersDev);
|
||||||
|
|
||||||
my $getModeUp =
|
my $getModeUp =
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getModeUp;
|
$FHEM::Automation::ShuttersControl::shutters->getModeUp;
|
||||||
my $getModeDown =
|
my $getModeDown =
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getModeDown;
|
$FHEM::Automation::ShuttersControl::shutters->getModeDown;
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setHardLockOut('off');
|
$FHEM::Automation::ShuttersControl::shutters->setHardLockOut('off');
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$FHEM::Automation::ShuttersControl::ascDev->getSelfDefense eq
|
$FHEM::Automation::ShuttersControl::ascDev->getSelfDefense eq
|
||||||
'on'
|
'on'
|
||||||
@ -1594,7 +1609,7 @@ sub EventProcessingBrightness {
|
|||||||
if ( $events =~ m{$reading:\s(\d+(\.\d+)?)}xms ) {
|
if ( $events =~ m{$reading:\s(\d+(\.\d+)?)}xms ) {
|
||||||
my $brightnessMinVal;
|
my $brightnessMinVal;
|
||||||
if ( $FHEM::Automation::ShuttersControl::shutters->getBrightnessMinVal >
|
if ( $FHEM::Automation::ShuttersControl::shutters->getBrightnessMinVal >
|
||||||
-1 )
|
-2 )
|
||||||
{
|
{
|
||||||
$brightnessMinVal =
|
$brightnessMinVal =
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getBrightnessMinVal;
|
$FHEM::Automation::ShuttersControl::shutters->getBrightnessMinVal;
|
||||||
@ -1606,7 +1621,7 @@ sub EventProcessingBrightness {
|
|||||||
|
|
||||||
my $brightnessMaxVal;
|
my $brightnessMaxVal;
|
||||||
if ( $FHEM::Automation::ShuttersControl::shutters->getBrightnessMaxVal >
|
if ( $FHEM::Automation::ShuttersControl::shutters->getBrightnessMaxVal >
|
||||||
-1 )
|
-2 )
|
||||||
{
|
{
|
||||||
$brightnessMaxVal =
|
$brightnessMaxVal =
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getBrightnessMaxVal;
|
$FHEM::Automation::ShuttersControl::shutters->getBrightnessMaxVal;
|
||||||
|
@ -257,13 +257,13 @@ sub _IsDay {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
||||||
|
|
||||||
my $brightnessMinVal = (
|
my $brightnessMinVal = (
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getBrightnessMinVal > -1
|
$FHEM::Automation::ShuttersControl::shutters->getBrightnessMinVal > -2
|
||||||
? $FHEM::Automation::ShuttersControl::shutters->getBrightnessMinVal
|
? $FHEM::Automation::ShuttersControl::shutters->getBrightnessMinVal
|
||||||
: $FHEM::Automation::ShuttersControl::ascDev->getBrightnessMinVal
|
: $FHEM::Automation::ShuttersControl::ascDev->getBrightnessMinVal
|
||||||
);
|
);
|
||||||
|
|
||||||
my $brightnessMaxVal = (
|
my $brightnessMaxVal = (
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getBrightnessMaxVal > -1
|
$FHEM::Automation::ShuttersControl::shutters->getBrightnessMaxVal > -2
|
||||||
? $FHEM::Automation::ShuttersControl::shutters->getBrightnessMaxVal
|
? $FHEM::Automation::ShuttersControl::shutters->getBrightnessMaxVal
|
||||||
: $FHEM::Automation::ShuttersControl::ascDev->getBrightnessMaxVal
|
: $FHEM::Automation::ShuttersControl::ascDev->getBrightnessMaxVal
|
||||||
);
|
);
|
||||||
@ -284,7 +284,15 @@ sub _IsDay {
|
|||||||
$FHEM::Automation::ShuttersControl::shutters
|
$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getTimeUpEarly ) / 86400
|
->getTimeUpEarly ) / 86400
|
||||||
)
|
)
|
||||||
&& !IsWe()
|
&& ( !IsWe()
|
||||||
|
|| ( IsWe()
|
||||||
|
&& ( $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getSunriseTimeWeHoliday eq 'off'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters
|
||||||
|
->getTimeUpWeHoliday eq '01:25'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|| (
|
|| (
|
||||||
int( gettimeofday() / 86400 ) != int(
|
int( gettimeofday() / 86400 ) != int(
|
||||||
@ -336,7 +344,7 @@ sub _IsDay {
|
|||||||
&& !$FHEM::Automation::ShuttersControl::shutters
|
&& !$FHEM::Automation::ShuttersControl::shutters
|
||||||
->getSunset
|
->getSunset
|
||||||
)
|
)
|
||||||
|| !$FHEM::Automation::ShuttersControl::shutters->getSunset
|
|| $FHEM::Automation::ShuttersControl::shutters->getSunrise
|
||||||
) ? 1 : 0
|
) ? 1 : 0
|
||||||
)
|
)
|
||||||
if ( $FHEM::Automation::ShuttersControl::shutters->getDown eq
|
if ( $FHEM::Automation::ShuttersControl::shutters->getDown eq
|
||||||
|
@ -83,7 +83,8 @@ BEGIN {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub CheckASC_ConditionsForShadingFn {
|
sub CheckASC_ConditionsForShadingFn {
|
||||||
my $hash = shift;
|
my $hash = shift;
|
||||||
|
my $value = shift;
|
||||||
|
|
||||||
my $error;
|
my $error;
|
||||||
|
|
||||||
@ -96,10 +97,17 @@ sub CheckASC_ConditionsForShadingFn {
|
|||||||
|
|
||||||
my $count = 1;
|
my $count = 1;
|
||||||
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
|
for my $shuttersDev ( @{ $hash->{helper}{shuttersList} } ) {
|
||||||
|
my %funcHash = (
|
||||||
|
hash => $hash,
|
||||||
|
shuttersdevice => $shuttersDev,
|
||||||
|
value => $value,
|
||||||
|
attrEvent => 0,
|
||||||
|
);
|
||||||
|
|
||||||
InternalTimer(
|
InternalTimer(
|
||||||
gettimeofday() + $count,
|
gettimeofday() + $count,
|
||||||
'FHEM::Automation::ShuttersControl::Shading::_CheckShuttersConditionsForShadingFn',
|
'FHEM::Automation::ShuttersControl::Shading::_CheckShuttersConditionsForShadingFn',
|
||||||
$shuttersDev
|
\%funcHash
|
||||||
);
|
);
|
||||||
|
|
||||||
$count++;
|
$count++;
|
||||||
@ -113,7 +121,11 @@ sub CheckASC_ConditionsForShadingFn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub _CheckShuttersConditionsForShadingFn {
|
sub _CheckShuttersConditionsForShadingFn {
|
||||||
my $shuttersDev = shift;
|
my $funcHash = shift;
|
||||||
|
|
||||||
|
my $hash = $funcHash->{hash};
|
||||||
|
my $shuttersDev = $funcHash->{shuttersdevice};
|
||||||
|
my $value = $funcHash->{value};
|
||||||
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
$FHEM::Automation::ShuttersControl::shutters->setShuttersDev($shuttersDev);
|
||||||
my $shuttersDevHash = $defs{$shuttersDev};
|
my $shuttersDevHash = $defs{$shuttersDev};
|
||||||
@ -121,59 +133,67 @@ sub _CheckShuttersConditionsForShadingFn {
|
|||||||
my $errorMessage;
|
my $errorMessage;
|
||||||
my $warnMessage;
|
my $warnMessage;
|
||||||
my $infoMessage;
|
my $infoMessage;
|
||||||
|
|
||||||
|
if ( $value eq 'off' ) {
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->setShadingStatus('out');
|
||||||
|
$infoMessage .= ' shading was deactivated ' . ($funcHash->{attrEvent} ? 'in the device' : 'globally');
|
||||||
|
$errorMessage .= '';
|
||||||
|
ShadingProcessingDriveCommand( $hash, $shuttersDev );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$infoMessage .= (
|
||||||
|
$FHEM::Automation::ShuttersControl::shutters->getShadingMode ne 'off'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
|
->getAutoShuttersControlShading eq 'on'
|
||||||
|
&& $FHEM::Automation::ShuttersControl::shutters->getOutTemp == -100
|
||||||
|
? ' shading active, global temp sensor is set, but shutters temperature sensor is not set'
|
||||||
|
: ''
|
||||||
|
);
|
||||||
|
|
||||||
$infoMessage .= (
|
$warnMessage .= (
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getShadingMode ne 'off'
|
$FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off'
|
||||||
&& $FHEM::Automation::ShuttersControl::ascDev
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
->getAutoShuttersControlShading eq 'on'
|
->getAutoShuttersControlShading eq 'on'
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getOutTemp == -100
|
? ' global shading active but ASC_Shading_Mode attribut is not set or off'
|
||||||
? ' shading active, global temp sensor is set, but shutters temperature sensor is not set'
|
: ''
|
||||||
: ''
|
);
|
||||||
);
|
|
||||||
|
|
||||||
$warnMessage .= (
|
$errorMessage .= (
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getShadingMode eq 'off'
|
$FHEM::Automation::ShuttersControl::shutters->getShadingMode ne 'off'
|
||||||
&& $FHEM::Automation::ShuttersControl::ascDev
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
->getAutoShuttersControlShading eq 'on'
|
->getAutoShuttersControlShading ne 'on'
|
||||||
? ' global shading active but ASC_Shading_Mode attribut is not set or off'
|
&& $FHEM::Automation::ShuttersControl::ascDev
|
||||||
: ''
|
->getAutoShuttersControlShading ne 'off'
|
||||||
);
|
? ' ASC_Shading_Mode attribut is set but global shading has errors, look at ASC device '
|
||||||
|
. '<a href="'
|
||||||
|
. '/fhem?detail='
|
||||||
|
. ReadingsVal( $shuttersDev, 'associatedWith', 'ASC device' )
|
||||||
|
. $::FW_CSRF . '">'
|
||||||
|
. ReadingsVal( $shuttersDev, 'associatedWith', 'ASC device' )
|
||||||
|
. '</a>'
|
||||||
|
: ''
|
||||||
|
);
|
||||||
|
|
||||||
$errorMessage .= (
|
$errorMessage .= (
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getShadingMode ne 'off'
|
$FHEM::Automation::ShuttersControl::shutters->getBrightness == -1
|
||||||
&& $FHEM::Automation::ShuttersControl::ascDev
|
&& $FHEM::Automation::ShuttersControl::shutters->getShadingMode ne
|
||||||
->getAutoShuttersControlShading ne 'on'
|
'off'
|
||||||
&& $FHEM::Automation::ShuttersControl::ascDev
|
? ' no brightness sensor found, please set ASC_BrightnessSensor attribut'
|
||||||
->getAutoShuttersControlShading ne 'off'
|
: ''
|
||||||
? ' ASC_Shading_Mode attribut is set but global shading has errors, look at ASC device '
|
);
|
||||||
. '<a href="'
|
}
|
||||||
. '/fhem?detail='
|
|
||||||
. ReadingsVal( $shuttersDev, 'associatedWith', 'ASC device' )
|
|
||||||
. $::FW_CSRF . '">'
|
|
||||||
. ReadingsVal( $shuttersDev, 'associatedWith', 'ASC device' )
|
|
||||||
. '</a>'
|
|
||||||
: ''
|
|
||||||
);
|
|
||||||
|
|
||||||
$errorMessage .= (
|
|
||||||
$FHEM::Automation::ShuttersControl::shutters->getBrightness == -1
|
|
||||||
&& $FHEM::Automation::ShuttersControl::shutters->getShadingMode ne
|
|
||||||
'off'
|
|
||||||
? ' no brightness sensor found, please set ASC_BrightnessSensor attribut'
|
|
||||||
: ''
|
|
||||||
);
|
|
||||||
|
|
||||||
$message .= ' ERROR: ' . $errorMessage
|
$message .= ' ERROR: ' . $errorMessage
|
||||||
if ( defined($errorMessage)
|
if ( defined($errorMessage)
|
||||||
&& $errorMessage ne '' );
|
&& $errorMessage ne '' );
|
||||||
|
|
||||||
$message .= ' WARN: ' . $warnMessage
|
$message .= ' WARN: ' . $warnMessage
|
||||||
if ( defined($warnMessage)
|
if ( defined($warnMessage)
|
||||||
&& $warnMessage ne ''
|
&& $warnMessage ne ''
|
||||||
&& $errorMessage eq '' );
|
&& $errorMessage eq '' );
|
||||||
|
|
||||||
$message .= ' INFO: ' . $infoMessage
|
$message .= ' INFO: ' . $infoMessage
|
||||||
if ( defined($infoMessage)
|
if ( defined($infoMessage)
|
||||||
&& $infoMessage ne ''
|
&& $infoMessage ne ''
|
||||||
&& $errorMessage eq '' );
|
&& $errorMessage eq '' );
|
||||||
|
|
||||||
@ -452,6 +472,8 @@ sub ShadingProcessing {
|
|||||||
|| $FHEM::Automation::ShuttersControl::shutters->getModeUp eq 'off'
|
|| $FHEM::Automation::ShuttersControl::shutters->getModeUp eq 'off'
|
||||||
|| $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
|
|| $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
|
||||||
'absent'
|
'absent'
|
||||||
|
|| $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
|
||||||
|
'gone'
|
||||||
|| ( $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
|
|| ( $FHEM::Automation::ShuttersControl::shutters->getModeUp eq
|
||||||
'home'
|
'home'
|
||||||
&& $homemode ne 'asleep' )
|
&& $homemode ne 'asleep' )
|
||||||
|
@ -738,9 +738,9 @@ sub _getBrightnessSensor {
|
|||||||
$self->{ $self->{shuttersDev} }->{ASC_BrightnessSensor}->{reading} =
|
$self->{ $self->{shuttersDev} }->{ASC_BrightnessSensor}->{reading} =
|
||||||
( $reading ne 'none' ? $reading : 'brightness' );
|
( $reading ne 'none' ? $reading : 'brightness' );
|
||||||
$self->{ $self->{shuttersDev} }->{ASC_BrightnessSensor}->{triggermin} =
|
$self->{ $self->{shuttersDev} }->{ASC_BrightnessSensor}->{triggermin} =
|
||||||
( $min ne 'none' ? $min : -1 );
|
( $min ne 'none' ? $min : -2 );
|
||||||
$self->{ $self->{shuttersDev} }->{ASC_BrightnessSensor}->{triggermax} =
|
$self->{ $self->{shuttersDev} }->{ASC_BrightnessSensor}->{triggermax} =
|
||||||
( $max ne 'none' ? $max : -1 );
|
( $max ne 'none' ? $max : -2 );
|
||||||
|
|
||||||
return $self->{ $self->{shuttersDev} }->{ASC_BrightnessSensor}->{device};
|
return $self->{ $self->{shuttersDev} }->{ASC_BrightnessSensor}->{device};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user