Add config for "good temp" email

This commit is contained in:
Lance Edgar 2016-12-12 09:46:20 -06:00
parent 2234f8fa91
commit c27eba7471

View file

@ -76,6 +76,19 @@ class tempmon_error(tempmon, Email):
return data
class tempmon_good_temp(tempmon, Email):
"""
Sent whenever a tempmon probe first takes a "good temp" reading, after
having previously had some bad reading(s).
"""
default_subject = "Good temperature detected"
def sample_data(self, request):
data = super(tempmon_good_temp, self).sample_data(request)
data['status'] = self.enum.TEMPMON_PROBE_STATUS[self.enum.TEMPMON_PROBE_STATUS_GOOD_TEMP]
return data
class tempmon_high_temp(tempmon, Email):
"""
Sent when a tempmon probe takes a reading which is above the "maximum good