From 458edffa85fe15faa7e9f875cb177fe1497da09e Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 23 Jun 2022 13:33:27 +0200 Subject: [PATCH] [alpha] extendetState : fix irrigation left zero value --- CHANGED | 2 +- FHEM/74_GardenaSmartDevice.pm | 8 ++++---- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGED b/CHANGED index a2d7c19..ab55269 100644 --- a/CHANGED +++ b/CHANGED @@ -1 +1 @@ - [alpha] - extendetState - irrigation stuff + [alpha] excentedState - fix wc state, add irrigation duration diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index 7aa4854..5378774 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -753,13 +753,13 @@ sub WriteReadings { $decode_json->{abilities}[$abilities]{name} . '-' . $propertie->{name} . '_irrigation_left', - (Time::Piece::localtime->strptime( + ( $propertie->{value}{duration} > 0 ) ? (Time::Piece::localtime->strptime( RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S") - + ($propertie->{value}{duration} + 3 ) - Time::Piece::localtime->new) + + ($propertie->{value}{duration} + 3 ) - Time::Piece::localtime->new) : 0 ) if ( defined( $propertie->{value} ) && $decode_json->{abilities}[$abilities]{name} eq 'watering' - && $propertie->{value}{duration} > 0 ); + ); } } @@ -1662,7 +1662,7 @@ sub SetPredefinedStartPoints { ], "release_status": "stable", "license": "GPL_2", - "version": "v2.4.4", + "version": "v2.5.3", "author": [ "Marko Oldenburg " ], diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 7f280c2..3696069 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ UPD 2022-06-21_08:17:57 49520 FHEM/73_GardenaSmartBridge.pm -UPD 2022-06-23_12:54:46 69289 FHEM/74_GardenaSmartDevice.pm +UPD 2022-06-23_13:33:10 69293 FHEM/74_GardenaSmartDevice.pm