BatteryComfortLevel

@Serializable
abstract class BatteryComfortLevel

Represents a low battery threshold used to determine when certain actions should be triggered, such as showing a suggestion button based on the battery state. This threshold can be defined either by the remaining range in kilometers or by the state of charge percentage.

The purpose of this class is to provide flexibility in defining what constitutes a "low battery" state.

Use cases include:

  • Triggering an action when the remaining battery range falls below a specified threshold (in kilometers).

  • Triggering an action when the state of charge (SOC) percentage falls below a specified threshold (in %).

Inheritors

Types

Link copied to clipboard
@Serializable
class Range(val kilometers: Double = LOW_BATTERY_RANGE_KM) : BatteryComfortLevel

Represents a low battery threshold based on the remaining range in kilometers.

Link copied to clipboard
@Serializable
class StateOfCharge(val percentage: Double = LOW_BATTERY_SOC_PERCENTAGE) : BatteryComfortLevel

Represents a low battery threshold based on the state of charge (SOC) percentage.