diff --git a/app/Weather.php b/app/Weather.php index 1b44e4ce..3a01b934 100644 --- a/app/Weather.php +++ b/app/Weather.php @@ -115,9 +115,12 @@ public static function updateLocations() foreach ($locations as $loc) { - $result = Weather::callApi($loc); - if (gettype($result) == 'string') - $count++; + if ($loc->devices()->count() > 0) + { + $result = Weather::callApi($loc); + if (gettype($result) == 'string') + $count++; + } } return 'updated_'.$count.'_locations'; }