new device includes the right sub_device id's

This commit is contained in:
iou1name 2019-06-20 10:09:40 -04:00
parent 19edece5b4
commit 8f2c127d9c
2 changed files with 6 additions and 6 deletions

View File

@ -30,9 +30,9 @@ class RelayDevice:
self.sub_devices = []
self.sub_devices.append(RelayOutlet())
self.sub_devices.append(RelayOutlet())
self.sub_devices[0].id = 'GPIO0'
self.sub_devices[0].id = 'OUT0'
self.sub_devices[0].gpio = '0'
self.sub_devices[1].id = 'GPIO2'
self.sub_devices[1].id = 'OUT2'
self.sub_devices[1].gpio = '2'
self.update()

View File

@ -42,13 +42,13 @@
<div class="location"><span class="field_value"></span> <span class="edit font-awesome" onclick="edit_field(this.parentElement)">&#xe800;</span></div>
<div class="ip_address"><span class="field_value"></span> <span class="edit font-awesome" onclick="edit_field(this.parentElement)">&#xe800;</span></div>
<div class="sub_devices">
<div class="sub_device RelayOutlet" id="">
<div class="id"></div>
<div class="sub_device RelayOutlet" id="OUT0">
<div class="id">OUT0</div>
<object class="outlet_image" data="/static/outlet.svg"></object>
<div class="description"><span class="field_value"></span> <span class="edit font-awesome" onclick="edit_field(this.parentElement)">&#xe800;</span></div>
</div>
<div class="sub_device RelayOutlet" id="">
<div class="id"></div>
<div class="sub_device RelayOutlet" id="OUT2">
<div class="id">OUT2</div>
<object class="outlet_image" data="/static/outlet.svg"></object>
<div class="description"><span class="field_value"></span> <span class="edit font-awesome" onclick="edit_field(this.parentElement)">&#xe800;</span></div>
</div>