Weather1 html image no longer working

(Paul Muldoon) #1

I’m not sure when it happened, but I noticed that my weather1 binding html image is not longer giving me information for the future forecasted days. It shows the current day correctly, but not the forecast.

This is the full html, and do not think anything has changed on it so unsure why just the forecast items do not work.

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-type" CONTENT="text/html; charset=utf-8">
	<link rel="stylesheet" type="text/css" href="static/weather-data/layouts/example.css" />
	<script type="text/javascript" src="static/weather-data/layouts/example.js"></script>
</head>

<body id="weather-body" onload="formatIframe()">
	<div id="weather-location-name">${config:name}, ${weather:condition.observationTime(%1$td.%1$tm.%1$tY %1$tH:%1$tM)}</div>

	<table id="weather-table">
		<tr>
			<td rowspan="2"><img id="weather-icon" src="static/weather-data/images/${param:iconset}/${weather:condition.commonId}.png"/></td>
			<td id="weather-temp">${weather:temperature.current(%.1f)[fahrenheit]}</td>
			<td id="weather-temp-sign">°F</td>
		</tr>
		<tr>
			<td colspan="2">
				<table id="weather-table-details">
					<tr>
						<td>Humidity:</td>
						<td>${weather:atmosphere.humidity} %</td>
					</tr>
					<tr>
						<td>Pressure:</td>
						<td>${weather:atmosphere.pressure(%.1f)} mb</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>

	<table id="weather-forecast-table">
		<tr>
			<td>Today</td>
			<td>${forecast(1):condition.observationTime(%1$tA)}</td>
			<td>${forecast(2):condition.observationTime(%1$tA)}</td>
			<td>${forecast(3):condition.observationTime(%1$tA)}</td>
			<td>${forecast(4):condition.observationTime(%1$tA)}</td>
		</tr>
		<tr>
			<td><img src="static/weather-data/images/${param:iconset}/${forecast(0):condition.commonId}.png"/></td>
			<td><img src="static/weather-data/images/${param:iconset}/${forecast(1):condition.commonId}.png"/></td>
			<td><img src="static/weather-data/images/${param:iconset}/${forecast(2):condition.commonId}.png"/></td>
			<td><img src="static/weather-data/images/${param:iconset}/${forecast(3):condition.commonId}.png"/></td>
			<td><img src="static/weather-data/images/${param:iconset}/${forecast(4):condition.commonId}.png"/></td>
		</tr>
		<tr>
			<td class="temp-max">${forecast(0):temperature.max(%.0f)[fahrenheit]}</td>
			<td class="temp-max">${forecast(1):temperature.max(%.0f)[fahrenheit]}</td>
			<td class="temp-max">${forecast(2):temperature.max(%.0f)[fahrenheit]}</td>
			<td class="temp-max">${forecast(3):temperature.max(%.0f)[fahrenheit]}</td>
			<td class="temp-max">${forecast(4):temperature.max(%.0f)[fahrenheit]}</td>
		</tr>
		<tr>
			<td class="temp-min">${forecast(0):temperature.min(%.0f)[fahrenheit]}</td>
			<td class="temp-min">${forecast(1):temperature.min(%.0f)[fahrenheit]}</td>
			<td class="temp-min">${forecast(2):temperature.min(%.0f)[fahrenheit]}</td>
			<td class="temp-min">${forecast(3):temperature.min(%.0f)[fahrenheit]}</td>
			<td class="temp-min">${forecast(4):temperature.min(%.0f)[fahrenheit]}</td>
		</tr>
	</table>

</body>

</html>

And a sample of forecast 1

Number   Weather_Temp_Min1        "Temperature min [%.2f °F]"   {weather="locationId=home, forecast=1, type=temperature, property=min, unit=fahrenheit"}
Number   Weather_Temp_Max1        "Temperature max [%.2f °F]"   {weather="locationId=home, forecast=1, type=temperature, property=max, unit=fahrenheit"}
0 Likes

(Paul Muldoon) #2

Well,

As I slowly get caught back up on things, it appears the Weather1 binding is slowly phasing away and newer bindings such as the openweathermap and meteoblue weather bindings for OH2 are taking there place.

But does anyone know if the html forecast can be recreated with the other bindings?

0 Likes

(Rich Koshak) #3

No, the other bindings do not support the HTML webview like that. However, most people will use the widgets from the weather providers instead. For example, https://darksky.net/widgets. Just put the generated URL in a Webview and you will get a nicely formatted forecast.

0 Likes