fix: apply patch from stefanru

https://forum.fhem.de/index.php?msg=1332884

[Ticket: no]
This commit is contained in:
2025-02-04 20:52:52 +01:00
parent 6a38b446a9
commit 478c4a3159
3 changed files with 40 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@@ -434,8 +434,13 @@ sub _Writereadings {
&& ref( $dataRef->{$r} ) ne 'ARRAY' );
}
::readingsBulkUpdate( $hash, 'icon',
$iconlist[ $dataRef->{current}->{code} ] );
if ( defined( $dataRef->{current}->{code} )
&& $dataRef->{current}->{code} )
{
::readingsBulkUpdate( $hash, 'icon',
$iconlist[ $dataRef->{current}->{code} ] );
}
if ( defined( $dataRef->{current}->{wind_direction} )
&& $dataRef->{current}->{wind_direction}
&& defined( $dataRef->{current}->{wind_speed} )