Add files via upload

This commit is contained in:
Byte009 2021-11-10 05:59:31 +01:00 committed by GitHub
parent 6f8e15b873
commit f98223eee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -786,13 +786,13 @@ sub Set($@) {
# versionschange # versionschange
#changeconfig #changeconfig
# off up
if (AttrVal( $name, 'SIRO_inversONOFF',0 ) eq "1") if (AttrVal( $name, 'SIRO_inversONOFF',0 ) eq "1")
{ {
if ($cmd eq "on"){$cmd = "off"}; if ($cmd eq "on"){$cmd = "up"};
if ($cmd eq "off"){$cmd = "on"}; if ($cmd eq "off"){$cmd = "down"};
} }
@ -1259,6 +1259,16 @@ sub Set($@) {
if ($comand eq "on" || $comand eq "downfortimer" ) if ($comand eq "on" || $comand eq "downfortimer" )
{ {
Log3( $name, 3, "Siro-Set ($name) : set Down"); Log3( $name, 3, "Siro-Set ($name) : set Down");
if ($downtime eq "undef" || $uptime eq "undef") # bei ungesetzten fahrzeiten if ($downtime eq "undef" || $uptime eq "undef") # bei ungesetzten fahrzeiten
{ {
readingsBeginUpdate($hash); readingsBeginUpdate($hash);
@ -1274,6 +1284,9 @@ sub Set($@) {
if (AttrVal( $name, 'SIRO_inversPosition',0 ) eq "1"){$waytodrive = $state;} if (AttrVal( $name, 'SIRO_inversPosition',0 ) eq "1"){$waytodrive = $state;}
my $timetodrive = $waytodrive * $down1time; my $timetodrive = $waytodrive * $down1time;
my $endaction = time + $timetodrive; my $endaction = time + $timetodrive;
Log3( $name, 5, "Siro-Set: on downtime - waytodrive $waytodrive"); Log3( $name, 5, "Siro-Set: on downtime - waytodrive $waytodrive");
@ -1326,6 +1339,10 @@ sub Set($@) {
my $waytodrive = 0 + $state; my $waytodrive = 0 + $state;
if (AttrVal( $name, 'SIRO_inversPosition',0 ) eq "1"){$waytodrive = 0 + (100- $state);} if (AttrVal( $name, 'SIRO_inversPosition',0 ) eq "1"){$waytodrive = 0 + (100- $state);}
my $timetodrive = $waytodrive * $up1time; my $timetodrive = $waytodrive * $up1time;
my $endaction = time + $timetodrive; my $endaction = time + $timetodrive;
Log3( $name, 5, "Siro-Set: off downtime - waytodrive $waytodrive"); Log3( $name, 5, "Siro-Set: off downtime - waytodrive $waytodrive");