Return the status of the device as string.
492897
def device_status(self):
        """"""
        try:
            return self.device_status_simple(
                self.data.get('status').get('status1'))
        except (KeyError, AttributeError):
            return self.device_status_simple('')
380620
def model(self):
        """"""
        try:
            return self.data.get('identity').get('model_name')
        except (KeyError, AttributeError):
            return self.device_status_simple('')
992289
def get_status(self):
        """"""
        try:
            request = requests.get(
                '{}/{}/'.format(self.resource, URI), timeout=self.timeout)
            raw_data = request.json()
            # Doesn't always work !!!!!
            #self._mac = next(iter(self.raw_data))
            self.data = raw_data[self._mac]
            return self.data
        except (requests.exceptions.ConnectionError, ValueError):
            raise exceptions.MyStromConnectionError()
401735
def get_status(self):
        

        # "The first command sent must be a 'T' command" from T95 manual
        self.device.serial_command_mode = True

        Tarray = [0x80] * 10

        # Status byte (SB1)
        Tarray[0] = {
            'stopped': 0x01,
            'heat': 0x10,
            'cool': 0x20,
            'hold': 0x30,
        }.get(self.device._csm.state, 0x01)

        if Tarray[0] == 0x30 and self.device.hold_commanded:
            Tarray[0] = 0x50

        # Error status byte (EB1)
        if self.device.pump_overspeed:
            Tarray[1] |= 0x01
        # TODO: Add support for other error conditions?

        # Pump status byte (PB1)
        Tarray[2] = 0x80 + self.device.pump_speed

        # Temperature
        Tarray[6:10] = [ord(x) for x in "%04x" % (int(self.device.temperature * 10) & 0xFFFF)]

        return ''.join(chr(c) for c in Tarray)
937073
def get_status(self):
        """"""

        result = ''
        if self._data_struct is not None:
            result = self._data_struct[KEY_STATUS]
        return result
1069282
def process_status(self, helper, session, check):
        """""""
        snmp_result_status = helper.get_snmp_value(session, helper, DEVICE_GLOBAL_OIDS['oid_' + check])

        if check == "system_lcd":
            helper.update_status(helper, normal_check("global", snmp_result_status, "LCD status"))
        elif check == "global_storage":
            helper.update_status(helper, normal_check("global", snmp_result_status, "Storage status"))
        elif check == "system_power":
            helper.update_status(helper, self.check_system_power_status(snmp_result_status))
        elif check == "global_system":
            helper.update_status(helper,
                                 normal_check("global", snmp_result_status, "Device status"))
718452
def status(self) -> str:
        """"""
        # As status is a modifiable property, have to reload from the db.
        self._config = self._load_config()
        return self._config.get('status')
1186040
def desc(self):
        """"""
        return '{0} (ID: {1}) - {2} - {3}'.format(
            self.name, self.device_id, self.type, self.status)
391823
def _get_status(self):
        """"""
        if self._state in ["processed", "error"]:
            return self._state
        
        get_resp = requests.get(self.location, cookies={"session": self.session})

        self._state = get_resp.json()["status"]
        self.slice_time = get_resp.json()["slice_time"]
        
        return self._state
160205
@Override
    public String status() {
        MDC.setContextMap(contextMap);
        xlogger.entry();
        try {
            status = getStatus();
        } catch (final DevFailed e) {
            try {
                stateImpl.stateMachine(DeviceState.UNKNOWN);
                statusImpl.statusMachine(DevFailedUtils.toString(e), DeviceState.UNKNOWN);
                status = DevFailedUtils.toString(e);
            } catch (final DevFailed e1) {
                logger.debug(NOT_IMPORTANT_ERROR, e1);
            }
            logger.debug(NOT_IMPORTANT_ERROR, e);
        }
        return status;
    }
472570
def hardware_status(self):
        
        result = self.make_request(
            NodeCommandFailed,
            resource='appliance_status')
        return HardwareStatus(result.get('hardware_statuses', []))
1332774
def current_state_str(self):
        """"""
        if self.sample_ok:
            msg = ''
            temperature = self._get_value_opc_attr('temperature')
            if temperature is not None:
                msg += 'Temp: %s ºC, ' % temperature
            humidity = self._get_value_opc_attr('humidity')
            if humidity is not None:
                msg += 'Humid: %s %%, ' % humidity
            pressure = self._get_value_opc_attr('pressure')
            if pressure is not None:
                msg += 'Press: %s mb, ' % pressure
            light_level = self._get_value_opc_attr('light_level')
            if light_level is not None:
                msg += 'Light: %s lux, ' % light_level
            return msg[:-2]
        else:
            return "Bad sample"
281374
def print_status(self):
        """"""
        s = []
        s.append('=== State Machines: ===\n')
        for stm_id in Driver._stms_by_id:
            stm = Driver._stms_by_id[stm_id]
            s.append('    - {} in state {}\n'.format(stm.id, stm.state))
        s.append('=== Events in Queue: ===\n')
        for event in self._event_queue.queue:
            if event is not None:
                s.append('    - {} for {} with args:{} kwargs:{}\n'.format(
                    event['id'], event['stm'].id,
                    event['args'], event['kwargs']))
        s.append('=== Active Timers: {} ===\n'.format(len(self._timer_queue)))
        for timer in self._timer_queue:
            s.append('    - {} for {} with timeout {}\n'.format(
                timer['id'], timer['stm'].id, timer['timeout']))
        s.append('=== ================ ===\n')
        return ''.join(s)
572869
def as_status(cls, obj):
        """"""
        if obj is None: return None
        return obj if isinstance(obj, cls) else cls.from_string(obj)
1156918
def get_bluetooth_state(self):
        
        log.debug("getting bluetooth state...")
        cmd, url = DEVICE_URLS["get_bluetooth_state"]
        return self._exec(cmd, url)
71630
def status(self):
        """"""
        try:
            # -- Check client
            res = self.run(['info'])
            if res[0]['clientName'] == '*unknown*':
                return ConnectionStatus.INVALID_CLIENT
            # -- Trigger an auth error if not logged in
            self.run(['user', '-o'])
        except errors.CommandError as err:
            if 'password (P4PASSWD) invalid or unset' in str(err.args[0]):
                return ConnectionStatus.NO_AUTH
            if 'Connect to server failed' in str(err.args[0]):
                return ConnectionStatus.OFFLINE

        return ConnectionStatus.OK
1153557
def get_status(self, device_id):
        """"""
        devices = self.get_devices()

        if devices != False:
            for device in devices:
                if device['door'] == device_id:
                    return device['status']

        return False