diff options
Diffstat (limited to 'lib/python/Components/Converter/SensorToText.py')
| -rw-r--r-- | lib/python/Components/Converter/SensorToText.py | 12 |
1 files changed, 12 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..ab87ee2e --- /dev/null +++ b/lib/python/Components/Converter/SensorToText.py @@ -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 |
