From ac01fbaad430d551a53a7213f9667c0cb8b10467 Mon Sep 17 00:00:00 2001 From: iou1name Date: Thu, 20 Jun 2019 09:00:15 -0400 Subject: [PATCH] new devices added save properly --- juice.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/juice.py b/juice.py index ee0dc92..2f24520 100644 --- a/juice.py +++ b/juice.py @@ -23,7 +23,7 @@ class RelayDevice: """ def __init__(self): self.id = "" - self.type = "" + self.type = "RelayDevice" self.description = "" self.location = "" self.ip_address = "" @@ -31,10 +31,8 @@ class RelayDevice: self.sub_devices.append(RelayOutlet()) self.sub_devices.append(RelayOutlet()) self.sub_devices[0].id = 'GPIO0' - self.sub_devices[0].type = 'RelayOutlet' self.sub_devices[0].gpio = '0' self.sub_devices[1].id = 'GPIO2' - self.sub_devices[1].type = 'RelayOutlet' self.sub_devices[1].gpio = '2' self.update() @@ -96,7 +94,7 @@ class RelayOutlet: """ def __init__(self): self.id = "" - self.type = "" + self.type = "RelayOutlet" self.description = "" self.gpio = "" self.state = False