aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Converter/SensorToText.py
diff options
context:
space:
mode:
authorthedoc <thedoc@atom.(none)>2009-12-11 13:01:26 +0100
committerthedoc <thedoc@atom.(none)>2009-12-11 13:01:26 +0100
commit28dcf6be0ee22fedd728fef11ccff484f8a851e8 (patch)
tree6fe8005db1e02409975316859c7a407a489f1f50 /lib/python/Components/Converter/SensorToText.py
parentf239e0373a40522e9d3121bbe656e91fb6179099 (diff)
parent74378b3ebe7dc0548cb4e4b6a0d54b0e871c0264 (diff)
downloadenigma2-28dcf6be0ee22fedd728fef11ccff484f8a851e8.tar.gz
enigma2-28dcf6be0ee22fedd728fef11ccff484f8a851e8.zip
Merge branch 'fantempplugin' into experimental
Diffstat (limited to 'lib/python/Components/Converter/SensorToText.py')
-rw-r--r--lib/python/Components/Converter/SensorToText.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/python/Components/Converter/SensorToText.py b/lib/python/Components/Converter/SensorToText.py
new file mode 100644
index 00000000..fb156faf
--- /dev/null
+++ b/lib/python/Components/Converter/SensorToText.py
@@ -0,0 +1,14 @@
+from Components.Converter.Converter import Converter
+
+class SensorToText(Converter, object):
+ def __init__(self, arguments):
+ Converter.__init__(self, arguments)
+
+ def getText(self):
+ if self.source.getValue() is None:
+ return ""
+ return "%d %s" % (self.source.getValue(), self.source.getUnit())
+
+ text = property(getText)
+
+ \ No newline at end of file