Home > @magiclane/maps-sdk > Battery

Battery class

Battery status information sensor data.

Provides comprehensive battery information including charge level, state, health, voltage, temperature, and power connection status.

Sensor Data Source

Signature:

export declare class Battery extends GemAutoreleaseObject implements SenseData 

Extends: GemAutoreleaseObject

Implements: SenseData

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the Battery class.

Properties

Property

Modifiers

Type

Description

acquisitionTime

readonly

Date

Acquisition time

health

readonly

BatteryHealth

The overall health condition of the battery.

level

readonly

number

The current battery charge level as a percentage.

lowBatteryNoticed

readonly

boolean

Whether a low battery warning has been detected.

pluggedType

readonly

PluggedType

The type of power source the device is connected to.

state

readonly

BatteryState

The current battery operational state.

temperature

readonly

number

The current battery temperature.

type

readonly

DataType

Get data type

voltage

readonly

number

The current battery voltage in millivolts.

Methods

Method

Modifiers

Description

toJson()

Serialize to JSON