[AB-91] adding location id to the available information for weather model

This commit is contained in:
Sheldan
2023-03-19 10:54:54 +01:00
parent f95ba6c28f
commit 2875da117a
3 changed files with 4 additions and 1 deletions

View File

@@ -125,6 +125,7 @@ public class OpenWeatherMap extends AbstractConditionableCommand {
builder.sunset(systemInfo.getSunset() != null ? Instant.ofEpochSecond(systemInfo.getSunset()) : null);
builder.sunset(systemInfo.getSunrise() != null ? Instant.ofEpochSecond(systemInfo.getSunrise()) : null);
}
builder.locationId(weatherResult.getLocationId());
return templateService.renderEmbedTemplate(OPEN_WEATHER_MAP_RESPONSE_TEMPLATE_KEY, builder.build(), serverId);
} catch (IOException e) {
log.warn("Failed to load weather in server {}", serverId, e);