diff --git a/Custom-Sensor.md b/Custom-Sensor.md index 7e7437f..d575f32 100644 --- a/Custom-Sensor.md +++ b/Custom-Sensor.md @@ -3,6 +3,10 @@ ## Active Sensor ``` +from modules import cbpi +from modules.core.hardware import SensorActive +from modules.core.props import Property + @cbpi.sensor class DummyTempSensor(SensorActive): @@ -23,12 +27,12 @@ class DummyTempSensor(SensorActive): def execute(self): ''' - Active sensor has to handle his own loop + Active sensor has to handle its own loop :return: ''' while self.is_running(): self.data_received(self.temp) - socketio.sleep(5) + self.sleep(5) @classmethod def init_global(cls): @@ -43,4 +47,6 @@ class DummyTempSensor(SensorActive): ## Passive Sensor` -Get's invoked by CraftBeerPi core every 5 seconds` \ No newline at end of file +Get's invoked by CraftBeerPi core every 5 seconds` + +COMMING SOON \ No newline at end of file