Fwupd.Device

g Fwupd.Codec Fwupd.Codec Fwupd.Device Fwupd.Device Fwupd.Codec->Fwupd.Device GObject.GInterface GObject.GInterface GObject.GInterface->Fwupd.Codec GObject.Object GObject.Object GObject.Object->Fwupd.Device

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Fwupd.Codec (22)

Structs:

GObject.ObjectClass (5)

class

array_ensure_parents (devices)

class

array_filter_flags (devices, include, exclude)

class

flag_from_string (val)

class

flag_to_string (val)

class

id_is_valid (device_id)

class

new ()

class

problem_from_string (val)

class

problem_to_string (val)

add_checksum (checksum)

add_child (child)

add_flag (flag)

add_guid (guid)

add_icon (icon)

add_instance_id (instance_id)

add_issue (issue)

add_problem (problem)

add_protocol (protocol)

add_release (release)

add_request_flag (request_flag)

add_vendor_id (vendor_id)

compare (self2)

get_battery_level ()

get_battery_threshold ()

get_branch ()

get_checksums ()

get_children ()

get_composite_id ()

get_created ()

get_details_url ()

get_flags ()

get_flashes_left ()

get_guid_default ()

get_guids ()

get_icons ()

get_id ()

get_install_duration ()

get_instance_ids ()

get_issues ()

get_modified ()

get_name ()

get_parent ()

get_parent_id ()

get_percentage ()

get_plugin ()

get_problems ()

get_protocols ()

get_release_default ()

get_releases ()

get_request_flags ()

get_root ()

get_serial ()

get_status ()

get_summary ()

get_update_error ()

get_update_state ()

get_vendor ()

get_vendor_ids ()

get_version ()

get_version_bootloader ()

get_version_bootloader_raw ()

get_version_build_date ()

get_version_format ()

get_version_highest ()

get_version_highest_raw ()

get_version_lowest ()

get_version_lowest_raw ()

get_version_raw ()

has_checksum (checksum)

has_flag (flag)

has_guid (guid)

has_icon (icon)

has_instance_id (instance_id)

has_problem (problem)

has_protocol (protocol)

has_request_flag (request_flag)

has_vendor_id (vendor_id)

incorporate (donor)

match_flags (include, exclude)

remove_child (child)

remove_children ()

remove_flag (flag)

remove_problem (problem)

remove_request_flag (request_flag)

set_battery_level (battery_level)

set_battery_threshold (battery_threshold)

set_branch (branch)

set_composite_id (composite_id)

set_created (created)

set_details_url (details_url)

set_flags (flags)

set_flashes_left (flashes_left)

set_id (id)

set_install_duration (duration)

set_modified (modified)

set_name (name)

set_parent (parent)

set_parent_id (parent_id)

set_percentage (percentage)

set_plugin (plugin)

set_problems (problems)

set_request_flags (request_flags)

set_serial (serial)

set_status (status)

set_summary (summary)

set_update_error (update_error)

set_update_state (update_state)

set_vendor (vendor)

set_version (version)

set_version_bootloader (version_bootloader)

set_version_bootloader_raw (version_bootloader_raw)

set_version_build_date (version_build_date)

set_version_format (version_format)

set_version_highest (version_highest)

set_version_highest_raw (version_highest_raw)

set_version_lowest (version_lowest)

set_version_lowest_raw (version_lowest_raw)

set_version_raw (version_raw)

Virtual Methods

Inherited:

GObject.Object (7), Fwupd.Codec (7)

Properties

Name

Type

Flags

Short Description

battery-level

int

r/w

battery-threshold

int

r/w

flags

int

r/w

id

str

r/w

parent

Fwupd.Device

r/w/c

percentage

int

r/w

problems

int

r/w

request-flags

int

r/w

status

int

r/w

update-error

str

r/w

update-state

int

r/w

vendor

str

r/w

version

str

r/w

version-format

int

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Fwupd.Device(**kwargs)
Bases:

GObject.Object, Fwupd.Codec

