unifi-hackers/unifi-lab — pull request #16 by joecuria (2014-06-04 12:46:14+00:00)
Title: Added check for 'state' attribute

If an AP has been disconnected, the Unifi API will not provide a 'state' attribute. This results in an error when checking if 'state' != 1 as there is no 'state' to check.