Skip to content

Commit

Permalink
Disable ChargeLimit and BatteryCare for Superb iV (#178)
Browse files Browse the repository at this point in the history
* Disable ChargeLimit and BatteryCare for MQB platform cars such as Superb iV
* Found a better detection for battery care
  • Loading branch information
WebSpider authored Nov 6, 2024
1 parent 64bfbe7 commit c5e1dd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/myskoda/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,6 @@ async def async_set_native_value(self, value: float): # noqa: D102

def required_capabilities(self) -> list[CapabilityId]:
return [CapabilityId.CHARGING]

def forbidden_capabilities(self) -> list[CapabilityId]:
return [CapabilityId.CHARGING_MQB]
3 changes: 3 additions & 0 deletions custom_components/myskoda/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ async def async_turn_on(self, **kwargs): # noqa: D102
await self._async_turn_on_off(turn_on=True)
_LOGGER.info("Battery care mode enabled.")

def required_capabilities(self) -> list[CapabilityId]:
return [CapabilityId.BATTERY_CHARGING_CARE]


class ReducedCurrent(ChargingSwitch):
"""Control whether to charge with reduced current."""
Expand Down

0 comments on commit c5e1dd3

Please sign in to comment.