Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/modules/vehicles/homeassistant/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
class HaVehicleSocConfiguration:
def __init__(
self,
calculate_soc: bool = False,
url: Optional[str] = None,
token: Optional[str] = None,
entity_id: Optional[str] = None
):
self.calculate_soc = calculate_soc
self.url = url
self.token = token
self.entity_id = entity_id
Expand Down
3 changes: 2 additions & 1 deletion packages/modules/vehicles/homeassistant/soc.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def updater(vehicle_update_data: VehicleUpdateData) -> CarState:
return fetch_soc(vehicle_config)
return ConfigurableVehicle(vehicle_config=vehicle_config,
component_updater=updater,
vehicle=vehicle)
vehicle=vehicle,
calc_while_charging=vehicle_config.configuration.calculate_soc)


def json_update(charge_point: int,
Expand Down