robinostlund / homeassistant-volkswagencarnet

Volkswagen Carnet Component for home assistant
GNU General Public License v3.0
304 stars 60 forks source link

Cannot start charging #551

Closed stofferdreng closed 5 months ago

stofferdreng commented 5 months ago

Before you post a new issue - you must first check the following (and check the boxes with an "X" below)

Environment

Describe the bug

Does not start charing when activating the "switch.golfvognen_charging". Returns with the following error: "Failed to call service switch/turn_on. Should have to be re-implemented"

Did work in the past

Steps to Reproduce

Just press the switch

Expected behavior

Expected to start charging the car - did work in the past

Screenshots

Traceback/Error logs

Debug information - all JSON responses from logfile

Additional context

enoch85 commented 5 months ago

I think there must be something off with their API. Up until yesterday I could see my SoC. Now it's gone.

enoch85 commented 5 months ago

Since I think it's the same issue, maybe this helps @stickpin ?

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:368
Integration: Sensor ([documentation](https://www.home-assistant.io/integrations/sensor), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+sensor%22))
First occurred: 18:30:13 (2 occurrences)
Last logged: 19:04:13
Error while setting up volkswagencarnet platform for sensor

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 368, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 672, in _async_add_entity
    original_icon=entity.icon,
                  ^^^^^^^^^^^
  File "/config/custom_components/volkswagencarnet/__init__.py", line 387, in icon
    return icon_for_battery_level(battery_level=self.instrument.state, charging=self.vehicle.charging)
                                                                                ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_vehicle.py", line 749, in charging
    cstate = find_path(self.attrs, f"{Services.CHARGING}.chargingStatus.value.chargingState")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_utilities.py", line 97, in find_path
    return find_path(src[path[0]], path[1:])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_utilities.py", line 97, in find_path
    return find_path(src[path[0]], path[1:])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_utilities.py", line 97, in find_path
    return find_path(src[path[0]], path[1:])
                     ~~~^^^^^^^^^
KeyError: 'value'
stickpin commented 5 months ago

@stofferdreng Yes, you cannot start charging because most of the actions are currently not working due to VW Backend changes. :) We are still trying to recover them https://github.com/robinostlund/volkswagencarnet/pull/239 I will disable them in the next beta to avoid confusion.

stickpin commented 5 months ago

Charging control is available again as part of the v4.5.2 beta 2 release: https://github.com/robinostlund/homeassistant-volkswagencarnet/releases/tag/v4.5.2-beta2