patch_ic24 #69
@@ -878,7 +878,7 @@ sub setState {
 | 
			
		||||
        ## add to opened ventils, if watering active
 | 
			
		||||
        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_'.$_ , '') ne '' );
 | 
			
		||||
        $has_scheduling = 1 if ( ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_ , '')  ne '2038-01-18T00:00:00.000Z' && ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_ , '') eq '' );
 | 
			
		||||
        $longest_duration = ReadingsVal( $name, "watering-watering_timer_".$_."_duration", 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 
 | 
			
		||||
@@ -911,7 +911,7 @@ sub setState {
 | 
			
		||||
            ' )
 | 
			
		||||
            if ( AttrVal( $name, 'stateFormat', 'none' ) eq 'none' );
 | 
			
		||||
      } else {
 | 
			
		||||
        Log3 $name, 3, "[DEBUG] - Offene Ventile :".scalar(@ic24opened_ventils)." laengste bewaesserung: $longest_duration . hat Zeitplan: ". ($has_scheduling) ? "ja":"nein" . "Naechster Zeitplan: $nearst_irrigation";
 | 
			
		||||
        Log3 $name, 3, "[DEBUG] - Offene Ventile :".scalar(@ic24opened_ventils)." laengste bewaesserung: $longest_duration . hat Zeitplan: $has_scheduling Naechster Zeitplan: $nearst_irrigation";
 | 
			
		||||
        $state_string = scalar(@ic24opened_ventils) > 0
 | 
			
		||||
          # offen
 | 
			
		||||
          ? sprintf( (RigReadingsValue($hash, 'will be irrigated %.f minutes remaining.')), $longest_duration/60) 
 | 
			
		||||
 
 | 
			
		||||
@@ -1,2 +1,2 @@
 | 
			
		||||
UPD 2022-05-28_13:13:38 49520 FHEM/73_GardenaSmartBridge.pm
 | 
			
		||||
UPD 2022-06-14_10:21:06 68243 FHEM/74_GardenaSmartDevice.pm
 | 
			
		||||
UPD 2022-06-16_15:46:05 68221 FHEM/74_GardenaSmartDevice.pm
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user