Skip to content

Commit

Permalink
Check if sensor set for kettle
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel83 committed Mar 12, 2017
1 parent 062c3f2 commit 1c0e9d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion brewapp/base/kettle.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,11 @@ def initKettle():

@brewjob(key="kettle", interval=5)
def kettlejob():

for id in app.brewapp_kettle_state:
k = app.brewapp_kettle_state[id]
temp = app.brewapp_thermometer_last[int(k["sensorid"])]
if k["sensorid"] is None or k["sensorid"] == "":
continue
temp = app.brewapp_thermometer_last.get(int(k["sensorid"]),0)
timestamp = int((datetime.datetime.utcnow() - datetime.datetime(1970, 1, 1)).total_seconds()) * 1000
writeTempToFile("K_" + str(id), timestamp, temp, k["target_temp"])
2 changes: 1 addition & 1 deletion brewapp/ui/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<div class="container-fluid" ui-view></div>
<footer class="footer">
<div class="container">
<p class="text-muted">&copy 2015 Manuel Fritsch - www.craftbeerpi.com - label.craftbeerpi.com</p>
<p class="text-muted">&copy 2017 Manuel Fritsch - www.craftbeerpi.com - label.craftbeerpi.com</p>
</div>
</footer>
</div>
Expand Down

0 comments on commit 1c0e9d3

Please sign in to comment.