[fix] Garbage at end of string in strptime
This commit is contained in:
parent
0c75c89cf0
commit
97540ef9c4
2
CHANGED
2
CHANGED
@ -1 +1 @@
|
|||||||
[fix] - schedules events
|
[enhancement] - scheudiles handling wc,ic24,pump, next schedule, permanenlty cloesd
|
||||||
|
@ -923,7 +923,7 @@ sub setState {
|
|||||||
|| AttrVal( $name, 'model', 'unknown' ) eq 'watering_computer'
|
|| AttrVal( $name, 'model', 'unknown' ) eq 'watering_computer'
|
||||||
|| AttrVal( $name, 'model', 'unknown' ) eq 'electronic_water_pump' ){
|
|| AttrVal( $name, 'model', 'unknown' ) eq 'electronic_water_pump' ){
|
||||||
my @opened_valves;
|
my @opened_valves;
|
||||||
my $state_string = ''; my $nearst_irrigation = '2999-12-12 23:59';
|
my $state_string = ''; my $nearst_irrigation = '2999-12-12 12:00';
|
||||||
my $has_schedule = 0; my $longest_duration = 0; my $processed_item = '';
|
my $has_schedule = 0; my $longest_duration = 0; my $processed_item = '';
|
||||||
my @valves_connected = AttrVal( $name, 'model', 'unknown' ) eq 'ic24' ? split(',', ReadingsVal( $name, 'ic24-valves_connected', '')) : '1';
|
my @valves_connected = AttrVal( $name, 'model', 'unknown' ) eq 'ic24' ? split(',', ReadingsVal( $name, 'ic24-valves_connected', '')) : '1';
|
||||||
|
|
||||||
@ -947,12 +947,13 @@ sub setState {
|
|||||||
# $nearst_irrigation = RigReadingsValue($hash, ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_, ''))
|
# $nearst_irrigation = RigReadingsValue($hash, ReadingsVal($name, 'scheduling-schedules_paused_until_'.$_, ''))
|
||||||
if ( ReadingsVal($name, 'scheduling-scheduled_watering_next_start', '') eq RigReadingsValue( $hash, 'n/a') ) { # non next start, schedules paused permanently or next schedule > 1 year; get nearst paused_until
|
if ( ReadingsVal($name, 'scheduling-scheduled_watering_next_start', '') eq RigReadingsValue( $hash, 'n/a') ) { # non next start, schedules paused permanently or next schedule > 1 year; get nearst paused_until
|
||||||
Log3 $name, 3, "[DEBUG] - next_start: empty ";
|
Log3 $name, 3, "[DEBUG] - next_start: empty ";
|
||||||
|
Log3 $name, 3, "[DEBUG] - empty pro item ".Time::Piece->strptime( $processed_item, "%Y-%m-%d %H:%M:%S");
|
||||||
|
Log3 $name, 3, "[DEBUG] - empty nearst ".Time::Piece->strptime( $nearst_irrigation, "%Y-%m-%d %H:%M:%S");
|
||||||
$nearst_irrigation = $processed_item
|
$nearst_irrigation = $processed_item
|
||||||
if ( Time::Piece->strptime( $processed_item, "%Y-%m-%d %H:%M")
|
if ( Time::Piece->strptime( $processed_item, "%Y-%m-%d %H:%M:%S")
|
||||||
< Time::Piece->strptime( $nearst_irrigation, "%Y-%m-%d %H:%M")
|
< Time::Piece->strptime( $nearst_irrigation, "%Y-%m-%d %H:%M:%S")
|
||||||
&& $has_schedule
|
&& $has_schedule
|
||||||
&& Time::Piece->strptime( $processed_item, "%Y-%m-%d %H:%M")
|
&& Time::Piece->strptime( $processed_item, "%Y-%m-%d %H:%M:%S")
|
||||||
> Time::Piece->new
|
> Time::Piece->new
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
UPD 2022-07-01_16:13:02 49241 FHEM/73_GardenaSmartBridge.pm
|
UPD 2022-07-01_16:13:02 49241 FHEM/73_GardenaSmartBridge.pm
|
||||||
UPD 2022-07-08_15:22:30 75674 FHEM/74_GardenaSmartDevice.pm
|
UPD 2022-07-08_15:37:45 75905 FHEM/74_GardenaSmartDevice.pm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user