FwupdPlugin.Context.get_battery_state

### Method

# FwupdPlugin Contextget_battery_state

since: 1.6.0

#### Declaration [src]

    FuBatteryState
    fu_context_get_battery_state (
      FuContext* self
    )

#### Description [src]

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

Available since: 1.6.0

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

#### Return value

Type: `FuBatteryState`

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