2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

fixed: some code cleanup

git-svn-id: https://svn.fhem.de/fhem/trunk@5089 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2014-03-01 21:06:35 +00:00
parent 285ed42c08
commit 23819351b9

View File

@ -65,16 +65,12 @@ sub geodata_Attr($){
when("geo_googleApiKey"){
$attr{$name}{$attrName} = $attrValue;
geodata_collectData($hash);
# RemoveInternalTimer($hash);
# InternalTimer(gettimeofday()+$hash->{helper}{INTERVAL}, "OWO_GetStatus", $hash, 0);
break;
}
when("geo_wuApiKey"){
$attr{$name}{$attrName} = $attrValue;
geodata_collectData($hash);
# RemoveInternalTimer($hash);
# InternalTimer(gettimeofday()+$hash->{helper}{INTERVAL}, "OWO_GetStatus", $hash, 0);
break;
}
@ -96,10 +92,7 @@ sub geodata_Shutdown($) {
sub geodata_collectData($){
my ($hash) = @_;
my $name = $hash->{NAME};
#
# I really hate the fucking nonworking HttpUtils
# from fhem, so we will not use them here!
#
my $ua = LWP::UserAgent->new;
$ua->timeout(10); # test
$ua->env_proxy;
@ -122,7 +115,6 @@ sub _wu_geolookup($$$) {
my ($hash, $ua, $wuapikey) = @_;
my $name = $hash->{NAME};
# $wuapikey = '1c0d9efb71cf016e';
my $lat = ReadingsVal($name, 'latitude', '');
my $lon = ReadingsVal($name, 'longitude', '');