### Method

# FwupdPlugin Context set_power_state

since: 1.8.11

#### Declaration [src]

    void
    fu_context_set_power_state (
      FuContext* self,
      FuPowerState power_state
    )

#### Description [src]

Sets if the system is on battery power, e.g. UPS or laptop battery.

Available since: 1.8.11

Sets property | `FwupdPlugin.Context:power-state`

#### Parameters

`power_state`

  Type: `FuPowerState`

  A power state, e.g. `FU_POWER_STATE_BATTERY_DISCHARGING`.