From 6d684ade924a3962ec62bf86cbedbfc8c79e56db Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 30 Jun 2022 13:09:32 +0200 Subject: [PATCH] [fix] time piece --- CHANGED | 2 +- FHEM/74_GardenaSmartDevice.pm | 6 +++--- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGED b/CHANGED index b855594..ec3b7c3 100644 --- a/CHANGED +++ b/CHANGED @@ -1 +1 @@ - [fix] - state ohne plan , nicht listen + [fix] - timer paused >1 jahr diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index dedd42a..8e69f63 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -903,10 +903,10 @@ sub setState { # if ( ReadingsVal($name, 'scheduling-scheduled_watering_next_start_'.$_, '') ne '' if ( ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_ , '') ne '2038-01-18T00:00:00.000Z' ) { # $nearst_irrigation = ReadingsVal($name, 'scheduling-scheduled_watering_next_start', ''); - $nearst_irrigation = ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_, '') + $nearst_irrigation = RigReadingsValue($hash, ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_, '')) if ( - Time::Piece->strptime( ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_, ''), "%Y-%m-%d %H:%M") < Time::Piece->strptime( $nearst_irrigation, "%Y-%m-%d %H:%M") - && $has_scheduling && Time::Piece->strptime( ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_, ''), "%Y-%m-%d %H:%M") > Time::Piece->new + Time::Piece->strptime( RigReadingsValue($hash, ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_, '')), "%Y-%m-%d %H:%M") < Time::Piece->strptime( $nearst_irrigation, "%Y-%m-%d %H:%M") + && $has_scheduling && Time::Piece->strptime( RigReadingsValue($has, ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_, '')), "%Y-%m-%d %H:%M") > Time::Piece->new ) } # fi diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index b7deb9a..2a52add 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ UPD 2022-06-29_20:41:04 49241 FHEM/73_GardenaSmartBridge.pm -UPD 2022-06-30_11:36:45 70541 FHEM/74_GardenaSmartDevice.pm +UPD 2022-06-30_13:09:23 70614 FHEM/74_GardenaSmartDevice.pm