diff --git a/itd.toml b/itd.toml index 0ff45e7..42f2214 100644 --- a/itd.toml +++ b/itd.toml @@ -27,4 +27,5 @@ vol.interval = 5 [weather] + enabled = true location = "Los Angeles, CA" \ No newline at end of file diff --git a/weather.go b/weather.go index f7bb5b9..f3e18d9 100644 --- a/weather.go +++ b/weather.go @@ -61,6 +61,10 @@ type OSMData []struct { var sendWeatherCh = make(chan struct{}, 1) func initWeather(dev *infinitime.Device) error { + if !k.Bool("weather.enabled") { + return nil + } + // Get location based on string in config lat, lon, err := getLocation(k.String("weather.location")) if err != nil {