Unfortunately it’s not quite as simple as just adding a refresh in that case.
I took a quick look at the code generated by WeatherWidget.io and it looks like you could add something like the following to tell it to periodically refresh (or reinitialize) the weather data:
const REFRESH_MINUTES = 60 * 24; //every day (60 minutes * 24 hours = total minutes in a day)
const REFRESH_INTERVAL = REFRESH_MINUTES * 1000; //convert to milliseconds for scheduling
//schedule the period refresh / reinit
setInterval(function(){
if(__weatherwidget_init != null) __weatherwidget_init()
}, REFRESH_INTERVAL)
This snippet is setting some variables to determine how often we refresh (every 24 hours in this example). Then scheduling up a function that calls the Weather Widget initialization method __weatherwidget_init()
which gets added with your example widget.
So your final custom tile would look something like:
<style>
html, body { margin: 0 }
</style>
<a class="weatherwidget-io" href="https://forecast7.com/he/31d8934d81/rehovot/" data-label_1="רחובות" data-label_2="מזג האוויר" data-mode="Forecast" data-days="5" data-theme="pure" >רחובות מזג האוויר</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src='https://weatherwidget.io/js/widget.min.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','weatherwidget-io-js');
//INSERT THE SPECIAL REFRESH FUNCTION HERE
const REFRESH_MINUTES = 60 * 24; //every day (60 minutes * 24 hours = total minutes in a day)
const REFRESH_INTERVAL = REFRESH_MINUTES * 1000; //convert to milliseconds for scheduling
//schedule the period refresh / reinit
setInterval(function(){
if(__weatherwidget_init != null) __weatherwidget_init()
}, REFRESH_INTERVAL)
</script>