Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Template for window_open.py flask app...
<!doctype html>
<html>
<title>Window Open?</title>
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #dddddd;
}
</style>
</head>
<body>
{% if window_open %}
<font size="20" color="green">OK to Leave the Window Open!</font><br>
{% else %}
<font size="20" color="red">DO NOT LEAVE THE WINDOW OPEN!</font><br>
{% endif %}
<br><br>
<table>
<tr>
<th>Next {{ evaluate_hours }} Hours</th>
<th>Conditions</th>
<th>Feels Like (F)</th>
<th>Humidity %</th>
</tr>
{% for row in full_output: %}
<tr>
<td>{{ row.time }}</td>
<td>{{ row.conditions }}</td>
<td>{{ row.temp|float|round(2) }}</td>
<td>{{ row.humidity }}</td>
</tr>
{% endfor %}
<tr>
<td></td>
<td><strong>Rain? = {{ rain }}</strong></td>
<td><strong>Max Temp = {{ max_temp }}</strong></td>
<td><strong>Max Humidity = {{ max_humidity }}</strong></td>
</tr>
</table>
<h1>Nest set to {{current_temp|round(2)}}F</h1>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment