From a04ac33d65d790ebd603c323a61e3d53d1f43b6d Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 10 Jan 2013 14:56:34 +0100 Subject: [PATCH] Add sensors function to wetboobs --- weboob/applications/wetboobs/wetboobs.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/weboob/applications/wetboobs/wetboobs.py b/weboob/applications/wetboobs/wetboobs.py index 3b25c73c..28fd8be0 100644 --- a/weboob/applications/wetboobs/wetboobs.py +++ b/weboob/applications/wetboobs/wetboobs.py @@ -187,3 +187,17 @@ class WetBoobs(ReplApplication): for backend, measure in self.do('get_last_measure', _id, backends=backend_name, caps=ICapGauge): self.format(measure) self.flush() + + def do_sensors(self, line): + """ + sensors GAUGE_ID + + Iter sensors of a gauge. + """ + gauge, = self.parse_command_args(line, 1, 1) + _id, backend_name = self.parse_id(gauge) + + self.start_format() + for backend, sensor in self.do('iter_sensors', _id, backends=backend_name, caps=ICapGauge): + self.format(sensor) + self.flush()