Merge branch 'fantempplugin' into experimental
[enigma2.git] / lib / python / Components / Converter / SensorToText.py
1 from Components.Converter.Converter import Converter
2
3 class SensorToText(Converter, object):
4         def __init__(self, arguments):
5                 Converter.__init__(self, arguments)
6         
7         def getText(self):
8                 if self.source.getValue() is None:
9                         return ""
10                 return "%d %s" % (self.source.getValue(), self.source.getUnit())
11         
12         text = property(getText)
13         
14