Update state with latest info from Wink API.
435980
def update_state(self):
        
        response = self.api_interface.get_device_state(self, id_override=self.parent_id(),
                                                       type_override=self.parent_object_type())
        self._update_state_from_response(response)
159881
def update_state(self, up_to_timestamp):
        
        for stream_id in self.streams:
            self.streams[stream_id].calculated_intervals = TimeIntervals([(MIN_DATE, up_to_timestamp)])
        self.up_to_timestamp = up_to_timestamp
270372
def set_state(self, entity_id, new_state, **kwargs):
        ""
        return remote.set_state(self.api, new_state, **kwargs)
947439
def update(self, json_state):
        
        if self._type in CONST.BINARY_SENSOR_TYPES:
            self._json_state['status'] = json_state['status']
        else:
            self._json_state.update(
                {k: json_state[k] for k in json_state if self._json_state.get(k)})
274605
def update_state(self):
        
        response = self.api_interface.local_get_state(self, type_override="binary_switche")
        return self._update_state_from_response(response)
850374
def __update_state(self):
    """"""
    # Only if the job was not in a terminal state.
    if self._state.active:
      self._state = self.__get_state_by_id(self.job_config.job_id)
1329050
def _update_service_current_state(service: ServiceState):
    
    LOG.debug("Setting current state from target state for %s", service.id)
    service.update_current_state(service.target_state)
892496
def update_connected(self, status):
        """"""
        self._client['connected'] = status
        _LOGGER.info('updated connected status to %s on %s', status, self.friendly_name)
        self.callback()
431952
def update(self, params):
        
        dev_info = self.json_state.get('deviceInfo')
        dev_info.update({k: params[k] for k in params if dev_info.get(k)})
51043
def app_update_state(app_id,state):
    
    try:
        create_at = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
        conn = get_conn()
        c = conn.cursor()
        c.execute("UPDATE app SET state='{0}',change_at='{1}' WHERE id='{2}'".format(state, create_at, app_id))
        conn.commit()
        conn.close()
        print 'UPDATE app %s state to %s succeed!' % (app_id,state)
    except Exception, e:
        raise RuntimeError( 'update app %s state to %s failed! %s' % (app_id,state,e) )
6033
private void updateState(CmsShellCommandResult result) {

        m_errorCode = result.getErrorCode();
        m_prompt = result.getPrompt();
        m_exitCalled = result.isExitCalled();
        m_hasError = result.hasError();
        m_echo = result.hasEcho();
    }
843222
def get_current_state():
    """"""
    sdp_state = SDPState()
    errval, errdict = _check_status(sdp_state)
    if errval == "error":
        LOG.debug(errdict['reason'])
        return dict(
            current_state="unknown",
            last_updated="unknown",
            reason=errdict['reason']
        )
    LOG.debug('Current State: %s', sdp_state.current_state)
    LOG.debug('Current State last updated: %s',
              sdp_state.current_timestamp.isoformat())
    return dict(
        current_state=sdp_state.current_state,
        last_updated=sdp_state.current_timestamp.isoformat()
    ), HTTPStatus.OK
916050
def update(self, buf):
        """"""
        if self._updatable:
            return libssdeep_wrapper.fuzzy_update(self._state, buf)
        else:
            raise InvalidOperation("Cannot update sdeep created from hash")
962812
function (state, payload) {
        var entity = payload.entity;
        var data = payload.data;
        var where = payload.where || null;
        var options = OptionsBuilder.createPersistOptions(payload);
        var result = payload.result;
        result.data = (new Query(state, entity)).update(data, where, options);
    }
585482
def patch(self):
        
        # TODO block until all devices have updated?
        json = request.get_json()
        logger.info("Updating target state with " + str(json))
        self._targetStateController.updateTargetState(json)
        return None, 200
153243
private function refreshCacheStateInfo()
    {
        if ( time() < ( $this->lastRefreshTimestamp + $this->sleepInterval ) )
        {
            return;
        }

        // Reload expiry timestamps
        eZExpiryHandler::instance()->restore();

        $this->lastRefreshTimestamp = time();
    }
842624
def update_state(self):
        
        response = self.api_interface.get_device_state(self, id_override=self.parent.object_id(),
                                                       type_override=self.parent.object_type())
        self._update_state_from_response(response)