Add humiditiy to forecast data

master
Alfred Egger 2019-05-27 17:36:04 +02:00
parent 4e8c643df1
commit c5b6120b18
2 changed files with 4 additions and 1 deletions

View File

@ -105,6 +105,7 @@ class WeatherController extends IntermediateController {
'weather' => $forecast['list'][$i]['weather'][0]['description'],
'temperature' => $forecast['list'][$i]['main']['temp'],
'pressure' => $forecast['list'][$i]['main']['pressure'],
'humidity' => $forecast['list'][$i]['main']['humidity'],
'wind' => array(
'speed' => $forecast['list'][$i]['wind']['speed'],
'desc' => $this->windDegToString($forecast['list'][$i]['wind']['deg'])

View File

@ -67,13 +67,15 @@
<th><?php p($l->t('Temperature')); ?></th>
<th><?php p($l->t('Weather')); ?></th>
<th><?php p($l->t('Pressure')); ?></th>
<th><?php p($l->t('Humidity')); ?></th>
<th><?php p($l->t('Wind')); ?></th>
</tr>
<tr ng-repeat="forecast in currentCity.forecast">
<td>{{ forecast.date }}</td>
<td>{{ forecast.temperature }}{{ metricRepresentation }}</td>
<td>{{ forecast.weather }}</td>
<td>{{ forecast.pressure }}</td>
<td>{{ forecast.pressure }} hpa</td>
<td>{{ forecast.humidity }} %</td>
<td>{{ forecast.wind.speed }} m/s - {{ forecast.wind.desc }}</td>
</tr>
</table>