mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
OpenWeatherMapAPI: add snow and rain in forecast, 59_Weather: fix double Reading value
git-svn-id: https://svn.fhem.de/fhem/trunk@18267 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b18414aade
commit
147112d1e7
@ -1,5 +1,7 @@
|
|||||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||||
# Do not insert empty lines here, update check depends on it.
|
# Do not insert empty lines here, update check depends on it.
|
||||||
|
- bugfix: 59_Weather: fix reading double value
|
||||||
|
- feature: OpenWeatherMapAPI: add snow and rain in forecast
|
||||||
- new: 98_todoist: initial release
|
- new: 98_todoist: initial release
|
||||||
- change: 49_SSCam: generate event of every LastSnapFilename,LastSnapId,
|
- change: 49_SSCam: generate event of every LastSnapFilename,LastSnapId,
|
||||||
LastSnapTime if snap was called with arguments,
|
LastSnapTime if snap was called with arguments,
|
||||||
|
@ -206,9 +206,6 @@ sub Weather_WriteReadings($$) {
|
|||||||
readingsBulkUpdate($hash, '.license', $dataRef->{license}->{text});
|
readingsBulkUpdate($hash, '.license', $dataRef->{license}->{text});
|
||||||
}
|
}
|
||||||
|
|
||||||
readingsBulkUpdate($hash, "validity", "up-to-date");
|
|
||||||
|
|
||||||
|
|
||||||
### current
|
### current
|
||||||
if ( defined($dataRef->{current}) and ref( $dataRef->{current} ) eq 'HASH' ) {
|
if ( defined($dataRef->{current}) and ref( $dataRef->{current} ) eq 'HASH' ) {
|
||||||
while( my ($r,$v) = each %{$dataRef->{current}} ) {
|
while( my ($r,$v) = each %{$dataRef->{current}} ) {
|
||||||
|
@ -259,7 +259,8 @@ sub _ProcessingRetrieveData($$) {
|
|||||||
_ErrorHandling( $self, $data->{cod} . ': ' . $data->{message} );
|
_ErrorHandling( $self, $data->{cod} . ': ' . $data->{message} );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
### Debug
|
||||||
|
# print 'Response: ' . Dumper $data;
|
||||||
###### Ab hier wird die ResponseHash Referenze für die Rückgabe zusammen gestellt
|
###### Ab hier wird die ResponseHash Referenze für die Rückgabe zusammen gestellt
|
||||||
$self->{cached}->{current_date_time} =
|
$self->{cached}->{current_date_time} =
|
||||||
strftime( "%a, %e %b %Y %H:%M",
|
strftime( "%a, %e %b %Y %H:%M",
|
||||||
@ -430,6 +431,14 @@ sub _ProcessingRetrieveData($$) {
|
|||||||
->{id} },
|
->{id} },
|
||||||
'iconAPI' =>
|
'iconAPI' =>
|
||||||
$data->{list}->[$i]->{weather}->[0]->{icon},
|
$data->{list}->[$i]->{weather}->[0]->{icon},
|
||||||
|
'rain1h' =>
|
||||||
|
$data->{list}->[$i]->{rain}->{'1h'},
|
||||||
|
'rain3h' =>
|
||||||
|
$data->{list}->[$i]->{rain}->{'3h'},
|
||||||
|
'snow1h' =>
|
||||||
|
$data->{list}->[$i]->{snow}->{'1h'},
|
||||||
|
'snow3h' =>
|
||||||
|
$data->{list}->[$i]->{snow}->{'3h'},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user