<div dir="ltr"><div><div><div><div><div><div>The UV-B5/B6 has a ON/OFF setting that is inverted. 0 = ON and 1 = OFF.<br><br></div>I was using a list to get around it. Then I saw in the h777.py driver there were a pair of inverted settings. It thought I replicated this for my needs but apparently I didn't do enough testing and what I have is broken. This is in the uvb5.py driver.<br>
<br></div>Here is the setting...<br><br> rs = RadioSetting("beep_tone", "Beep Prompt",<br> RadioSettingValueBoolean(not _settings.beep_tone))<br> basic.append(rs)<br>
<br></div>And here is the rest...<br><br> if element.has_apply_callback():<br> print "Using apply callback"<br> element.run_apply_callback()<br> elif setting == "beep_tone":<br>
print "Setting %s = %s" % (setting, not (element.value))<br> setattr(obj, setting, not (element.value))<br> else:<br> print "Setting %s = %s" % (setting, element.value)<br>
setattr(obj, setting, element.value)<br> except Exception, e:<br> print element.get_name()<br> raise<br><br></div>No matter if the setting is enabled or disabled, FALSE is always returned so the Beep Prompt is always enabled.<br>
<br></div>Can somebody spot what I am doing wrong?<br><br></div>Thanks,<br>Jim<br></div>