first working version of TempFanControl plugin with Sensors and FanControl component
[enigma2.git] / lib / python / Components / Converter / SensorToText.py
diff --git a/lib/python/Components/Converter/SensorToText.py b/lib/python/Components/Converter/SensorToText.py
new file mode 100644 (file)
index 0000000..ab87ee2
--- /dev/null
@@ -0,0 +1,12 @@
+from Components.Converter.Converter import Converter
+
+class SensorToText(Converter, object):
+       def __init__(self, arguments):
+               Converter.__init__(self, arguments)
+        
+       def getText(self):
+               return "%d %s" % (self.source.getValue(), self.source.getUnit())
+       
+       text = property(getText)
+        
+        
\ No newline at end of file