initial import

This commit is contained in:
jens
2020-11-24 18:34:47 +01:00
commit 636070fd61
12 changed files with 608 additions and 0 deletions
View File
+21
View File
@@ -0,0 +1,21 @@
from components.atemperatureSensor import ATemperatureSensor
import math
class TempSensorSim(ATemperatureSensor):
def name(self):
return "FakeTemp"
def __init__(self):
self.count = 0
self.freq = 0.2
self.log("Created")
self.temp = 22.37
def set_fake_temp(self, temp):
self.temp = temp
def temperature(self):
self.count += 1
return self.temp + 0.0*math.sin(2*math.pi*self.count*self.freq)