def device_inclusion(Button):
zwareGlobals.debugData.insert(INSERT,"Including device to the network....\n")
Button['state'] = 'disabled'
result = messagebox.askokcancel("Include Device","Initiate your device and select \"OK\" to add it to the network\n")
if result == 1:
zwareGlobals.debugData.focus_force()
r = zware.zw_add_remove(2)
zware.zw_net_comp(2)
zwareGlobals.debugData.insert(INSERT,"Device has been successfully added to the network\n")
poll_node_list(True)
enable_disable_binary_switch()
else:
zwareGlobals.debugData.focus_force()
zwareGlobals.debugData.insert(INSERT,"Device Inclusion cancelled\n")
zwareGlobals.debugData.see(END)
Button['state'] = 'normal'
评论列表
文章目录