testing #29
@ -2,7 +2,7 @@
|
||||
##############################################################################
|
||||
#
|
||||
# 59_Weather.pm
|
||||
# Copyright by Dr. Boris Neubert
|
||||
# (c) 2009-2023 Copyright by Dr. Boris Neubert
|
||||
# e-mail: omega at online dot de
|
||||
#
|
||||
# Contributors:
|
||||
@ -1098,7 +1098,8 @@ sub Weather_CheckOptions {
|
||||
$f =~ tr/dh/./cd if ( defined $f && $f );
|
||||
$items =~ tr/0-9/./cd if ( defined($items) && $items );
|
||||
|
||||
$items = 6 if ( !$items );
|
||||
$items = AttrVal( $d, 'forecastLimit', 6 )
|
||||
if ( !$items );
|
||||
|
||||
my $forecastConfig = Weather_ForcastConfig($hash);
|
||||
$f = (
|
||||
@ -1532,15 +1533,15 @@ sub Weather_CheckOptions {
|
||||
],
|
||||
"release_status": "stable",
|
||||
"license": "GPL_2",
|
||||
"version": "v2.2.5",
|
||||
"version": "v2.2.6",
|
||||
"author": [
|
||||
"Marko Oldenburg <leongaultier@gmail.com>"
|
||||
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
|
||||
],
|
||||
"x_fhem_maintainer": [
|
||||
"CoolTux"
|
||||
],
|
||||
"x_fhem_maintainer_github": [
|
||||
"LeonGaultier"
|
||||
"CoolTuxNet"
|
||||
],
|
||||
"prereqs": {
|
||||
"runtime": {
|
||||
|
@ -1,9 +1,9 @@
|
||||
# $Id: $
|
||||
###############################################################################
|
||||
#
|
||||
# Developed with Kate
|
||||
# Developed with VSCodium and richterger perl plugin
|
||||
#
|
||||
# (c) 2019 Copyright: Marko Oldenburg (leongaultier at gmail dot com)
|
||||
# (c) 2019-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||
# All rights reserved
|
||||
#
|
||||
# Special thanks goes to:
|
||||
@ -164,7 +164,8 @@ sub new {
|
||||
$self->{cachemaxage} = (
|
||||
defined( $apioptions->{cachemaxage} )
|
||||
? $apioptions->{cachemaxage}
|
||||
: 900 );
|
||||
: 900
|
||||
);
|
||||
$self->{extend} =
|
||||
( defined( $apioptions->{extend} ) ? $apioptions->{extend} : 'none' );
|
||||
$self->{cached} = _CreateForecastRef($self);
|
||||
@ -222,7 +223,7 @@ sub setRetrieveData {
|
||||
}
|
||||
|
||||
sub setLocation {
|
||||
my ($self,$lat,$long) = @_;
|
||||
my ( $self, $lat, $long ) = @_;
|
||||
|
||||
$self->{lat} = $lat;
|
||||
$self->{long} = $long;
|
||||
@ -248,8 +249,7 @@ sub _RetrieveDataFromDarkSky($) {
|
||||
# retrieve data from cache
|
||||
if ( ( time() - $self->{fetchTime} ) < $self->{cachemaxage}
|
||||
and $self->{cached}->{lat} == $self->{lat}
|
||||
and $self->{cached}->{long} == $self->{long}
|
||||
)
|
||||
and $self->{cached}->{long} == $self->{long} )
|
||||
{
|
||||
return _CallWeatherCallbackFn($self);
|
||||
}
|
||||
@ -486,8 +486,8 @@ sub _ProcessingRetrieveData($$) {
|
||||
->{apparentTemperatureHighTime}
|
||||
)
|
||||
),
|
||||
'code' =>
|
||||
$codes{ $data->{daily}->{data}->[$i]->{icon}
|
||||
'code' => $codes{
|
||||
$data->{daily}->{data}->[$i]->{icon}
|
||||
},
|
||||
'iconAPI' =>
|
||||
$data->{daily}->{data}->[$i]->{icon},
|
||||
@ -662,9 +662,9 @@ sub _ProcessingRetrieveData($$) {
|
||||
'temperature' => sprintf( "%.1f",
|
||||
$data->{hourly}->{data}->[$i]
|
||||
->{temperature} ),
|
||||
'code' =>
|
||||
$codes{ $data->{hourly}->{data}->[$i]
|
||||
->{icon} },
|
||||
'code' => $codes{
|
||||
$data->{hourly}->{data}->[$i]->{icon}
|
||||
},
|
||||
'iconAPI' =>
|
||||
$data->{hourly}->{data}->[$i]->{icon},
|
||||
'condition' => encode_utf8(
|
||||
@ -790,7 +790,7 @@ sub _CreateForecastRef($) {
|
||||
long => $self->{long},
|
||||
apiMaintainer =>
|
||||
'Marko Oldenburg (<a href=https://forum.fhem.de/index.php?action=profile;u=13684>CoolTux</a>)',
|
||||
apiVersion => version->parse(DarkSkyAPI->VERSION())->normal,
|
||||
apiVersion => version->parse( DarkSkyAPI->VERSION() )->normal,
|
||||
}
|
||||
);
|
||||
|
||||
@ -820,7 +820,6 @@ sub strftimeWrapper(@) {
|
||||
|
||||
1;
|
||||
|
||||
|
||||
=pod
|
||||
|
||||
=encoding utf8
|
||||
@ -833,15 +832,15 @@ sub strftimeWrapper(@) {
|
||||
"abstract": "Wetter API für Weather DarkSky"
|
||||
}
|
||||
},
|
||||
"version": "v1.0.0",
|
||||
"version": "v1.2.0",
|
||||
"author": [
|
||||
"Marko Oldenburg <leongaultier@gmail.com>"
|
||||
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
|
||||
],
|
||||
"x_fhem_maintainer": [
|
||||
"CoolTux"
|
||||
],
|
||||
"x_fhem_maintainer_github": [
|
||||
"LeonGaultier"
|
||||
"CoolTuxNet"
|
||||
],
|
||||
"prereqs": {
|
||||
"runtime": {
|
||||
|
@ -1,9 +1,9 @@
|
||||
# $Id: $
|
||||
###############################################################################
|
||||
#
|
||||
# Developed with VSCodium and richterger perl plugin.
|
||||
# Developed with VSCodium and richterger perl plugin
|
||||
#
|
||||
# (c) 2019-2022 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||
# (c) 2019-2023 Copyright: Marko Oldenburg (fhemdevelopment at cooltux dot net)
|
||||
# All rights reserved
|
||||
#
|
||||
# Special thanks goes to:
|
||||
@ -182,7 +182,9 @@ my %codes = (
|
||||
|
||||
sub new {
|
||||
### geliefert wird ein Hash
|
||||
my ( $class, $argsRef ) = @_;
|
||||
my $class = shift;
|
||||
my $argsRef = shift;
|
||||
|
||||
my $apioptions = _parseApiOptions( $argsRef->{apioptions} );
|
||||
|
||||
my $self = {
|
||||
@ -923,7 +925,7 @@ sub strftimeWrapper {
|
||||
"abstract": "Wetter API für OpenWeatherMap"
|
||||
}
|
||||
},
|
||||
"version": "v3.0.1",
|
||||
"version": "v3.0.2",
|
||||
"author": [
|
||||
"Marko Oldenburg <fhemdevelopment@cooltux.net>"
|
||||
],
|
||||
@ -931,7 +933,7 @@ sub strftimeWrapper {
|
||||
"CoolTux"
|
||||
],
|
||||
"x_fhem_maintainer_github": [
|
||||
"LeonGaultier"
|
||||
"CoolTuxNet"
|
||||
],
|
||||
"prereqs": {
|
||||
"runtime": {
|
||||
|
@ -747,7 +747,7 @@ sub strftimeWrapper(@) {
|
||||
"abstract": "Wetter API für Weather Underground"
|
||||
}
|
||||
},
|
||||
"version": "v1.0.1",
|
||||
"version": "v1.0.2",
|
||||
"author": [
|
||||
"Julian Pawlowski <julian.pawlowski@gmail.com>"
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user