change hashRef for parameter from cachemaxage to apioptions
This commit is contained in:
parent
5b95ea31e4
commit
1a9d7ad760
@ -596,7 +596,7 @@ sub Weather_Define($$) {
|
|||||||
Weather_LanguageInitialize($hash->{LANG});
|
Weather_LanguageInitialize($hash->{LANG});
|
||||||
|
|
||||||
my $apistring = $api . '::Weather';
|
my $apistring = $api . '::Weather';
|
||||||
$hash->{fhem}->{api} = $apistring->new( { devName => $hash->{NAME}, apikey => $hash->{APIKEY}, location => $hash->{LOCATION}, cachemaxage => 600, language => $hash->{LANG} } );
|
$hash->{fhem}->{api} = $apistring->new( { devName => $hash->{NAME}, apikey => $hash->{APIKEY}, location => $hash->{LOCATION}, apioptions => $hash->{APIOPTIONS}, language => $hash->{LANG} } );
|
||||||
|
|
||||||
Weather_GetUpdate($hash) if($init_done);
|
Weather_GetUpdate($hash) if($init_done);
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ sub new {
|
|||||||
my $self = {
|
my $self = {
|
||||||
devName => $argsRef->{devName},
|
devName => $argsRef->{devName},
|
||||||
key => ( defined( $argsRef->{apikey} ) ? $argsRef->{apikey} : 'none' ),
|
key => ( defined( $argsRef->{apikey} ) ? $argsRef->{apikey} : 'none' ),
|
||||||
cachemaxage => $argsRef->{cachemaxage},
|
cachemaxage => ( (split(':',$argsRef->{apioptions}))[0] eq 'cachemaxage' ? (split(':',$argsRef->{apioptions}))[1] : 900 ),
|
||||||
lang => $argsRef->{language},
|
lang => $argsRef->{language},
|
||||||
lat => ( split( ',', $argsRef->{location} ) )[0],
|
lat => ( split( ',', $argsRef->{location} ) )[0],
|
||||||
long => ( split( ',', $argsRef->{location} ) )[1],
|
long => ( split( ',', $argsRef->{location} ) )[1],
|
||||||
|
File diff suppressed because one or more lines are too long
@ -116,7 +116,7 @@ sub new {
|
|||||||
my $self = {
|
my $self = {
|
||||||
devName => $argsRef->{devName},
|
devName => $argsRef->{devName},
|
||||||
key => ( defined( $argsRef->{apikey} ) ? $argsRef->{apikey} : 'none' ),
|
key => ( defined( $argsRef->{apikey} ) ? $argsRef->{apikey} : 'none' ),
|
||||||
cachemaxage => $argsRef->{cachemaxage},
|
cachemaxage => ( (split(':',$argsRef->{apioptions}))[0] eq 'cachemaxage' ? (split(':',$argsRef->{apioptions}))[1] : 900 ),
|
||||||
lang => $argsRef->{language},
|
lang => $argsRef->{language},
|
||||||
lat => ( split( ',', $argsRef->{location} ) )[0],
|
lat => ( split( ',', $argsRef->{location} ) )[0],
|
||||||
long => ( split( ',', $argsRef->{location} ) )[1],
|
long => ( split( ',', $argsRef->{location} ) )[1],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user