@@ -149,14 +149,14 @@ class Device(object):
type_model.id = type_id
type_info = type_model.select(type='fetchone')
if type_info['unit'] == 'button':
- if switch == 1:
+ if switch == '1':
oper = '升起'
- elif switch == 2:
+ elif switch == '2':
oper = '降下'
- elif switch == 5:
+ elif switch == '5':
oper = '停止'
else:
oper = '开启'
oper = '关闭'