Abstract:

No

Structure:

Fwupd.DeviceClass

A physical device on the host with optionally updatable firmware.

See also: [class`FwupdRelease`]

classmethod array_ensure_parents(devices)[source]
Parameters:

devices ([Fwupd.Device]) – devices

Sets the parent object on all devices in the array using the parent ID.

Added in version 1.3.7.

classmethod array_filter_flags(devices, include, exclude)[source]
Parameters:
Raises:

GLib.Error

Returns:

devices

Return type:

[Fwupd.Device]

Creates an array of new devices that match using Fwupd.Device.match_flags().

Added in version 1.9.3.

classmethod flag_from_string(val)[source]
Parameters:

val (str or None) – a string, e.g. internal

Returns:

enumerated value

Return type:

Fwupd.DeviceFlags

Converts a string to an enumerated value.

Added in version 0.7.0.

classmethod flag_to_string(val)[source]
Parameters:

val (Fwupd.DeviceFlags) – value, e.g. Fwupd.DeviceFlags.INTERNAL

Returns:

identifier string

Return type:

str

Converts an enumerated value to a string.

Added in version 0.7.0.

classmethod id_is_valid(device_id)[source]
Parameters:

device_id (str) – string to check, e.g. d3fae86d95e5d56626129d00e332c4b8dac95442

Returns:

True if guid was a fwupd device ID, False otherwise

Return type:

bool

Checks the string is a valid non-partial device ID. It is important to note that the wildcard ID of * is not considered a valid ID in this function and the client must check for this manually if this should be allowed.

Added in version 1.4.1.

classmethod new()[source]
Returns:

a new Fwupd.Device

Return type:

Fwupd.Device

Creates a new device.

Added in version 0.9.3.

classmethod problem_from_string(val)[source]
Parameters:

val (str or None) – a string, e.g. system-power-too-low

Returns:

enumerated value

Return type:

Fwupd.DeviceProblem

Converts a string to an enumerated value.

Added in version 1.8.1.

classmethod problem_to_string(val)[source]
Parameters:

val (Fwupd.DeviceProblem) – value, e.g. Fwupd.DeviceProblem.SYSTEM_POWER_TOO_LOW

Returns:

identifier string

Return type:

str

Converts an enumerated value to a string.

Added in version 1.8.1.

add_checksum(checksum)[source]
Parameters:

checksum (str) – the device checksum

Adds a device checksum.

Added in version 0.9.3.

add_child(child)[source]
Parameters:

child (Fwupd.Device) – Another Fwupd.Device

Adds a child device. An child device is logically linked to the primary device in some way.

NOTE: You should never call this function from user code, it is for daemon use only. Only use Fwupd.Device.set_parent() to set up a logical tree.

Added in version 1.5.1.

add_flag(flag)[source]
Parameters:

flag (Fwupd.DeviceFlags) – the Fwupd.DeviceFlags

Adds a specific device flag to the device.

Added in version 0.9.3.

add_guid(guid)[source]
Parameters:

guid (str) – the GUID, e.g. 2082b5e0-7a64-478a-b1b2-e3404fab6dad

Adds the GUID if it does not already exist.

Added in version 0.9.3.

add_icon(icon)[source]
Parameters:

icon (str) – the icon name, e.g. input-mouse or /usr/share/icons/foo.png

Adds the icon name if it does not already exist.

Added in version 0.9.8.

add_instance_id(instance_id)[source]
Parameters:

instance_id (str) – the instance ID, e.g. PCI\VEN_10EC&DEV_525A

Adds the instance ID if it does not already exist.

Added in version 1.2.5.

add_issue(issue)[source]
Parameters:

issue (str) – the update issue, e.g. CVE-2019-12345

Adds an current issue to this device.

Added in version 1.7.6.

add_problem(problem)[source]
Parameters:

problem (Fwupd.DeviceProblem) – the Fwupd.DeviceProblem, e.g. Fwupd.DeviceProblem.SYSTEM_POWER_TOO_LOW

