change data handle for callBackFn - wichtig alle Module Updaten
This commit is contained in:
parent
49a292cc50
commit
117ebca8bc
@ -336,8 +336,8 @@ sub Weather_ReturnWithError($$) {
|
||||
|
||||
sub Weather_RetrieveCallbackFn($) {
|
||||
|
||||
my $hash = shift;
|
||||
my $name = $hash->{NAME};
|
||||
my $name = shift;
|
||||
my $hash = $defs{$name};
|
||||
my $responseRef = $hash->{fhem}{api}->getWeather;
|
||||
|
||||
if ( $responseRef->{status} eq 'ok' ) {
|
||||
@ -602,8 +602,7 @@ sub Weather_Define($$) {
|
||||
Weather_LanguageInitialize($hash->{LANG});
|
||||
|
||||
my $apistring = $api . '::Weather';
|
||||
# $hash->{fhem}{api} = $api . '::Weather'->new( { hash => $hash, apikey => $hash->{APIKEY}, location => $hash->{LOCATION}, cachemaxage => 600, language => $hash->{LANG} } );
|
||||
$hash->{fhem}{api} = $apistring->new( { hash => $hash, 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}, cachemaxage => 600, language => $hash->{LANG} } );
|
||||
|
||||
Weather_GetUpdate($hash) if($init_done);
|
||||
|
||||
|
@ -66,7 +66,7 @@ sub new {
|
||||
my ( $class, $argsRef ) = @_;
|
||||
|
||||
my $self = {
|
||||
devHash => $argsRef->{hash},
|
||||
devName => $argsRef->{devName},
|
||||
key => ( defined( $argsRef->{apikey} ) ? $argsRef->{apikey} : 'none' ),
|
||||
cachemaxage => $argsRef->{cachemaxage},
|
||||
lang => $argsRef->{language},
|
||||
@ -437,7 +437,7 @@ sub _CallWeatherCallbackFn($) {
|
||||
my $self = shift;
|
||||
|
||||
# ## Aufruf der callbackFn
|
||||
main::Weather_RetrieveCallbackFn( $self->{devHash} );
|
||||
main::Weather_RetrieveCallbackFn( $self->{devName} );
|
||||
}
|
||||
|
||||
sub _ErrorHandling($$) {
|
||||
|
@ -89,7 +89,7 @@ sub new {
|
||||
my ( $class, $argsRef ) = @_;
|
||||
|
||||
my $self = {
|
||||
devHash => $argsRef->{hash},
|
||||
devName => $argsRef->{devName},
|
||||
key => ( defined( $argsRef->{apikey} ) ? $argsRef->{apikey} : 'none' ),
|
||||
cachemaxage => $argsRef->{cachemaxage},
|
||||
lang => $argsRef->{language},
|
||||
@ -286,7 +286,7 @@ sub _CallWeatherCallbackFn($) {
|
||||
my $self = shift;
|
||||
|
||||
# ## Aufruf der callbackFn
|
||||
main::Weather_RetrieveCallbackFn( $self->{devHash} );
|
||||
main::Weather_RetrieveCallbackFn( $self->{devName} );
|
||||
}
|
||||
|
||||
sub _ErrorHandling($$) {
|
||||
|
Loading…
Reference in New Issue
Block a user