74_AutomowerConnect: fix warning for misspelled JSON element name 'headlight' in websocket events.

git-svn-id: https://svn.fhem.de/fhem/trunk@29847 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Ellert 2025-04-12 15:32:47 +00:00
parent 903ba003ed
commit b52621b538

View File

@ -3496,7 +3496,8 @@ sub wsRead { ## no critic (ProhibitExcessComplexity [complexity core maintenanc
# headlights-event-v2
elsif ( $result->{type} =~ /^hea/ ) { #no headlights event 430x
$hash->{helper}{mower}{attributes}{settings}{headlight}{mode} = $result->{attributes}{headlight}{mode};
$hash->{helper}{mower}{attributes}{settings}{headlight}{mode} = $result->{attributes}{headlights}{mode} if ( defined $result->{attributes}{headlights} );
$hash->{helper}{mower}{attributes}{settings}{headlight}{mode} = $result->{attributes}{headlight}{mode} if ( defined $result->{attributes}{headlight} );
}