Resolved UI flicker, new config vars, brightness up to 255, fixed buttons, fixed race condition (#2072)
This commit is contained in:
1 parent
0adc853741
commit
6dae005b65
3 files changed
+33
-29
No files matched your search
@@ -27,10 +27,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
qsusb = qwikswitch.QSUSB[discovery_info['qsusb_id']]
|
||||
|
||||
for item in qsusb.ha_devices:
|
||||
if item['type'] == 'rel' and \
|
||||
item['name'].lower().endswith(' switch'):
|
||||
# Remove the ' Switch' name postfix for HA
|
||||
item['name'] = item['name'][:-7]
|
||||
if item['type'] == 'switch':
|
||||
dev = QSSwitch(item, qsusb)
|
||||
add_devices([dev])
|
||||
qsusb.ha_objects[item['id']] = dev
|
||||
Reference in new issue
Block a user