full api support weather and onecall

This commit is contained in:
2022-11-25 14:09:45 +01:00
parent ee989a84bf
commit fdd6f0964a
2 changed files with 32 additions and 17 deletions

View File

@ -361,18 +361,6 @@ sub Weather_WriteReadings {
readingsBeginUpdate($hash);
# delete some unused readings
delete( $hash->{READINGS}->{temp_f} )
if ( defined( $hash->{READINGS}->{temp_f} ) );
delete( $hash->{READINGS}->{unit_distance} )
if ( defined( $hash->{READINGS}->{unit_distance} ) );
delete( $hash->{READINGS}->{unit_speed} )
if ( defined( $hash->{READINGS}->{unit_speed} ) );
delete( $hash->{READINGS}->{unit_pressuree} )
if ( defined( $hash->{READINGS}->{unit_pressuree} ) );
delete( $hash->{READINGS}->{unit_temperature} )
if ( defined( $hash->{READINGS}->{unit_temperature} ) );
# housekeeping information
readingsBulkUpdate( $hash, 'lastError', '' );
foreach my $r ( keys %{$dataRef} ) {