Adds a specific device problem kind to the device.

Added in version 1.8.1.

add_protocol(protocol)[source]
Parameters:

protocol (str) – the protocol name, e.g. com.hughski.colorhug

Adds a device protocol name.

Added in version 1.5.8.

add_release(release)[source]
Parameters:

release (Fwupd.Release) – a release

Adds a release for this device.

Added in version 0.9.8.

add_request_flag(request_flag)[source]
Parameters:

request_flag (Fwupd.RequestFlags) – the Fwupd.RequestFlags

Adds a specific device request flag to the device.

Added in version 1.9.10.

add_vendor_id(vendor_id)[source]
Parameters:

vendor_id (str) – the ID, e.g. ‘USB:0x1234’

Adds a device vendor ID.

Added in version 1.5.5.

compare(self2)[source]
Parameters:

self2 (Fwupd.Device) – a different device

Returns:

negative, 0 or positive

Return type:

int

Comparison function for comparing two device objects.

Added in version 1.1.1.

get_battery_level()[source]
Returns:

value in percent

Return type:

int

Returns the battery level.

Added in version 1.8.1.

get_battery_threshold()[source]
Returns:

value in percent

Return type:

int

Returns the battery threshold under which a firmware update cannot be performed.

If Fwupd.Device.set_battery_threshold() has not been used, a default value is used instead.

Added in version 1.8.1.

get_branch()[source]
Returns:

the device branch, or None if unset

Return type:

str

Gets the current device branch.

Added in version 1.5.0.

get_checksums()[source]
Returns:

the checksums, which may be empty

Return type:

[str]

Gets the device checksums.

Added in version 0.9.3.

get_children()[source]
Returns:

the children, which may be empty

Return type:

[Fwupd.Device]

Gets the device children. These can only be assigned using Fwupd.Device.set_parent().

Added in version 1.3.7.

get_composite_id()[source]
Returns:

the composite ID

Return type:

str or None

Gets the composite ID, falling back to the device ID if unset.

The composite ID will be the same value for all parent, child and sibling devices.

Added in version 1.6.0.

get_created()[source]
Returns:

the UNIX time, or 0 if unset

Return type:

int

Gets when the device was created.

Added in version 0.9.3.

get_details_url()[source]
Returns:

a URL, or None if unset

Return type:

str

Gets the device URL.

Added in version 2.1.2.

get_flags()[source]
Returns:

device flags, or 0 if unset

Return type:

int

Gets device flags.

Added in version 0.9.3.

get_flashes_left()[source]
Returns:

the flash cycles left, or None if unset

Return type:

int

Gets the number of flash cycles left on the device

Added in version 0.9.3.

get_guid_default()[source]
Returns:

the GUID, or None if unset

Return type:

str

Gets the default GUID.

Added in version 0.9.3.

get_guids()[source]
Returns:

the GUIDs

Return type:

[str]

Gets the GUIDs.

Added in version 0.9.3.

get_icons()[source]
Returns:

an array of icon names

Return type:

[str]

Gets the icon names to use for the device.

NOTE: Icons specified without a full path are stock icons and should be loaded from the users icon theme.

Added in version 0.9.8.

get_id()[source]
Returns:

the ID, or None if unset

Return type:

str

Gets the ID.

Added in version 0.9.3.

get_install_duration()[source]
Returns:

the estimated time to flash this device (or 0 if unset)

Return type:

int

Gets the time estimate for firmware installation (in seconds)

Added in version 1.1.3.

get_instance_ids()[source]
Returns:

the instance IDs

Return type:

[str]

Gets the instance IDs.

Added in version 1.2.5.

get_issues()[source]
Returns:

the issues, which may be empty

Return type:

[str]

Gets the list of issues currently affecting this device.

Added in version 1.7.6.

get_modified()[source]
Returns:

the UNIX time, or 0 if unset

Return type:

int

Gets when the device was modified.

Added in version 0.9.3.

get_name()[source]
Returns:

the device name, or None if unset

