73_AutoShuttersControl: change code in ShuttersCommandSet

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@20223 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
LeonGaultier 2019-09-22 05:14:47 +00:00
parent 7cfce5f8ae
commit 51ff8ae90d
2 changed files with 42 additions and 38 deletions

View File

@ -1,5 +1,6 @@
# 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: change code in ShuttersCommandSet
- bugfix: 88_Timer: fix sort function - bugfix: 88_Timer: fix sort function
- feature: 70_SolarEdgeAPI: start using "overview" API, new attributes - feature: 70_SolarEdgeAPI: start using "overview" API, new attributes
- new: 88_Timer: new modul - new: 88_Timer: new modul

View File

@ -338,17 +338,9 @@ sub Define($$) {
return 'too few parameters: define <name> ShuttersControl' if ( @a != 2 ); return 'too few parameters: define <name> ShuttersControl' if ( @a != 2 );
my $name = $a[0]; my $name = $a[0];
$hash->{MID} = 'da39a3ee5e6b4b0d3255bfef95601890afd80709' $hash->{MID} = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'
; # eine Ein Eindeutige ID für interne FHEM Belange / nicht weiter wichtig ; # eine Ein Eindeutige ID für interne FHEM Belange / nicht weiter wichtig
$hash->{VERSION} = version->parse($VERSION)->normal;
# ### Versionierung ###
# Stable Version
$hash->{VERSION} = version->parse($VERSION)->normal;
# Developer Version
# $hash->{DEV_VERSION} = FHEM::Meta::Get( $hash, 'x_developmentversion' );
$hash->{NOTIFYDEV} = 'global,' $hash->{NOTIFYDEV} = 'global,'
. $name; # Liste aller Devices auf deren Events gehört werden sollen . $name; # Liste aller Devices auf deren Events gehört werden sollen
#$hash->{shutters} = $shutters; #$hash->{shutters} = $shutters;
@ -2374,38 +2366,50 @@ sub ShuttersCommandSet($$$) {
$shutters->setShuttersDev($shuttersDev); $shutters->setShuttersDev($shuttersDev);
if ( if (
$posValue != $shutters->getShadingPos (
and ( $posValue == $shutters->getShadingPos
( and (
$shutters->getPartyMode eq 'on'
and $ascDev->getPartyMode eq 'on'
)
or (
CheckIfShuttersWindowRecOpen($shuttersDev) == 2 CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and $shutters->getSubTyp eq 'threestate' and $shutters->getShuttersPlace eq 'terrace'
and ( $ascDev->getAutoShuttersControlComfort eq 'off'
or $shutters->getComfortOpenPos != $posValue )
and $shutters->getVentilateOpen eq 'on'
and $shutters->getShuttersPlace eq 'window'
and $shutters->getLockOut ne 'off'
)
or ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and $shutters->getSubTyp eq 'threestate'
and $ascDev->getAutoShuttersControlComfort eq 'on'
and $shutters->getVentilateOpen eq 'off'
and $shutters->getShuttersPlace eq 'window'
and $shutters->getLockOut ne 'off' )
or (
CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and ( $shutters->getLockOut eq 'soft' and ( $shutters->getLockOut eq 'soft'
or $shutters->getLockOut eq 'hard' ) or $shutters->getLockOut eq 'hard' )
and not $shutters->getQueryShuttersPos($posValue) and not $shutters->getQueryShuttersPos($posValue)
) )
or ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2 )
and $shutters->getShuttersPlace eq 'terrace' or (
and not $shutters->getQueryShuttersPos($posValue) ) $posValue != $shutters->getShadingPos
or ( $shutters->getRainProtectionStatus eq 'protected' and (
and $shutters->getWindProtectionStatus eq 'protected' ) (
$shutters->getPartyMode eq 'on'
and $ascDev->getPartyMode eq 'on'
)
or (
CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and $shutters->getSubTyp eq 'threestate'
and ( $ascDev->getAutoShuttersControlComfort eq 'off'
or $shutters->getComfortOpenPos != $posValue )
and $shutters->getVentilateOpen eq 'on'
and $shutters->getShuttersPlace eq 'window'
and $shutters->getLockOut ne 'off'
)
or ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and $shutters->getSubTyp eq 'threestate'
and $ascDev->getAutoShuttersControlComfort eq 'on'
and $shutters->getVentilateOpen eq 'off'
and $shutters->getShuttersPlace eq 'window'
and $shutters->getLockOut ne 'off' )
or (
CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and ( $shutters->getLockOut eq 'soft'
or $shutters->getLockOut eq 'hard' )
and not $shutters->getQueryShuttersPos($posValue)
)
or ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and $shutters->getShuttersPlace eq 'terrace'
and not $shutters->getQueryShuttersPos($posValue) )
or ( $shutters->getRainProtectionStatus eq 'protected'
and $shutters->getWindProtectionStatus eq 'protected' )
)
) )
) )
{ {
@ -6655,8 +6659,7 @@ sub getblockAscDrivesAfterManual {
], ],
"release_status": "under develop", "release_status": "under develop",
"license": "GPL_2", "license": "GPL_2",
"version": "v0.6.31", "version": "v0.6.32",
"x_developmentversion": "v0.6.19.34",
"author": [ "author": [
"Marko Oldenburg <leongaultier@gmail.com>" "Marko Oldenburg <leongaultier@gmail.com>"
], ],