change dumper output

This commit is contained in:
Marko Oldenburg 2019-01-09 13:14:06 +01:00
parent 117ebca8bc
commit 7bbf5f7f50
2 changed files with 12 additions and 1 deletions

View File

@ -365,6 +365,7 @@ sub Weather_WriteReadings($$) {
foreach my $r (keys %{$dataRef} ) {
readingsBulkUpdate($hash, $r, $dataRef->{$r}) if ($r ne 'status' and $r ne 'current' and $r ne 'forcast');
}
readingsBulkUpdate($hash, "validity", "up-to-date");

View File

@ -82,6 +82,16 @@ my %codes = (
521 => 35,
522 => 35,
531 => 35,
600 => 14,
601 => 16,
602 => 13,
611 => 46,
612 => 46,
615 => 35,
616 => 35,
620 => 35,
621 => 35,
622 => 35,
);
sub new {
@ -213,7 +223,7 @@ sub _ProcessingRetrieveData($$) {
'OpenWeatherMap Weather decode JSON err ' . $@ );
}
elsif ( defined( $data->{cod} ) and defined( $data->{message} ) ) {
print 'Dumper2: ' . Dumper $data;
# print 'Dumper2: ' . Dumper $data;
_ErrorHandling( $self, $data->{cod} . ': ' . $data->{message} );
}
else {