74_AutomowerConnect: Common.pm fixed bug in WS filter

git-svn-id: https://svn.fhem.de/fhem/trunk@27717 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Ellert
2023-06-30 15:19:30 +00:00
parent daa71d6510
commit bac3630e98
2 changed files with 3 additions and 3 deletions

View File

@@ -2527,15 +2527,14 @@ sub wsRead {
}
if ( defined( $result->{type} && $result->{id} eq $hash->{helper}{mower_id} ) ) {
if ( defined( $result->{type} ) && $result->{id} eq $hash->{helper}{mower_id} ) {
Log3 $name, 4, "$iam selected websocket data: >$buf<";
$hash->{helper}{wsResult}{$result->{type}} = dclone( $result );
$hash->{helper}{wsResult}{type} = $result->{type};
if ( $result->{type} eq "status-event" ) {
Log3 $name, 4, "$iam select websocket data for \$result->{id} $result->{id}, \$hash->{helper}{mower_id} $hash->{helper}{mower_id}, battery $result->{attributes}{battery}{batteryPercent}";
$hash->{helper}{statusTime} = gettimeofday();
$hash->{helper}{mowerold}{attributes}{metadata}{statusTimestamp} = $hash->{helper}{mower}{attributes}{metadata}{statusTimestamp};
$hash->{helper}{mowerold}{attributes}{mower}{activity} = $hash->{helper}{mower}{attributes}{mower}{activity};