Minor changes.

This commit is contained in:
Michael Teeuw 2017-10-18 11:58:45 +02:00
parent 681a845ef3
commit 0776dfc80e
2 changed files with 51 additions and 15 deletions

View File

@ -1,16 +1,18 @@
<div class="normal medium"> {% if current %}
<span class="wi wi-strong-wind dimmed"></span> <div class="normal medium">
<span> <span class="wi wi-strong-wind dimmed"></span>
{{current.windSpeed}} <!-- should be converted to wind speed in correct unit ... --> <span>
<sup>{{current.cardinalWindDirection()}}</sup> {{current.windSpeed}} <!-- should be converted to wind speed in correct unit ... -->
</span> <sup>{{current.cardinalWindDirection()}}</sup>
<span class="wi dimmed wi-sunset"></span> <!-- hard coded, should use logic ... --> </span>
<span> 00:00</span> <!-- hard coded, should use logic ... --> <span class="wi dimmed wi-sunset"></span> <!-- hard coded, should use logic ... -->
</div> <span> 00:00</span> <!-- hard coded, should use logic ... -->
<div class="large light"> </div>
<span class="wi weathericon wi-{{current.weatherType}}"></span> <div class="large light">
<span class="bright"> {{current.temperature}}°</span></div> <!-- should show in correct number of decimals --> <span class="wi weathericon wi-{{current.weatherType}}"></span>
</div> <span class="bright"> {{current.temperature | round(1)}}°</span></div> <!-- should show in correct number of decimals -->
</div>
{% endif %}
<!-- Unclomment the line below to see the contents of the `current` object. --> <!-- Unclomment the line below to see the contents of the `current` object. -->
<!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{current | dump}}</div> --> <!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{current | dump}}</div> -->

View File

@ -14,7 +14,40 @@ Module.register("weather",{
weatherProvider: "openweathermap", weatherProvider: "openweathermap",
units: config.units, units: config.units,
roundTemp: false, roundTemp: false,
type: "current" //current, forecast type: "current", //current, forecast
//
location: false,
locationID: false,
appid: "",
units: config.units,
updateInterval: 10 * 60 * 1000, // every 10 minutes
animationSpeed: 1000,
timeFormat: config.timeFormat,
showPeriod: true,
showPeriodUpper: false,
showWindDirection: true,
showWindDirectionAsArrow: false,
useBeaufort: true,
lang: config.language,
showHumidity: false,
degreeLabel: false,
showIndoorTemperature: false,
showIndoorHumidity: false,
initialLoadDelay: 0, // 0 seconds delay
retryDelay: 2500,
apiVersion: "2.5",
apiBase: "http://api.openweathermap.org/data/",
weatherEndpoint: "weather",
appendLocationNameToHeader: true,
calendarClass: "calendar",
onlyTemp: false,
roundTemp: false
}, },
// Module properties. // Module properties.
@ -60,7 +93,8 @@ Module.register("weather",{
return { return {
config: this.config, config: this.config,
current: this.weatherProvider.currentWeather(), current: this.weatherProvider.currentWeather(),
forecast: this.weatherProvider.weatherForecast() forecast: this.weatherProvider.weatherForecast(),
myBoolean: true
} }
}, },