Sets the firmware_updates of this ReportBillingData.

        :param firmware_updates: The firmware_updates of this ReportBillingData.
        :type: int
491127
def firmware_updates(self, firmware_updates):
        
        if firmware_updates is None:
            raise ValueError("Invalid value for `firmware_updates`, must not be `None`")
        if firmware_updates is not None and firmware_updates < 0:
            raise ValueError("Invalid value for `firmware_updates`, must be a value greater than or equal to `0`")

        self._firmware_updates = firmware_updates
845554
def update(self, settings):
        
        settings = self.clean(settings)

        # Update internal dict
        self._settings.update(settings)

        # Push every setting items as class object attributes
        self.set_settings(settings)

        return self._settings
975068
def setBehaviorFromVersionLine(self, versionLine):
        
        v = getBehavior(self.name, versionLine.value)
        if v:
            self.setBehavior(v)
1188543
def get_firmware(self):
        
        firmware_uri = self._helper.build_subresource_uri(self.data["uri"], subresource_path=self.FIRMWARE_PATH)
        return self._helper.do_get(firmware_uri)
448018
def update(self,updates={}):
		
		try:
			csp = self.read()
		except:
			csp = {'default-src':"'self'"}
			self.write(csp)
		csp.update(updates)
		self.write(csp)
450967
def _update(self, **kwargs):
        
        for key, value in _iteritems(kwargs):
            if key == 'settings':
                if isinstance(value, dict):
                    if self.settings is None:
                        self.settings = Settings(**value)
                    else:
                        self.settings._update(**value)
                else:
                    self.settings = copy.deepcopy(value)
            else:
                setattr(self, key, value)
749831
def update_fields(self, updates):
        

        for field in updates:
            if self._valid_field(field):
                self._track_changes.add(field)
            else:
                raise ValueError('"{}" is not a valid internal field name'.format(field))

        # Update existing instance of fields, or create a fields instance if needed
        if self.fields:
            self.fields.update(updates)
        else:
            self.fields = updates
710270
def update_snapshots(self, snapshots_data: List[Tuple[str, int]]):
        
        cursor = self.conn.cursor()
        cursor.executemany(
            'UPDATE state_snapshot SET data=? WHERE identifier=?',
            snapshots_data,
        )
        self.maybe_commit()
1227625
def wait_for_ris_firmware_update_to_complete(ris_object):
    """"""

    p_state = ['IDLE']
    c_state = ['IDLE']

    def has_firmware_flash_completed():
        """Checks for completion status of firmware update operation

        The below table shows the conditions for which the firmware update
        will be considered as DONE (be it success or error)::

        +---------------------+--------------------+
        |    Previous state   |    Current state   |
        +=====================+====================+
        |    IDLE             |    ERROR           |
        +---------------------+--------------------+
        |    IDLE             |    COMPLETED       |
        +---------------------+--------------------+
        |    PROGRESSING      |    ERROR           |
        +---------------------+--------------------+
        |    PROGRESSING      |    COMPLETED       |
        +---------------------+--------------------+
        |    PROGRESSING      |    UNKNOWN         |
        +---------------------+--------------------+
        |    PROGRESSING      |    IDLE            |
        +---------------------+--------------------+
        """
        curr_state, curr_percent = ris_object.get_firmware_update_progress()
        p_state[0] = c_state[0]
        c_state[0] = curr_state
        if (((p_state[0] == 'PROGRESSING') and (c_state[0] in
                                                ['COMPLETED', 'ERROR',
                                                 'UNKNOWN', 'IDLE']))
                or (p_state[0] == 'IDLE' and (c_state[0] in
                                              ['COMPLETED', 'ERROR']))):
            return True
        return False

    wait_for_operation_to_complete(
        has_firmware_flash_completed,
        delay_bw_retries=30,
        failover_msg='iLO firmware update has failed.'
    )
    wait_for_ilo_after_reset(ris_object)
69066
def get_firmware(self):
        
        firmware_uri = "{}/firmware".format(self.data["uri"])
        return self._helper.do_get(firmware_uri)
1140384
def set_mode(self, mode):
        
        values = {"desired_state": {"mode": mode}}
        response = self.api_interface.set_device_state(self, values)
        self._update_state_from_response(response)
812675
def _update(self, datapoints):
        
        if len(datapoints) == 1:
            timestamp, value = datapoints[0]
            whisper.update(self.path, value, timestamp)
        else:
            whisper.update_many(self.path, datapoints)
1097800
def _set_current_context(self, device_id):
        
        if device_id not in self._all_index_update_counts:
            self._all_index_update_counts[device_id] = {}
        self._index_update_count = self._all_index_update_counts[device_id]
328908
def set_options(self, **kwargs):
        
        options = self.options
        options.update(kwargs)
        self.update(options=options)
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)
1274397
def update_device_list(self, sessions):
        
        if sessions is None:
            _LOGGER.error('Error updating Emby devices.')
            return

        new_devices = []
        active_devices = []
        dev_update = False
        for device in sessions:
            dev_name = '{}.{}'.format(device['DeviceId'], device['Client'])

            try:
                _LOGGER.debug('Session msg on %s of type: %s, themeflag: %s',
                              dev_name, device['NowPlayingItem']['Type'],
                              device['NowPlayingItem']['IsThemeMedia'])
            except KeyError:
                pass

            active_devices.append(dev_name)
            if dev_name not in self._devices and \
                    device['DeviceId'] != str(self._api_id):
                _LOGGER.debug('New Emby DeviceID: %s. Adding to device list.',
                              dev_name)
                new = EmbyDevice(device, self)
                self._devices[dev_name] = new
                new_devices.append(new)
            elif device['DeviceId'] != str(self._api_id):
                # Before we send in new data check for changes to state
                # to decide if we need to fire the update callback
                if not self._devices[dev_name].is_active:
                    # Device wasn't active on the last update
                    # We need to fire a device callback to let subs now
                    dev_update = True

                do_update = self.update_check(
                    self._devices[dev_name], device)
                self._devices[dev_name].update_data(device)
                self._devices[dev_name].set_active(True)
                if dev_update:
                    self._do_new_devices_callback(0)
                    dev_update = False
                if do_update:
                    self._do_update_callback(dev_name)

        # Need to check for new inactive devices and flag
        for dev_id in self._devices:
            if dev_id not in active_devices:
                # Device no longer active
                if self._devices[dev_id].is_active:
                    self._devices[dev_id].set_active(False)
                    self._do_update_callback(dev_id)
                    self._do_stale_devices_callback(dev_id)

        # Call device callback if new devices were found.
        if new_devices:
            self._do_new_devices_callback(0)
344312
def update(self, message):
        
        # Firmware version < 2.2a.8.6
        if message.version == 1:
            if message.event_type == 'ALARM_PANIC':
                self._alarmdecoder._update_panic_status(True)
                
            elif message.event_type == 'CANCEL':
                self._alarmdecoder._update_panic_status(False)

        # Firmware version >= 2.2a.8.6
        elif message.version == 2:
            source = message.event_source
            if source == LRR_EVENT_TYPE.CID:
                self._handle_cid_message(message)
            elif source == LRR_EVENT_TYPE.DSC:
                self._handle_dsc_message(message)
            elif source == LRR_EVENT_TYPE.ADEMCO:
                self._handle_ademco_message(message)
            elif source == LRR_EVENT_TYPE.ALARMDECODER:
                self._handle_alarmdecoder_message(message)
            elif source == LRR_EVENT_TYPE.UNKNOWN:
                self._handle_unknown_message(message)
            else:
                pass