initial import
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import abc
|
||||
import logging
|
||||
|
||||
|
||||
class ATemperatureSensor:
|
||||
def log(self, s):
|
||||
d = {'user': "TemperatureSensor" + "::" + self.name()}
|
||||
logging.info ("{}".format(s), extra=d)
|
||||
|
||||
@abc.abstractmethod
|
||||
def name(self):
|
||||
return ""
|
||||
|
||||
@abc.abstractmethod
|
||||
def temperature(self):
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user