[alpha] - extendetState - irrigation stuff
This commit is contained in:
parent
97f55e6122
commit
d3020ded2c
@ -757,29 +757,29 @@ sub WriteReadings {
|
|||||||
. $propertie->{name}
|
. $propertie->{name}
|
||||||
. '_irrigation_left',
|
. '_irrigation_left',
|
||||||
sprintf("%.f" ,
|
sprintf("%.f" ,
|
||||||
Time::Piece::localtime->strptime(
|
(Time::Piece::localtime->strptime(
|
||||||
RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S")
|
RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S")
|
||||||
+ ($propertie->{value}{duration} - 3 ) - Time::Piece::localtime->new )
|
+ ($propertie->{value}{duration} + 3 ) - Time::Piece::localtime->new) / 60 )
|
||||||
)
|
)
|
||||||
if ( defined( $propertie->{value} )
|
if ( defined( $propertie->{value} )
|
||||||
&& $decode_json->{abilities}[$abilities]{name} eq 'watering'
|
&& $decode_json->{abilities}[$abilities]{name} eq 'watering'
|
||||||
&& $propertie->{value}{duration} > 0 );
|
&& $propertie->{value}{duration} > 0 );
|
||||||
|
|
||||||
if ( defined( $propertie->{value} )
|
# if ( defined( $propertie->{value} )
|
||||||
&& $decode_json->{abilities}[$abilities]{name} eq 'watering'
|
# && $decode_json->{abilities}[$abilities]{name} eq 'watering'
|
||||||
&& $propertie->{value}{duration} > 0 ){
|
# && $propertie->{value}{duration} > 0 ){
|
||||||
Log3 $name, 2, "[DDebug] " . Time::Piece::localtime->strptime(
|
# Log3 $name, 2, "[DDebug] " . Time::Piece::localtime->strptime(
|
||||||
RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S");
|
# RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S");
|
||||||
my $dt = Time::Piece::localtime->strptime( RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S");
|
# my $dt = Time::Piece::localtime->strptime( RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S");
|
||||||
Log3 $name, 2, "[DEBUG] $dt";
|
# Log3 $name, 2, "[DEBUG] $dt";
|
||||||
my $ndt = Time::Piece::localtime->new;
|
# my $ndt = Time::Piece::localtime->new;
|
||||||
Log3 $name, 2, "[cDEBUG] $ndt";
|
# Log3 $name, 2, "[cDEBUG] $ndt";
|
||||||
Log3 $name, 2, "[aDEBUG] " . ($propertie->{value}{duration} + 3 );
|
# Log3 $name, 2, "[aDEBUG] " . ($propertie->{value}{duration} + 3 );
|
||||||
Log3 $name, 2, "[sDEBUG] " . sprintf("%.f" ,
|
# Log3 $name, 2, "[sDEBUG] " . sprintf("%.f" ,
|
||||||
Time::Piece::localtime->strptime(
|
# Time::Piece::localtime->strptime(
|
||||||
RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S")
|
# RigReadingsValue($hash, $propertie->{timestamp}), "%Y-%m-%d %H:%M:%S")
|
||||||
+ ($propertie->{value}{duration} - 6 ) - Time::Piece::localtime->new );
|
# + ($propertie->{value}{duration} + 3 ) - Time::Piece::localtime->new );
|
||||||
}
|
# }
|
||||||
#2022-06-21T08:56:42.488Z -> 2022-06-21 08:56:48
|
#2022-06-21T08:56:42.488Z -> 2022-06-21 08:56:48
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
UPD 2022-06-21_08:17:57 49520 FHEM/73_GardenaSmartBridge.pm
|
UPD 2022-06-21_08:17:57 49520 FHEM/73_GardenaSmartBridge.pm
|
||||||
UPD 2022-06-23_12:41:15 71382 FHEM/74_GardenaSmartDevice.pm
|
UPD 2022-06-23_12:44:35 71419 FHEM/74_GardenaSmartDevice.pm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user