FwupdPlugin.Context.set_battery_state

### Method

# FwupdPlugin Contextset_battery_state

since: 1.6.0

#### Declaration [src]

    void
    fu_context_set_battery_state (
      FuContext* self,
      FuBatteryState battery_state
    )

#### Description [src]

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

Available since: 1.6.0

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

#### Parameters

`battery_state`

  Type: `FuBatteryState`

  A battery state, e.g. `FU_BATTERY_STATE_DISCHARGING`.