View Source PorscheConnEx.Struct.Unit.BatteryLevel (porsche_conn_ex v0.1.0)

Structure representing battery charge level.

Fields

  • unit (atom) — only known value is :percent
  • value (integer) — percentage of full

It's a bit of a silly unit, since it could just be replaced by an integer percentage. In fact, "emobility" calls do exactly that; this structure is only used in "status" and "overview" calls.

I assume it's just used for app/web UI presentation purposes, but maybe there's some other nuance I'm not aware of.

Summary

Types

@type t() :: %PorscheConnEx.Struct.Unit.BatteryLevel{unit: unit(), value: 0..100}
@type unit() :: :percent