achterberg wrote:Sorry to be keeping this going, but the script was working previously and even works with Jay's code suggestion below (== False). I had added the debug logging as suggested by Matt and the only time it fails (doesn't return) is when the plugin returns false (lower case) as in the log: Alert state is false. It seems to work with True and true.
<State
id = "alertStatus">
<ValueType>String</ValueType>
<TriggerLabel>Alert Status</TriggerLabel>
<ControlPageLabel>Alert Status</ControlPageLabel>
</State>
if not parsed_simplejson['alerts']:
dev.updateStateOnServer("alertStatus", value = False)
else:
dev.updateStateOnServer("alertStatus", value = True)
achterberg wrote:I get both False and false returned at different times in seemingly no particular order, for what it's worth. But this isn't an issue for me as I explained before, this was a learning exercise. So whatever your timeframe is OK by me.
Users browsing this forum: No registered users and 4 guests