Commit e70a5d73 authored by Vladislav Rykov's avatar Vladislav Rykov
Browse files

notifications logic fixed

parent 9c0a1d47
......@@ -27,7 +27,7 @@ def listening():
d = json.loads(e.payload)
dev = dd.get(d['appkey'], d['devid'])[1]
d['message']['data'] = ddm.read_data(unhexlify(d['message']['data'][2:]), dev[3])
if (d['op'][0] == 'O' and d['lvalue'] in d['message']['data']) or eval(str(d['message']['data'][d['lvalue']]) + d['op'] + d['rvalue']):
if d['lvalue'] in d['message']['data'] and (d['op'][0] == 'O' or eval(str(d['message']['data'][d['lvalue']]) + d['op'] + d['rvalue'])):
if d['action_type'] == 'alert':
# send mail
n = nf.get(d['appkey'], d['devid'], d['nfid'])[1]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment