diff options
| author | thedoc <thedoc@atom.(none)> | 2009-12-07 22:38:20 +0100 |
|---|---|---|
| committer | thedoc <thedoc@atom.(none)> | 2009-12-07 22:38:20 +0100 |
| commit | 67858ed10ece500b2cf68dafb39886a0b873ec4c (patch) | |
| tree | 70ce402d1a310eaf5299aaba929c0c9ddde2d0f7 /lib/python/Components/Converter/SensorToText.py | |
| parent | 7950c2de2dbfd5bfee3650faaf45301187f7184a (diff) | |
| download | enigma2-67858ed10ece500b2cf68dafb39886a0b873ec4c.tar.gz enigma2-67858ed10ece500b2cf68dafb39886a0b873ec4c.zip | |
first working version of TempFanControl plugin with Sensors and FanControl component
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 |
