Hello. Thus anyone have code to a tile in Tileboard for weather forecast like in hass the met.no, other than Darksky. Thank you
My friend Jan Larsen was kind and give me the code for Weatherbit.
{
position: [0, 0],
width: 2,
type: TYPES.WEATHER_LIST,
id: {},
icons: {
't01d': 'tstorms',
't02d': 'tstorms',
't03d': 'tstorms',
't04d': 'tstorms',
't04d': 'tstorms',
't04d': 'tstorms',
'd01d': 'chancerain',
'd02d': 'chancerain',
'd03d': 'chancerain',
'r01d': 'rain',
'r02d': 'rain',
'r03d': 'rain',
'f01d': 'sleet',
'r04d': 'rain',
'r05d': 'rain',
'r06d': 'rain',
's01d': 'snow',
's02d': 'snow',
's03d': 'snow',
's05d': 'snow',
's05d': 'snow',
's01d': 'snow',
's02d': 'snow',
's06d': 'snow',
'a01d': 'fog',
'a02d': 'fog',
'a03d': 'fog',
'a04d': 'fog',
'a05d': 'fog',
'a06d': 'fog',
'c01d': 'clear',
'c02d': 'mostlysunny',
'c02d': 'mostlysunny',
'c03d': 'mostlycloudy',
'c04d': 'cloudy',
},
hideHeader: true,
list: [1,2,3,4].map(function (id) {
var forecast = "&sensor.weatherbit_forecast_day_" + id + ".attributes.templow - ";
forecast += "&sensor.weatherbit_forecast_day_" + id + ".attributes.temperature";
forecast += "&sensor.weatherbit_temperature.attributes.unit_of_measurement";
var wind = "&sensor.weatherbit_forecast_day_" + id + ".attributes.wind_speed";
wind += "&sensor.weatherbit_wind_speed.attributes.unit_of_measurement";
return {
date: function () {
var d = new Date(Date.now() + (id - 1) * 24 * 60 * 60 * 1000);
var dayNumber = d.getDay();
var dayName = "";
switch(dayNumber){
case 0: dayName = "Søndag"
break;
case 1: dayName = "Mandag"
break;
case 2: dayName = "Tirsdag"
break;
case 3: dayName = "Onsdag"
break;
case 4: dayName = "Torsdag"
break;
case 5: dayName = "Fredag"
break;
case 6: dayName = "Lørdag"
break;
default: dayName = 'fejl'
}
return dayName;
},
icon: "&sensor.weatherbit_forecast_day_" + id + ".attributes.weather_icon",
primary: forecast,
secondary: wind
}
})
}
weatherbit is nice but…
what about met.no? the TO is right getting an implemented solution (such as met.no) running with forecast for the beloved Tileboard would be awesome!
I can also not get the forcast to work… but that might result of my bad javascript skills. But I would still appreciate any help into the right direction here…
Best goeste