Return type:

str

Gets the device name.

Added in version 0.9.3.

get_parent()[source]
Returns:

the parent device, or None if unset

Return type:

Fwupd.Device

Gets the parent.

Added in version 1.0.8.

get_parent_id()[source]
Returns:

the parent ID, or None if unset

Return type:

str

Gets the parent ID.

Added in version 1.0.8.

get_percentage()[source]
Returns:

the percentage value

Return type:

int

Returns the percentage completion of the device.

Added in version 1.8.11.

get_plugin()[source]
Returns:

the plugin name, or None if unset

Return type:

str

Gets the plugin that created the device.

Added in version 1.0.0.

get_problems()[source]
Returns:

device problems, or 0 if unset

Return type:

int

Gets device problems.

Added in version 1.8.1.

get_protocols()[source]
Returns:

the device protocol names

Return type:

[str]

Gets the device protocol names.

Added in version 1.5.8.

get_release_default()[source]
Returns:

the Fwupd.Release, or None if not set

Return type:

Fwupd.Release

Gets the default release for this device.

Added in version 0.9.8.

get_releases()[source]
Returns:

array of releases

Return type:

[Fwupd.Release]

Gets all the releases for this device.

Added in version 0.9.8.

get_request_flags()[source]
Returns:

device request flags, or 0 if unset

Return type:

int

Gets device request flags.

Added in version 1.9.10.

get_root()[source]
Returns:

the root device, or None if unset

Return type:

Fwupd.Device

Gets the device root.

Added in version 1.7.4.

get_serial()[source]
Returns:

a string value, or None if never set.

Return type:

str

Gets the serial number for the device.

Added in version 1.1.2.

get_status()[source]
Returns:

the status value, e.g. Fwupd.Status.DEVICE_WRITE

Return type:

Fwupd.Status

Returns what the device is currently doing.

Added in version 1.4.0.

get_summary()[source]
Returns:

the device summary, or None if unset

Return type:

str

Gets the device summary.

Added in version 0.9.3.

get_update_error()[source]
Returns:

the update error string, or None if unset

Return type:

str

Gets the update error string.

Added in version 0.9.8.

get_update_state()[source]
Returns:

the update state, or Fwupd.UpdateState.UNKNOWN if unset

Return type:

Fwupd.UpdateState

Gets the update state.

Added in version 0.9.8.

get_vendor()[source]
Returns:

the device vendor, or None if unset

Return type:

str

Gets the device vendor.

Added in version 0.9.3.

get_vendor_ids()[source]
Returns:

the device vendor ID

Return type:

[str]

Gets the device vendor ID.

Added in version 1.5.5.

get_version()[source]
Returns:

the device version, or None if unset

Return type:

str

Gets the device version.

Added in version 0.9.3.

get_version_bootloader()[source]
Returns:

the device version_bootloader, or None if unset

Return type:

str

Gets the version of the bootloader.

Added in version 0.9.3.

get_version_bootloader_raw()[source]
Returns:

integer version number, or %0 if unset

Return type:

int

Gets the bootloader version of firmware the device will accept in raw format.

Added in version 1.4.0.

get_version_build_date()[source]
Returns:

the UNIX time, or 0 if unset

Return type:

int

Gets the date when the firmware was built.

Added in version 1.6.2.

get_version_format()[source]
Returns:

the version format, or Fwupd.VersionFormat.UNKNOWN if unset

Return type:

Fwupd.VersionFormat

Gets the version format.

Added in version 1.2.9.

get_version_highest()[source]
Returns:

the device version_highest, or None if unset

Return type:

str

Gets the highest version of firmware the device will accept.

Added in version 2.1.2.

get_version_highest_raw()[source]
Returns:

integer version number, or %0 if unset

Return type:

int

Gets the highest version of firmware the device will accept in raw format.

Added in version 2.1.2.

get_version_lowest()[source]
Returns:

the device version_lowest, or None if unset

Return type:

str

Gets the lowest version of firmware the device will accept.

