'Return the state.'

@property
def state(self):

    if (ATTR_READY not in self._attributes):
        return None
    stage = ''
    if (not self._attributes[ATTR_READY]):
        stage = self._attributes[ATTR_QUERY_STAGE]
    if self._attributes[ATTR_FAILED]:
        return sub_status('Dead', stage)
    if (not self._attributes[ATTR_AWAKE]):
        return sub_status('Sleeping', stage)
    if self._attributes[ATTR_READY]:
        return sub_status('Ready', stage)
    return stage
