     }
     f.ave_humidity = day[F("avehumidity")];
     f.wind_degrees = day[F("avewind")][F("degrees")];
-    strncpy(f.wind_dir, day[F("avewind")][F("dir")] | "", sizeof(f.wind_dir));
-    strncpy(f.conditions, day[F("conditions")] | "", sizeof(f.conditions));
-    strncpy(f.icon, day[F("icon")] | "", sizeof(f.icon));
+    strlcpy(f.wind_dir, day[F("avewind")][F("dir")] | "", sizeof(f.wind_dir));
+    strlcpy(f.conditions, day[F("conditions")] | "", sizeof(f.conditions));
+    strlcpy(f.icon, day[F("icon")] | "", sizeof(f.icon));
   }
 }
 

} cfg;

void config::configure(JsonObject &o) {
  strncpy(ssid, o[F("ssid")] | "", sizeof(ssid));
  strncpy(password, o[F("password")] | "", sizeof(password));
  strncpy(key, o[F("key")] | "", sizeof(key));
  strncpy(station, o[F("station")] | "", sizeof(station));
  strncpy(hostname, o[F("hostname")] | "", sizeof(hostname));
  conditions_interval = 1000 * (int)o[F("conditions_interval")];
  forecasts_interval = 1000 * (int)o[F("forecasts_interval")];
  metric = (bool)o[F("metric")];
  on_time = 1000 * (int)o[F("display")];
  bright = (int)o[F("bright")];
  dim = (int)o[F("dim")];
  rotate = (int)o[F("rotate")];
}

void setup() {

    JsonObject &day = days[i];
    struct Forecast &f = forecasts[i];
    f.epoch = (time_t)atoi(day[F("date")][F("epoch")]);
    strlcpy(f.day, day[F("date")][F("weekday_short")] | "", sizeof(f.day));
    if (cfg.metric) {
      f.temp_high = atoi(day[F("high")][F("celsius")] | "0");
      f.temp_low = atoi(day[F("low")][F("celsius")] | "0");
