From 62ec22b88aba101998c87815c512fe60ec68e0ae Mon Sep 17 00:00:00 2001 From: xasher <> Date: Tue, 21 Jun 2022 14:27:17 +0000 Subject: [PATCH] 70_Klafs.pm: Klafs Sauna control git-svn-id: https://svn.fhem.de/fhem/trunk@26163 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/70_Klafs.pm | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 559bfca0a..18c436934 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # 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: 79_Klafs: minor bugfix for date format - bugfix: 38_netatmo: fixed csrf error on home notification settings - bugfix: 10_SOMFY: Correct match for long commands according to #msg1224029 - bugfix: 70_Klafs: Start time error fixed diff --git a/fhem/FHEM/70_Klafs.pm b/fhem/FHEM/70_Klafs.pm index 61feb8212..23d9457b0 100644 --- a/fhem/FHEM/70_Klafs.pm +++ b/fhem/FHEM/70_Klafs.pm @@ -32,7 +32,7 @@ use JSON qw(decode_json encode_json); #use Encode qw(encode_utf8 decode_utf8); use Time::Piece; use Time::Local; -use Data::Dumper; +#use Data::Dumper; use HttpUtils; use FHEM::Core::Authentication::Passwords qw(:ALL); @@ -666,11 +666,19 @@ sub Klafs_Set { $now += $FIFTEEN_MINS - $diff; } my $next = scalar localtime $now; + # doppelte Leerzeichen bei einstelligen Datumsangaben entfernen + $next =~ tr/ //s; my @Zeit = split(/ /,$next); - my @Uhrzeit = split(/:/,$Zeit[4]); + my @Uhrzeit = split(/:/,$Zeit[3]); my $std = $Uhrzeit[0]; my $min = $Uhrzeit[1]; - + # print "Decoded Zeit:\n".Dumper(@Zeit); + #Decoded Zeit: + #$VAR1 = 'Mon'; + #$VAR2 = 'Jun'; + #$VAR3 = '20'; + #$VAR4 = '15:15:00'; + #$VAR5 = '2022'; if($std < 10){ if(substr($std,0,1) eq "0"){