aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Converter
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
parentf239e0373a40522e9d3121bbe656e91fb6179099 (diff)
parent74378b3ebe7dc0548cb4e4b6a0d54b0e871c0264 (diff)
downloadenigma2-28dcf6be0ee22fedd728fef11ccff484f8a851e8.tar.gz
enigma2-28dcf6be0ee22fedd728fef11ccff484f8a851e8.zip
Merge branch 'fantempplugin' into experimental
Diffstat (limited to 'lib/python/Components/Converter')
-rw-r--r--lib/python/Components/Converter/Makefile.am2
-rw-r--r--lib/python/Components/Converter/SensorToText.py14
2 files changed, 15 insertions, 1 deletions
diff --git a/lib/python/Components/Converter/Makefile.am b/lib/python/Components/Converter/Makefile.am
index 75c8a08e..3b6fd3e8 100644
--- a/lib/python/Components/Converter/Makefile.am
+++ b/lib/python/Components/Converter/Makefile.am
@@ -6,4 +6,4 @@ install_PYTHON = \
ConditionalShowHide.py ServicePosition.py ValueRange.py RdsInfo.py Streaming.py \
StaticMultiList.py ServiceTime.py MovieInfo.py MenuEntryCompare.py StringListSelection.py \
ValueBitTest.py TunerInfo.py ConfigEntryTest.py TemplatedMultiContent.py ProgressToText.py \
- Combine.py
+ Combine.py SensorToText.py
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