Added in version 0.9.3.

get_version_lowest_raw()[source]
Returns:

integer version number, or %0 if unset

Return type:

int

Gets the lowest version of firmware the device will accept in raw format.

Added in version 1.4.0.

get_version_raw()[source]
Returns:

the hardware version, or 0 if unset

Return type:

int

Gets the raw version number from the hardware before converted to a string.

Added in version 1.3.6.

has_checksum(checksum)[source]
Parameters:

checksum (str) – the device checksum

Returns:

True if the checksum name is found

Return type:

bool

Finds out if the device has this specific checksum.

Added in version 1.8.7.

has_flag(flag)[source]
Parameters:

flag (Fwupd.DeviceFlags) – the Fwupd.DeviceFlags

Returns:

True if the flag is set

Return type:

bool

Finds if the device has a specific device flag.

Added in version 0.9.3.

has_guid(guid)[source]
Parameters:

guid (str) – the GUID, e.g. 2082b5e0-7a64-478a-b1b2-e3404fab6dad

Returns:

True if the GUID is found

Return type:

bool

Finds out if the device has this specific GUID.

Added in version 0.9.3.

has_icon(icon)[source]
Parameters:

icon (str) – the icon name, e.g. input-mouse or /usr/share/icons/foo.png

Returns:

True if the icon name is found

Return type:

bool

Finds out if the device has this specific icon.

Added in version 1.6.2.

has_instance_id(instance_id)[source]
Parameters:

instance_id (str) – the instance ID, e.g. PCI\VEN_10EC&DEV_525A

Returns:

True if the instance ID is found

Return type:

bool

Finds out if the device has this specific instance ID.

Added in version 1.2.5.

has_problem(problem)[source]
Parameters:

problem (Fwupd.DeviceProblem) – the Fwupd.DeviceProblem

Returns:

True if the problem is set

Return type:

bool

Finds if the device has a specific device problem kind.

Added in version 1.8.1.

has_protocol(protocol)[source]
Parameters:

protocol (str) – the protocol name, e.g. com.hughski.colorhug

Returns:

True if the protocol name is found

Return type:

bool

Finds out if the device has this specific protocol name.

Added in version 1.5.8.

has_request_flag(request_flag)[source]
Parameters:

request_flag (Fwupd.RequestFlags) – the Fwupd.RequestFlags

Returns:

True if the request_flag is set

Return type:

bool

Finds if the device has a specific device request flag.

Added in version 1.9.10.

has_vendor_id(vendor_id)[source]
Parameters:

vendor_id (str) – the vendor ID, e.g. ‘USB:0x1234’

Returns:

True if the vendor ID is found

Return type:

bool

Finds out if the device has this specific vendor ID.

Added in version 1.5.5.

incorporate(donor)[source]
Parameters:

donor (Fwupd.Device) – Another Fwupd.Device

Copy all properties from the donor object if they have not already been set.

Added in version 1.1.0.

match_flags(include, exclude)[source]
Parameters:
Returns:

True if the device flags match

Return type:

bool

Check if the device flags match.

Added in version 1.9.3.

remove_child(child)[source]
Parameters:

child (Fwupd.Device) – Another Fwupd.Device

Removes a child device.

NOTE: You should never call this function from user code, it is for daemon use only.

Added in version 1.6.2.

remove_children()[source]

Removes all child devices.

NOTE: You should never call this function from user code, it is for daemon use only.

Added in version 2.0.0.

remove_flag(flag)[source]
Parameters:

flag (Fwupd.DeviceFlags) – the Fwupd.DeviceFlags

Removes a specific device flag from the device.

Added in version 0.9.3.

remove_problem(problem)[source]
Parameters:

problem (Fwupd.DeviceProblem) – the Fwupd.DeviceProblem, e.g. Fwupd.DeviceProblem.SYSTEM_POWER_TOO_LOW

Removes a specific device problem kind from the device.

Added in version 1.8.1.

remove_request_flag(request_flag)[source]
Parameters:

request_flag (Fwupd.RequestFlags) – the Fwupd.RequestFlags

Removes a specific device request flag from the device.

Added in version 1.9.10.

set_battery_level(battery_level)[source]
Parameters:

battery_level (int) – the percentage value

Sets the battery level, or Fwupd.BATTERY_LEVEL_INVALID.

Setting this allows fwupd to show a warning if the device change is too low to perform the update.

Added in version 1.8.1.

set_battery_threshold(battery_threshold)[source]
Parameters:

battery_threshold (int) – the percentage value

Sets the battery level, or Fwupd.BATTERY_LEVEL_INVALID for the default.

Setting this allows fwupd to show a warning if the device change is too low to perform the update.

Added in version 1.8.1.

set_branch(branch)[source]
Parameters:

branch (str or None) – the device one line branch

Sets the current device branch.

Added in version 1.5.0.

set_composite_id(composite_id)[source]
Parameters:

composite_id (str or None) – a device ID

Sets the composite ID, which is usually a SHA1 hash of a grandparent or parent device.

Added in version 1.6.0.

set_created(created)[source]
Parameters:

created (int) – the UNIX time

Sets when the device was created.

Added in version 0.9.3.

set_details_url(details_url)[source]
Parameters:

details_url (str or None) – a URL, or None

Sets the device URL.

Added in version 2.1.2.

set_flags(flags)[source]
Parameters:

flags (int) – device flags, e.g. Fwupd.DeviceFlags.REQUIRE_AC

Sets device flags.

Added in version 0.9.3.

set_flashes_left(flashes_left)[source]
Parameters:

flashes_left (int) – the description

Sets the number of flash cycles left on the device

Added in version 0.9.3.

set_id(id)[source]
Parameters:

id (str or None) – the device ID, usually a SHA1 hash

Sets the ID.

Added in version 0.9.3.

set_install_duration(duration)[source]
Parameters:

duration (int) – the amount of time

Sets the time estimate for firmware installation (in seconds)

Added in version 1.1.3.

set_modified(modified)[source]
Parameters:

modified (int) – the UNIX time

Sets when the device was modified.

Added in version 0.9.3.

set_name(name)[source]
Parameters:

name (str or None) – the device name, e.g. ColorHug2

Sets the device name.

Added in version 0.9.3.

set_parent(parent)[source]
Parameters:

parent (Fwupd.Device or None) – another Fwupd.Device

Sets the parent. Only used internally.

Added in version 1.0.8.

set_parent_id(parent_id)[source]
Parameters:

parent_id (str or None) – the device ID, usually a SHA1 hash

Sets the parent ID.

Added in version 1.0.8.

set_percentage(percentage)[source]
Parameters:

percentage (int) – the percentage value

Sets the percentage completion of the device.

Added in version 1.8.11.

set_plugin(plugin)[source]
Parameters:

plugin (str or None) – the plugin name, e.g. hughski_colorhug

Sets the plugin that created the device.

Added in version 1.0.0.

set_problems(problems)[source]
Parameters:

problems (int) – device problems, e.g. Fwupd.DeviceProblem.SYSTEM_POWER_TOO_LOW

Sets device problems.

Added in version 1.8.1.

set_request_flags(request_flags)[source]
Parameters:

request_flags (int) – device request flags, e.g. %FWUPD_DEVICE_REQUEST_FLAG_REQUIRE_AC

Sets device request flags.

Added in version 1.9.10.

set_serial(serial)[source]
Parameters:

serial (str or None) – the device serial number

Sets the serial number for the device.

Added in version 1.1.2.

set_status(status)[source]
Parameters:

status (Fwupd.Status) – the status value, e.g. Fwupd.Status.DEVICE_WRITE

Sets what the device is currently doing.

Added in version 1.4.0.

set_summary(summary)[source]
Parameters:

summary (str or None) – the device one line summary

Sets the device summary.

Added in version 0.9.3.

set_update_error(update_error)[source]
Parameters:

update_error (str or None) – the update error string

Sets the update error string.

Added in version 0.9.8.

set_update_state(update_state)[source]
Parameters:

update_state (Fwupd.UpdateState) – the state, e.g. Fwupd.UpdateState.PENDING

Sets the update state.

Added in version 0.9.8.

set_vendor(vendor)[source]
Parameters:

vendor (str or None) – the vendor

Sets the device vendor.

Added in version 0.9.3.

set_version(version)[source]
Parameters:

version (str or None) – the device version, e.g. 1.2.3

Sets the device version.

Added in version 0.9.3.

set_version_bootloader(version_bootloader)[source]
Parameters:

version_bootloader (str or None) – the version

Sets the bootloader version.

Added in version 0.9.3.

set_version_bootloader_raw(version_bootloader_raw)[source]
Parameters:

version_bootloader_raw (int) – the raw hardware version

Sets the raw bootloader version number from the hardware before converted to a string.

Added in version 1.4.0.

set_version_build_date(version_build_date)[source]
Parameters:

version_build_date (int) – the UNIX time

Sets the date when the firmware was built.

Added in version 1.6.2.

set_version_format(version_format)[source]
Parameters:

version_format (Fwupd.VersionFormat) – the version format, e.g. Fwupd.VersionFormat.NUMBER

Sets the version format.

Added in version 1.2.9.

set_version_highest(version_highest)[source]
Parameters:

version_highest (str or None) – the version

Sets the highest version of firmware the device will accept.

Added in version 2.1.2.

set_version_highest_raw(version_highest_raw)[source]
Parameters:

version_highest_raw (int) – the raw highest version

Sets the raw highest version number from the hardware before being converted to a string.

Added in version 2.1.2.

set_version_lowest(version_lowest)[source]
Parameters:

version_lowest (str or None) – the version

Sets the lowest version of firmware the device will accept.

Added in version 0.9.3.

set_version_lowest_raw(version_lowest_raw)[source]
Parameters:

version_lowest_raw (int) – the raw hardware version

Sets the raw lowest version number from the hardware before converted to a string.

Added in version 1.4.0.

set_version_raw(version_raw)[source]
Parameters:

version_raw (int) – the raw hardware version

Sets the raw version number from the hardware before converted to a string.

Added in version 1.3.6.

Property Details

Fwupd.Device.props.battery_level
Name:

battery-level

Type:

int

Default Value:

101

Flags:

READABLE, WRITABLE

The device battery level in percent.

Added in version 1.5.8.

Fwupd.Device.props.battery_threshold
Name:

battery-threshold

Type:

int

Default Value:

101

Flags:

READABLE, WRITABLE

The device battery threshold in percent.

Added in version 1.5.8.

Fwupd.Device.props.flags
Name:

flags

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The device flags.

Added in version 0.9.3.

Fwupd.Device.props.id
Name:

id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The device ID.

Added in version 2.0.0.

Fwupd.Device.props.parent
Name:

parent

Type:

Fwupd.Device

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The device parent.

Added in version 1.0.8.

Fwupd.Device.props.percentage
Name:

percentage

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The current device percentage.

Added in version 1.8.11.

Fwupd.Device.props.problems
Name:

problems

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The problems with the device that the user could fix, e.g. “lid open”.

Added in version 1.8.1.

Fwupd.Device.props.request_flags
Name:

request-flags

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The device request flags.

Added in version 1.9.10.

Fwupd.Device.props.status
Name:

status

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The current device status.

Added in version 1.4.0.

Fwupd.Device.props.update_error
Name:

update-error

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The device update error.

Added in version 0.9.8.

Fwupd.Device.props.update_state
Name:

update-state

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The device update state.

Added in version 0.9.8.

Fwupd.Device.props.vendor
Name:

vendor

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The device vendor.

Added in version 2.0.17.

Fwupd.Device.props.version
Name:

version

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The device version.

Added in version 1.8.15.

Fwupd.Device.props.version_format
Name:

version-format

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The version format of the device.

Added in version 1.2.9.