Skip to content

Commit

Permalink
Minimalistic design
Browse files Browse the repository at this point in the history
  • Loading branch information
tvuotila committed Oct 9, 2020
1 parent afd409f commit f16b8b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions coffee.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
cups = data['current'] / 10
brewed_at_datetime = datetime.datetime.strptime(data['brewed_at'], '%Y-%m-%d %H:%M:%S.%f')
brewed_at = brewed_at_datetime.strftime('%H:%M')
ago = int((datetime.datetime.now() - brewed_at_datetime).total_seconds()/60)
if cups > 0:
print (':coffee:' * cups, 'brewed ', brewed_at)
print('%sX:coffee:%smin' % (cups, ago))
else:
print ('empty pan, last brew', brewed_at)
print(':x:%smin' % ago)


# Notify when new pan
Expand Down

0 comments on commit f16b8b4

Please sign in to comment.