2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 04:36:36 +00:00

74_Unifi: Can't use an undefined value as an ARRAY reference at ./FHEM/74_Unifi.pm line 847., Forum #40287

git-svn-id: https://svn.fhem.de/fhem/trunk@13910 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rapster 2017-04-06 07:34:29 +00:00
parent 505d8662c1
commit 9d9cb0481f

View File

@ -843,8 +843,8 @@ sub Unifi_SetHealthReadings($) {
readingsBulkUpdate($hash,'-UC_wlan_users',$hash->{wlan_health}->{num_user});
readingsBulkUpdate($hash,'-UC_wlan_accesspoints',$hash->{wlan_health}->{num_ap});
readingsBulkUpdate($hash,'-UC_wlan_guests',$hash->{wlan_health}->{num_guest});
readingsBulkUpdate($hash,'-UC_unarchived_alerts',scalar @{$hash->{alerts_unarchived}});
readingsBulkUpdate($hash,'-UC_events',scalar(@{$hash->{events}}).' (last '.$hash->{unifi}->{eventPeriod}.'h)');
readingsBulkUpdate($hash,'-UC_unarchived_alerts',scalar @{$hash->{alerts_unarchived}}) if(ref($hash->{alerts_unarchived}) eq 'ARRAY');
readingsBulkUpdate($hash,'-UC_events',scalar(@{$hash->{events}}).' (last '.$hash->{unifi}->{eventPeriod}.'h)') if(ref($hash->{events}) eq 'ARRAY');
return undef;
}