fixes map functions
This commit is contained in:
@@ -159,19 +159,19 @@ def setupTags():
|
||||
tags = json.loads(get_tag_request.text)
|
||||
for t in tags:
|
||||
if t['tag_class']['class_type'] == 'stroke':
|
||||
stroke_tags[t['name']] = Tag(t['name'], t['tag'], t['id'], t['data_type'], t['change_threshold'], t['guarantee_sec'], mapFn=t['map_function'], ip_address=t['deviceID']['address'], device_type=device_types[t['deviceID']['device_type']])
|
||||
stroke_tags[t['name']] = Tag(t['name'], t['tag'], t['id'], t['data_type'], t['change_threshold'], t['guarantee_sec'], mapFn=maps[t['map_function']], ip_address=t['deviceID']['address'], device_type=device_types[t['deviceID']['device_type']])
|
||||
|
||||
elif t['tag_class']['class_type'] == 'history':
|
||||
history_tags[t['name']] = Tag(t['name'], t['tag'], t['id'], t['data_type'], t['change_threshold'], t['guarantee_sec'], mapFn=t['map_function'], ip_address=t['deviceID']['address'], device_type=device_types[t['deviceID']['device_type']])
|
||||
history_tags[t['name']] = Tag(t['name'], t['tag'], t['id'], t['data_type'], t['change_threshold'], t['guarantee_sec'], mapFn=maps[t['map_function']], ip_address=t['deviceID']['address'], device_type=device_types[t['deviceID']['device_type']])
|
||||
|
||||
elif t['tag_class']['class_type'] == 'gaugeoff':
|
||||
gaugeoff_tags[t['name']] = Tag(t['name'], t['tag'], t['id'], t['data_type'], t['change_threshold'], t['guarantee_sec'], mapFn=t['map_function'], ip_address=t['deviceID']['address'], device_type=device_types[t['deviceID']['device_type']])
|
||||
gaugeoff_tags[t['name']] = Tag(t['name'], t['tag'], t['id'], t['data_type'], t['change_threshold'], t['guarantee_sec'], mapFn=maps[t['map_function']], ip_address=t['deviceID']['address'], device_type=device_types[t['deviceID']['device_type']])
|
||||
|
||||
elif t['tag_class']['class_type'] == 'welltest':
|
||||
welltest_tags[t['name']] = Tag(t['name'], t['tag'], t['id'], t['data_type'], t['change_threshold'], t['guarantee_sec'], mapFn=t['map_function'], ip_address=t['deviceID']['address'], device_type=device_types[t['deviceID']['device_type']])
|
||||
welltest_tags[t['name']] = Tag(t['name'], t['tag'], t['id'], t['data_type'], t['change_threshold'], t['guarantee_sec'], mapFn=maps[t['map_function']], ip_address=t['deviceID']['address'], device_type=device_types[t['deviceID']['device_type']])
|
||||
|
||||
elif t['tag_class']['class_type'] == 'custom':
|
||||
custom_tags[t['name']] = Tag(t['name'], t['tag'], t['id'], t['data_type'], t['change_threshold'], t['guarantee_sec'], mapFn=t['map_function'], ip_address=t['deviceID']['address'], device_type=device_types[t['deviceID']['device_type']])
|
||||
custom_tags[t['name']] = Tag(t['name'], t['tag'], t['id'], t['data_type'], t['change_threshold'], t['guarantee_sec'], mapFn=maps[t['map_function']], ip_address=t['deviceID']['address'], device_type=device_types[t['deviceID']['device_type']])
|
||||
|
||||
get_event_request = requests.get('{}/event_config'.format(web_address))
|
||||
events = json.loads(get_event_request.text)
|
||||
|
||||
Reference in New Issue
Block a user