[alpa] extendetState: fix irrigatiopn time stuff

This commit is contained in:
Sebastian 2022-06-23 11:37:04 +02:00
parent ab2e990ffb
commit bbf9919ad3
3 changed files with 9 additions and 6 deletions

View File

@ -1 +1 @@
scheduling if event != ''
[alpha] - extendedState - fix next irrigation and irregation left time

View File

@ -756,10 +756,13 @@ sub WriteReadings {
$decode_json->{abilities}[$abilities]{name} . '-'
. $propertie->{name}
. '_irrigation_left',
sprintf("%.f" ,(RigReadingsValue(
$hash,
$decode_json->{abilities}[$abilities]{timestamp}
"%Y-%m-%d %H:%M:%S")+($propertie->{value}{duration} + 3 )) - Time::Piece::localtime->new )
sprintf("%.f" ,
Time::Piece::localtime->strptime(
RigReadingsValue(
$hash,
$decode_json->{abilities}[$abilities]{timestamp}),
"%Y-%m-%d %H:%M:%S") +($propertie->{value}{duration} + 3 ) - Time::Piece::localtime->new )
)
if ( defined( $propertie->{value} )
&& $decode_json->{abilities}[$abilities]{name} eq 'watering'

View File

@ -1,2 +1,2 @@
UPD 2022-06-21_08:17:57 49520 FHEM/73_GardenaSmartBridge.pm
UPD 2022-06-23_11:30:43 70219 FHEM/74_GardenaSmartDevice.pm
UPD 2022-06-23_11:36:38 70324 FHEM/74_GardenaSmartDevice.pm