auto_api v0.1.0 AutoApi.ChargingCapability View Source
Basic settings for Charging Capability
iex> alias AutoApi.ChargingCapability, as: C
iex> C.identifier
<<0x00, 0x23>>
iex> C.name
:charging
iex> C.description
"Charging"
iex> C.command_name(0x00)
:get_charge_state
iex> C.command_name(0x01)
:charge_state
iex> C.command_name(0x02)
:start_stop_charging
iex> C.command_name(0x03)
:set_charge_limit
iex> C.command_name(0x04)
:open_close_charge_port
iex> C.command_name(0x05)
:set_charge_mode
iex> C.command_name(0x06)
:set_charge_timer
iex> length(C.properties)
13
iex> List.last(C.properties)
{0x0d, :charge_timer}
Link to this section Summary
Functions
Deprecated. Use API level 5 and above
Deprecated. Use API level 5 and above
Returns the command module related to this capability
Return commands id based on atom
Returns commands readable name
Returns map of commands id and thier name
Returns capability’s description: Charging
Retunrs capability’s identifier: <<0x0, 0x23>>
Returns capability’s unique name: charging
Retunrs properties under Charging:
[{0x1, :charging}, {0x2, :estimated_range}, {0x3, :battery_level}, {0x4, :battery_current_ac}, {0x5, :battery_current_dc}, {0x6, :charger_voltage_ac}, {0x7, :charger_voltage_dc}, {0x8, :charge_limit}, {0x9, :time_to_complete_charge}, {0xA, :charging_rate_kw}, {0xB, :charge_port_state}, {0xC, :charge_mode}, {0xD, :charge_timer}]
Returns the command module related to this capability
Returns binary value of capability based on list of available supported capabilities
Returns list of supported sub capability based on binary value
Deprecated. Use API level 5 and above
Deprecated. Use API level 5 and above
Link to this section Types
command_type() :: :get_charge_state | :charge_state | :start_stop_charging | :set_charge_limit | :open_close_charge_port | :set_charge_mode | :set_charge_timer
Link to this section Functions
Deprecated. Use API level 5 and above.
Retunrs capabilities under Charging:
[]
Deprecated. Use API level 5 and above.
Returns capability size: 1
Returns the command module related to this capability
command_id(AutoApi.ChargingCapability.command_type()) :: integer() | nil
Return commands id based on atom
command_name(integer()) :: AutoApi.ChargingCapability.command_type() | nil
Returns commands readable name.
Available commands:
%{0x0 => :get_charge_state, 0x1 => :charge_state, 0x2 => :start_stop_charging, 0x3 => :set_charge_limit, 0x4 => :open_close_charge_port, 0x5 => :set_charge_mode, 0x6 => :set_charge_timer}
Returns map of commands id and thier name
[{0x0, :get_charge_state}, {0x1, :charge_state}, {0x2, :start_stop_charging}, {0x3, :set_charge_limit}, {0x4, :open_close_charge_port}, {0x5, :set_charge_mode}, {0x6, :set_charge_timer}]
Returns capability’s description: Charging
Retunrs capability’s identifier: <<0x0, 0x23>>
Returns capability’s unique name: charging
Retunrs properties under Charging:
[{0x1, :charging}, {0x2, :estimated_range}, {0x3, :battery_level}, {0x4, :battery_current_ac}, {0x5, :battery_current_dc}, {0x6, :charger_voltage_ac}, {0x7, :charger_voltage_dc}, {0x8, :charge_limit}, {0x9, :time_to_complete_charge}, {0xA, :charging_rate_kw}, {0xB, :charge_port_state}, {0xC, :charge_mode}, {0xD, :charge_timer}]
Returns the command module related to this capability
Returns binary value of capability based on list of available supported capabilities
to_map(binary()) :: [command_type()] :: [map()]
Returns list of supported sub capability based on binary value
Level 5:
ie> HmAutoApi.DoorLocksCapability.to_map(<<0x00, 0x20, 0x01, 0x00, 0x02>>)
[:lock_state, :get_lock_state, :lock_unlock_doors]
Level 4:
ie> HmAutoApi.DoorLocksCapability.to_map(<<0x1, 0x0>>)
[%{bin: <<0x00>>, name: "Unavailable", atom: :unavailable, title: ""}]
Deprecated. Use API level 5 and above.
Deprecated. Use API level 5 and above.