'Query switch state.'

def _query_state(self):

    _LOGGER.info('Querying    state    from:    %s', self._url)
    try:
        req = requests.get('{}?get=state'.format(self._url), auth=self._auth, timeout=5)
        return (req.json()['state'] == 'on')
    except requests.RequestException:
        _LOGGER.error('State    query    failed')
