Some cleaning
This commit is contained in:
parent
822317912f
commit
492cc0e63b
3 changed files with 3 additions and 8 deletions
|
|
@ -17,9 +17,6 @@
|
||||||
# You should have received a copy of the GNU Affero General Public License
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
from .browser import SachsenBrowser
|
from .browser import SachsenBrowser
|
||||||
from weboob.capabilities.gauge import ICapGauge, GaugeSensor, Gauge,\
|
from weboob.capabilities.gauge import ICapGauge, GaugeSensor, Gauge,\
|
||||||
SensorNotFound
|
SensorNotFound
|
||||||
|
|
|
||||||
|
|
@ -36,5 +36,4 @@ class SachsenBrowser(PagesBrowser):
|
||||||
|
|
||||||
def iter_history(self, sensor, **kwargs):
|
def iter_history(self, sensor, **kwargs):
|
||||||
self.history.go(params=int(sensor.gaugeid))
|
self.history.go(params=int(sensor.gaugeid))
|
||||||
kwargs['sensor'] = sensor
|
return self.page.iter_history(sensor=sensor)
|
||||||
return self.page.iter_history(**kwargs)
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class ListPage(HTMLPage):
|
||||||
forecasts = {'pf_gerade.png': u'stable',
|
forecasts = {'pf_gerade.png': u'stable',
|
||||||
'pf_unten.png': u'Go down',
|
'pf_unten.png': u'Go down',
|
||||||
'pf_oben.png': u'Go up',
|
'pf_oben.png': u'Go up',
|
||||||
}
|
}
|
||||||
alarmlevel = {"as1.gif": u"Alarmstufe 1", "as2.gif": u"Alarmstufe 2",
|
alarmlevel = {"as1.gif": u"Alarmstufe 1", "as2.gif": u"Alarmstufe 2",
|
||||||
"as3.gif": u"Alarmstufe 3", "as4.gig": u"Alarmstufe 4",
|
"as3.gif": u"Alarmstufe 3", "as4.gig": u"Alarmstufe 4",
|
||||||
"qua_grau.gif": u"No alarm function", "p_gruen.gif": u"",
|
"qua_grau.gif": u"No alarm function", "p_gruen.gif": u"",
|
||||||
|
|
@ -109,10 +109,9 @@ class HistoryPage(HTMLPage):
|
||||||
def condition(self):
|
def condition(self):
|
||||||
return self.verif.match(self.el[0].text_content())
|
return self.verif.match(self.el[0].text_content())
|
||||||
|
|
||||||
obj_id = None
|
|
||||||
obj_date = Date(Regexp(CleanText('.'), r'(\d+)\.(\d+)\.(\d+) (\d+):(\d+)', r'\3-\2-\1 \4:\5'))
|
obj_date = Date(Regexp(CleanText('.'), r'(\d+)\.(\d+)\.(\d+) (\d+):(\d+)', r'\3-\2-\1 \4:\5'))
|
||||||
|
|
||||||
sensor_types = [u'Level', u'Flow']
|
sensor_types = [u'Level', u'Flow']
|
||||||
|
|
||||||
def obj_level(self):
|
def obj_level(self):
|
||||||
index = self.sensor_types.index(self.env['sensor'].name) + 1
|
index = self.sensor_types.index(self.env['sensor'].name) + 1
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue