Add alarm signals for full and not available stations
Signed-off-by: Bezleputh <carton_ben@yahoo.fr>
This commit is contained in:
parent
e877e1b552
commit
1901ec652b
1 changed files with 4 additions and 0 deletions
|
|
@ -47,6 +47,8 @@ class InfoStationPage(BasePage):
|
|||
levelattach.name = u'Attach'
|
||||
levelattach.address = u'%s' % adresse
|
||||
lastvalue = GaugeMeasure()
|
||||
if lastvalue.level < 1:
|
||||
lastvalue.alarm = u'Full station'
|
||||
lastvalue.level = float(value)
|
||||
lastvalue.date = last_update
|
||||
levelattach.lastvalue = lastvalue
|
||||
|
|
@ -64,6 +66,8 @@ class InfoStationPage(BasePage):
|
|||
status = 1
|
||||
else:
|
||||
status = -1
|
||||
if lastvalue.level < 1:
|
||||
lastvalue.alarm = u'Not available station'
|
||||
lastvalue.level = float(status)
|
||||
lastvalue.date = last_update
|
||||
levelstatus.lastvalue = lastvalue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue