Fix: Sensors are now stopping after update of config

This commit is contained in:
Manuel83
2017-06-28 09:01:13 +02:00
committed by Manuel83
parent 3396e1b379
commit 10a989cee9
3 changed files with 4 additions and 8 deletions
-1
View File
@@ -326,7 +326,6 @@ class CraftBeerPi(ActorAPI, SensorAPI):
for m in members:
if isinstance(tmpObj.__getattribute__(m), StepProperty.Number):
t = tmpObj.__getattribute__(m)
print t.__dict__
#self.cache[key][name]["properties"].append(t.__dict__)
self.cache[key][name]["properties"].append({"name": m, "label": t.label, "type": "number", "configurable": t.configurable, "default_value": t.default_value})
elif isinstance(tmpObj.__getattribute__(m), StepProperty.Text):
+2 -1
View File
@@ -70,15 +70,16 @@ class SensorActive(SensorBase):
__running = False
def is_running(self):
return self.__running
def init(self):
self.__running = True
print "INIT ACTIVE SENSOR"
def stop(self):
self.__running = False
def execute(self):
pass