dev #74

Merged
sebastianschwarz merged 126 commits from dev into testing 2022-09-06 11:31:54 +00:00
3 changed files with 8 additions and 7 deletions
Showing only changes of commit 9f9722ce9c - Show all commits

View File

@ -1 +1 @@
debug stuff
fix

View File

@ -758,7 +758,7 @@ sub WriteReadings {
. '_irrigation_left',
sprintf("%.f" ,
Time::Piece::localtime->strptime(
$decode_json->{abilities}[$abilities]{timestamp}, "%Y-%m-%d %H:%M:%S")
RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S")
+ ($propertie->{value}{duration} + 3 ) - Time::Piece::localtime->new )
)
if ( defined( $propertie->{value} )
@ -768,15 +768,16 @@ sub WriteReadings {
if ( defined( $propertie->{value} )
&& $decode_json->{abilities}[$abilities]{name} eq 'watering'
&& $propertie->{value}{duration} > 0 ){
Log3 $name, 2, "[DDebug] " . RigReadingsValue($hash, Time::Piece::localtime->strptime( $decode_json->{abilities}[$abilities]{timestamp}));
my $dt = RigReadingsValue($hash, Time::Piece::localtime->strptime( $decode_json->{abilities}[$abilities]{timestamp}), "%Y-%m-%d %H:%M:%S");
Log3 $name, 2, "[DDebug] " . Time::Piece::localtime->strptime(
RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S");
my $dt = Time::Piece::localtime->strptime( RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S");
Log3 $name, 2, "[DEBUG] $dt";
my $ndt = Time::Piece::localtime->new;
Log3 $name, 2, "[DEBUG] $ndt";
Log3 $name, 2, "[DEBUG] " . $dt + ($propertie->{value}{duration} + 3 );
Log3 $name, 2, "[DEBUG] " . sprintf("%.f" ,
Time::Piece::localtime->strptime(
$decode_json->{abilities}[$abilities]{timestamp}, "%Y-%m-%d %H:%M:%S")
Time::Piece::localtime->strptime(
RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S")
+ ($propertie->{value}{duration} + 3 ) - Time::Piece::localtime->new );
}
#2022-06-21T08:56:42.488Z -> 2022-06-21 08:56:48

View File

@ -1,2 +1,2 @@
UPD 2022-06-21_08:17:57 49520 FHEM/73_GardenaSmartBridge.pm
UPD 2022-06-23_12:15:06 71346 FHEM/74_GardenaSmartDevice.pm
UPD 2022-06-23_12:36:14 71385 FHEM/74_GardenaSmartDevice.pm