diff options
| author | thedoc <thedoc@atom.(none)> | 2009-12-11 13:01:26 +0100 |
|---|---|---|
| committer | thedoc <thedoc@atom.(none)> | 2009-12-11 13:01:26 +0100 |
| commit | 28dcf6be0ee22fedd728fef11ccff484f8a851e8 (patch) | |
| tree | 6fe8005db1e02409975316859c7a407a489f1f50 /lib/python/Components/Converter | |
| parent | f239e0373a40522e9d3121bbe656e91fb6179099 (diff) | |
| parent | 74378b3ebe7dc0548cb4e4b6a0d54b0e871c0264 (diff) | |
| download | enigma2-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.am | 2 | ||||
| -rw-r--r-- | lib/python/Components/Converter/SensorToText.py | 14 |
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 |
