From ae1dac67137cbd7fb77a5b7b01050ea144f9a0e6 Mon Sep 17 00:00:00 2001 From: Ellert <> Date: Mon, 14 Apr 2025 20:37:09 +0000 Subject: [PATCH] 74_AutomowerConnect: reversed last change, fix another wrong API timestamp unit. git-svn-id: https://svn.fhem.de/fhem/trunk@29858 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/lib/FHEM/Devices/AMConnect/Common.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fhem/lib/FHEM/Devices/AMConnect/Common.pm b/fhem/lib/FHEM/Devices/AMConnect/Common.pm index 8bd49b601..88cffb841 100644 --- a/fhem/lib/FHEM/Devices/AMConnect/Common.pm +++ b/fhem/lib/FHEM/Devices/AMConnect/Common.pm @@ -2951,7 +2951,7 @@ sub listErrorStack { for ( my $i = 0; $i < @{ $hash->{helper}{endpoints}{messages}{attributes}{messages} }; $i++ ) { - $ret .= ' ' . FmtDateTime( $msg[$i]{time} ) . ' ' . $msg[$i]{severity} . ' - ' . $errortable->{ $msg[$i]{code} } . ' ' . ( defined $msg[$i]{longitude} ? $msg[$i]{longitude} : '-' ) . ' / ' . ( defined $msg[$i]{latitude} ? $msg[$i]{latitude} : '-' ) . ' '; + $ret .= ' ' . FmtDateTimeGMT( $msg[$i]{time} ) . ' ' . $msg[$i]{severity} . ' - ' . $errortable->{ $msg[$i]{code} } . ' ' . ( defined $msg[$i]{longitude} ? $msg[$i]{longitude} : '-' ) . ' / ' . ( defined $msg[$i]{latitude} ? $msg[$i]{latitude} : '-' ) . ' '; } @@ -3451,7 +3451,13 @@ sub wsRead { ## no critic (ProhibitExcessComplexity [complexity core maintenanc } - $hash->{helper}{mower}{attributes}{mower}{errorCodeTimestamp} = $result->{attributes}{mower}{errorCodeTimestamp} if ( defined $result->{attributes}{mower}{errorCodeTimestamp} ); + if ( defined $result->{attributes}{mower}{errorCodeTimestamp} ) { + + my $tmp = $result->{attributes}{mower}{errorCodeTimestamp}; + $hash->{helper}{mower}{attributes}{mower}{errorCodeTimestamp} = length( $tmp ) == 10 ? $tmp * 1000 : $tmp; + + } + $hash->{helper}{mower}{attributes}{mower}{isErrorConfirmable} = $result->{attributes}{mower}{isErrorConfirmable} if ( defined $result->{attributes}{mower}{isErrorConfirmable} ); if ( !$additional_polling ) {