question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow int amp values for charging speeds other than reduced and maximum

See original GitHub issue

Is your feature request related to a problem? Please describe.

Hi I’ve a skoda citigo and I would like to select charging speed that I want but I’ve saw that currently it allow only “maximum” and “reduced” string values which map to 254 and 252, it would be nice to allaow also to take directly int values, infact I’ve tested by changing the code and if you pass a value from 5 to 32 (for skoda citigo) to the api it set directly the current to the correspond value

Describe the solution you’d like

Somethig like that:

    async def set_current(call):
        """Prepare data and modify for data call."""
        try:
            current = call.data.get('current')
            if current == "maximum":
                current = 254
            elif current == "reduced":
                current = 252
            _LOGGER.debug("Try to fetch object for VIN: %s" % call.data.get("vin", ""))
            vin = call.data.get("vin")
            car = connection.vehicle(vin)
            _LOGGER.debug(f"Found car: {car.nickname}")
            _LOGGER.debug(f"Set charger current to {call.data.get('current')} ({current})")
            await car.set_charger_current(current)
            async_dispatcher_send(hass, SIGNAL_STATE_UPDATED)
            return
        except Exception as error:
            _LOGGER.warning(f"Couldn't execute, error: {error}")
            async_dispatcher_send(hass, SIGNAL_STATE_UPDATED)
        raise Exception(f"Service call failed")    
SERVICE_SET_MAX_CURRENT_SCHEMA = vol.Schema(
    {
        vol.Required("vin"): cv.string,
        vol.Required("current"): vol.Any(vol.In(range(5, 33)), vol.In([ "maximum", "reduced"])),
    }
)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Farfarcommented, Aug 18, 2021

I have tested and verified that integer values from 1 to 16 works for my Superb iV, it also correctly limits the maximum charging current to the correct value. For instance 8 ampere instead of being limited to reduced (6) and maximum (16). This will be integrated in upcoming release 1.0.43-RC3

0reactions
Farfarcommented, Aug 27, 2021

Available in 1.0.48

Read more comments on GitHub >

github_iconTop Results From Across the Web

BU-409: Charging Lithium-ion - Battery University
Chargers made for operational readiness, or standby mode, often let the battery voltage drop to 4.00V/cell and recharge to only 4.05V/cell instead of...
Read more >
USB Battery Charging Overview | Maxim Integrated
This paper describes how to interface a simple battery charger to a USB power source. This review of USB power bus characteristics includes...
Read more >
A Designer's Guide to Lithium (Li-ion) Battery Charging - Digikey
This designer's guide helps you discover how you can safely and rapidly charge lithium (LI-ion) batteries to 20%-70% capacity in about 20-30 ...
Read more >
FAQs - Ohme
Max charge will temporarily disable all Charge Schedules and simply charge your car at full power until it is full. It temporarily turns...
Read more >
5 Things That Affect Your Charging Speed - EVgo
When you charge your electric vehicle (EV), you might notice that you don't always get the maximum charging speed advertised by either your ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found