From 2cbe907db49838ad35914befd7eb3154975eb545 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 24 Jun 2022 18:40:46 +0200 Subject: [PATCH] [alpha] - extendedstate: state fix if empty or not exists --- CHANGED | 2 +- FHEM/74_GardenaSmartDevice.pm | 2 +- controls_GardenaSmartDevice.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGED b/CHANGED index 4b333b6..d6a2914 100644 --- a/CHANGED +++ b/CHANGED @@ -1 +1 @@ - [ALPHA] extendetState - permanentyl paused + [fix] - ix state diff --git a/FHEM/74_GardenaSmartDevice.pm b/FHEM/74_GardenaSmartDevice.pm index 2c4dd16..cd677d1 100644 --- a/FHEM/74_GardenaSmartDevice.pm +++ b/FHEM/74_GardenaSmartDevice.pm @@ -893,7 +893,7 @@ sub setState { push @ic24opened_ventils, $_ if ( ( ( ReadingsVal( $name, "watering-watering_timer_".$_."_duration", 0 ) =~ m{\A[1-9]([0-9]+)?\z}xms ) ? $_ : 0 ) > 0 ); ## find nearst timestamp #$has_scheduling = 1 if ( ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_ , '') ne '2038-01-18T00:00:00.000Z' && ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_ , '') eq '' ); - $has_scheduling = 1 if ( ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_ , '') eq '' ); + $has_scheduling = 1 if ( ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_ , 'N/A') eq '' ); $longest_duration = ReadingsVal( $name, "watering-watering_timer_".$_."_irrigation_left", 0 ) if ( ( ReadingsVal( $name, "watering-watering_timer_".$_."_duration", 0 ) =~ m{\A[1-9]([0-9]+)?\z}xms && ReadingsVal( $name, "watering-watering_timer_".$_."_duration", 0 ) > 0 diff --git a/controls_GardenaSmartDevice.txt b/controls_GardenaSmartDevice.txt index 38c234a..631e12e 100644 --- a/controls_GardenaSmartDevice.txt +++ b/controls_GardenaSmartDevice.txt @@ -1,2 +1,2 @@ UPD 2022-06-24_13:45:33 49520 FHEM/73_GardenaSmartBridge.pm -UPD 2022-06-24_13:56:39 69561 FHEM/74_GardenaSmartDevice.pm +UPD 2022-06-24_18:40:19 69564 FHEM/74_GardenaSmartDevice.pm