alarms: integrate ooni alarms
This commit is contained in:
parent
21a5d41e8c
commit
45a6d27c8b
4 changed files with 88 additions and 2 deletions
|
@ -172,7 +172,7 @@ class Alarm(db.Model):
|
|||
bridge = db.relationship("Bridge", back_populates="alarms")
|
||||
|
||||
def update_state(self, state: AlarmState, text: str):
|
||||
if self.state != state:
|
||||
if self.alarm_state != state:
|
||||
self.state_changed = datetime.utcnow()
|
||||
self.alarm_state = state
|
||||
self.text = text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue