mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 10:46:03 +00:00
98_WeekdayTimer: fix incorrect diffwe handling in some cases, #114168
git-svn-id: https://svn.fhem.de/fhem/trunk@27118 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
063b8d4961
commit
562965ea18
@ -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: 98_WeekdayTimer: !$we handling
|
||||||
- new: 74_AutomowerConnect: Control Automower + Host
|
- new: 74_AutomowerConnect: Control Automower + Host
|
||||||
- new: 75_AutomowerConnectDevice: Control Automower Client
|
- new: 75_AutomowerConnectDevice: Control Automower Client
|
||||||
- new: automowerconnect.js: Frontend helper
|
- new: automowerconnect.js: Frontend helper
|
||||||
|
@ -323,6 +323,7 @@ sub _Profile {
|
|||||||
my %longDays = %{$hash->{'.longDays'}};
|
my %longDays = %{$hash->{'.longDays'}};
|
||||||
|
|
||||||
delete $hash->{profil};
|
delete $hash->{profil};
|
||||||
|
delete $hash->{profile_IDX};
|
||||||
my $now = time;
|
my $now = time;
|
||||||
my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime($now);
|
my($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime($now);
|
||||||
|
|
||||||
@ -331,7 +332,6 @@ sub _Profile {
|
|||||||
for my $st ( @{$hash->{SWITCHINGTIMES}} ) {
|
for my $st ( @{$hash->{SWITCHINGTIMES}} ) {
|
||||||
my ($tage,$time,$parameter,$overrulewday) = _SwitchingTime ($hash, $st);
|
my ($tage,$time,$parameter,$overrulewday) = _SwitchingTime ($hash, $st);
|
||||||
|
|
||||||
|
|
||||||
$idx++;
|
$idx++;
|
||||||
for my $d (@{$tage}) {
|
for my $d (@{$tage}) {
|
||||||
my @listeDerTage = ($d);
|
my @listeDerTage = ($d);
|
||||||
@ -372,7 +372,11 @@ sub _Profile {
|
|||||||
}
|
}
|
||||||
# ---- Texte Readings aufbauen -----------------------------------------
|
# ---- Texte Readings aufbauen -----------------------------------------
|
||||||
#Log3( $hash, 4, "[$hash->{NAME}] " . sunrise_abs() . " " . sunset_abs() . " " . $longDays{$language}[$wday] );
|
#Log3( $hash, 4, "[$hash->{NAME}] " . sunrise_abs() . " " . sunset_abs() . " " . $longDays{$language}[$wday] );
|
||||||
for my $d (sort keys %{$hash->{profile}}) {
|
for (0..8) {
|
||||||
|
my $pKey = "Profil $_: $longDays{$language}[$_]";
|
||||||
|
delete $hash->{$pKey};
|
||||||
|
}
|
||||||
|
for my $d (sort keys %{$hash->{profile}}) {
|
||||||
my $profiltext = q{};
|
my $profiltext = q{};
|
||||||
for my $t (sort keys %{$hash->{profile}{$d}}) {
|
for my $t (sort keys %{$hash->{profile}{$d}}) {
|
||||||
$profiltext .= "$t " . $hash->{profile}{$d}{$t} . ", ";
|
$profiltext .= "$t " . $hash->{profile}{$d}{$t} . ", ";
|
||||||
@ -421,8 +425,8 @@ sub _SwitchingTime {
|
|||||||
my $globalDaylistSpec = $hash->{GlobalDaylistSpec};
|
my $globalDaylistSpec = $hash->{GlobalDaylistSpec};
|
||||||
my @tageGlobal = @{_daylistAsArray($hash, $globalDaylistSpec)};
|
my @tageGlobal = @{_daylistAsArray($hash, $globalDaylistSpec)};
|
||||||
|
|
||||||
my (@st, $daylist, $time, $timeString, $para);
|
my ($daylist, $time, $timeString, $para);
|
||||||
@st = split m{\|}xms, $switchingtime;
|
my @st = split m{\|}xms, $switchingtime;
|
||||||
my $overrulewday = 0;
|
my $overrulewday = 0;
|
||||||
if ( @st == 2 || @st == 3 && $st[2] eq 'w') {
|
if ( @st == 2 || @st == 3 && $st[2] eq 'w') {
|
||||||
$daylist = ($globalDaylistSpec ne '') ? $globalDaylistSpec : '0123456';
|
$daylist = ($globalDaylistSpec ne '') ? $globalDaylistSpec : '0123456';
|
||||||
@ -433,7 +437,7 @@ sub _SwitchingTime {
|
|||||||
$daylist = $st[0];
|
$daylist = $st[0];
|
||||||
$time = $st[1];
|
$time = $st[1];
|
||||||
$para = $st[2];
|
$para = $st[2];
|
||||||
$overrulewday = 1 if defined $st[3] && $st[3] eq 'w';
|
$overrulewday = 1 if defined $st[3] && $st[3] eq 'w' || $st[0] == 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
my @tage = @{_daylistAsArray($hash, $daylist)};
|
my @tage = @{_daylistAsArray($hash, $daylist)};
|
||||||
@ -974,6 +978,8 @@ sub WDT_Update {
|
|||||||
my $timToSwitch = $hash->{profil}{$idx}{EPOCH};
|
my $timToSwitch = $hash->{profil}{$idx}{EPOCH};
|
||||||
my $overrulewday = $hash->{profil}{$idx}{WE_Override};
|
my $overrulewday = $hash->{profil}{$idx}{WE_Override};
|
||||||
|
|
||||||
|
$overrulewday = 1 if $hash->{profil}{$idx}{DAYS} == 8;
|
||||||
|
|
||||||
#Log3 $hash, 3, "[$name] $idx ". $time . " " . $newParam . " " . join("",@$tage);
|
#Log3 $hash, 3, "[$name] $idx ". $time . " " . $newParam . " " . join("",@$tage);
|
||||||
|
|
||||||
# Fenserkontakte abfragen - wenn einer im Status closed, dann Schaltung um 60 Sekunden verzögern
|
# Fenserkontakte abfragen - wenn einer im Status closed, dann Schaltung um 60 Sekunden verzögern
|
||||||
|
Loading…
x
Reference in New Issue
Block a user