Convert sachsen module to browser2
This commit is contained in:
parent
b914e66969
commit
89584ee168
4 changed files with 139 additions and 134 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright(C) 2010-2012 Romain Bignon, Florent Fourcot
|
||||
# Copyright(C) 2010-2014 Florent Fourcot
|
||||
#
|
||||
# This file is part of weboob.
|
||||
#
|
||||
|
|
@ -65,6 +65,8 @@ class SachsenLevelBackend(BaseBackend, ICapGauge):
|
|||
def iter_sensors(self, gauge, pattern=None):
|
||||
if not isinstance(gauge, Gauge):
|
||||
gauge = self._get_gauge_by_id(gauge)
|
||||
if gauge is None:
|
||||
raise SensorNotFound()
|
||||
if pattern is None:
|
||||
for sensor in gauge.sensors:
|
||||
yield sensor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue