commit ee14edbd23d2022f793b1d8a1a45ea0926f7f589
parent 1550ea0cff3e8b8167a879dc85e217b5366a19a4
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date: Sun, 28 May 2023 21:56:59 +0200
[GREEN] Add set point -> required temperature changed
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/thermostat.py b/thermostat.py
@@ -3,10 +3,15 @@ from datetime import datetime
class Thermostat:
+ def __init__(self):
+ self.setPoint = None
+
def GetCurrentTime(self):
return int(datetime.now().strftime("%H"))
def GetCurrentRequiredTemperature(self):
+ if (self.setPoint != None):
+ return self.setPoint[1]
return 10
def AddSetPoint(self, hour, temperature):