From c68f35c2e3b4777f32f7378f452a3cd3781fb710 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 23 Jun 2022 12:08:26 +0200 Subject: [PATCH] [alpha] - extendetState. fix state --- CHANGED | 2 +- FHEM/74_GardenaSmartDevice.pm | 9 +++------ controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGED b/CHANGED index 925aa5b..806a9d2 100644 --- a/CHANGED +++ b/CHANGED @@ -1 +1 @@ - [alpa] extendetState: fix irrigatiopn time stuff + [alpha] extemdedState - fix state diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index 30d5216..5b70daa 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -757,12 +757,9 @@ sub WriteReadings { . $propertie->{name} . '_irrigation_left', sprintf("%.f" , - - Time::Piece::localtime->strptime( - RigReadingsValue( - $hash, - $decode_json->{abilities}[$abilities]{timestamp}), - "%Y-%m-%d %H:%M:%S") +($propertie->{value}{duration} + 3 ) - Time::Piece::localtime->new ) + Time::Piece::localtime->strptime( + $decode_json->{abilities}[$abilities]{timestamp}, "%Y-%m-%d %H:%M:%S") + + ($propertie->{value}{duration} + 3 ) - Time::Piece::localtime->new ) ) if ( defined( $propertie->{value} ) && $decode_json->{abilities}[$abilities]{name} eq 'watering' diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index eb9cc7f..f102af9 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_11:45:43 70331 FHEM/74_GardenaSmartDevice.pm +UPD 2022-06-23_12:08:11 70232 FHEM/74_GardenaSmartDevice.pm