-Ui Changes

-Brew Steps added
-Clean AddOn Dialog
This commit is contained in:
Manuel83
2017-06-25 21:29:45 +02:00
parent f0b7c6e640
commit 00739ea38f
21 changed files with 297 additions and 75 deletions
+18 -2
View File
@@ -10,21 +10,37 @@ from modules.core.props import Property
@cbpi.sensor
class DummyTempSensor(SensorActive):
temp = Property.Number("Temperature", configurable=True, default_value=5)
def get_unit(self):
'''
:return: Unit of the sensor as string. Should not be longer than 3 characters
'''
return "°C" if self.get_config_parameter("unit", "C") == "C" else "°F"
def stop(self):
'''
Stop the sensor. Is called when the sensor config is updated or the sensor is deleted
:return:
'''
pass
def execute(self):
'''
Active sensor has to handle his own loop
:return:
'''
while self.is_running():
self.data_received(self.temp)
socketio.sleep(5)
@classmethod
def init_global(cls):
'''
Called one at the startup for all sensors
:return:
'''