new devices added save properly
This commit is contained in:
parent
166d7f1d6f
commit
ac01fbaad4
6
juice.py
6
juice.py
|
@ -23,7 +23,7 @@ class RelayDevice:
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.id = ""
|
self.id = ""
|
||||||
self.type = ""
|
self.type = "RelayDevice"
|
||||||
self.description = ""
|
self.description = ""
|
||||||
self.location = ""
|
self.location = ""
|
||||||
self.ip_address = ""
|
self.ip_address = ""
|
||||||
|
@ -31,10 +31,8 @@ class RelayDevice:
|
||||||
self.sub_devices.append(RelayOutlet())
|
self.sub_devices.append(RelayOutlet())
|
||||||
self.sub_devices.append(RelayOutlet())
|
self.sub_devices.append(RelayOutlet())
|
||||||
self.sub_devices[0].id = 'GPIO0'
|
self.sub_devices[0].id = 'GPIO0'
|
||||||
self.sub_devices[0].type = 'RelayOutlet'
|
|
||||||
self.sub_devices[0].gpio = '0'
|
self.sub_devices[0].gpio = '0'
|
||||||
self.sub_devices[1].id = 'GPIO2'
|
self.sub_devices[1].id = 'GPIO2'
|
||||||
self.sub_devices[1].type = 'RelayOutlet'
|
|
||||||
self.sub_devices[1].gpio = '2'
|
self.sub_devices[1].gpio = '2'
|
||||||
|
|
||||||
self.update()
|
self.update()
|
||||||
|
@ -96,7 +94,7 @@ class RelayOutlet:
|
||||||
"""
|
"""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.id = ""
|
self.id = ""
|
||||||
self.type = ""
|
self.type = "RelayOutlet"
|
||||||
self.description = ""
|
self.description = ""
|
||||||
self.gpio = ""
|
self.gpio = ""
|
||||||
self.state = False
|
self.state = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user