home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.04k stars 31.07k forks source link

Renault integration: Action "Stop charge button" not working #129228

Open timmkrause opened 1 month ago

timmkrause commented 1 month ago

The problem

The "Stop charge button" action provided by the Renault integration is not working.

I am pretty new to HA, please let me know if anything is missing.

What version of Home Assistant Core has the issue?

core-2024.10.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Renault

Link to integration documentation on our website

https://www.home-assistant.io/integrations/renault

Diagnostics information

Stopped because an error was encountered at October 26, 2024 at 17:50:46 (runtime: 0.69 seconds)

('err.func.wired.invalid-body-format', 'Body has at least one wrongly formatted value')

Example YAML snippet

id: '1727297505183'
alias: Zoe high, stop charging
description: ''
triggers:
  - type: battery_level
    device_id: f2ba5eea9efbfd7233fec3c3bcd4af92
    entity_id: 376843c00535426cbac96e271be71cc7
    domain: sensor
    above: 79
    trigger: device
conditions: []
actions:
  - action: notify.send_message
    data:
      entity_id: notify.tibber
      message: 🔋 Zoe sufficiently charged ({{ states.sensor.battery.state }}%).
  - device_id: f2ba5eea9efbfd7233fec3c3bcd4af92
    domain: button
    entity_id: b1694b9d6a431072aca12361226e5ae1
    type: press
mode: single

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @epenet, mind taking a look at this issue as it has been labeled with an integration (renault) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `renault` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign renault` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


renault documentation renault source (message by IssueLinks)

Steph6431 commented 4 weeks ago

Hi, I have the same problem... Best regards, Stephan

skruehoetl commented 3 weeks ago

Me too... willing to help diagnosing!

epenet commented 2 weeks ago

It is a known issue with the renault API, it works for some but not others. If you want to help, I suggest that you get involved in the library, for example https://github.com/hacf-fr/renault-api/issues/1348

ScratMan commented 1 week ago

Same issue on my Renault Zoé from 2020.

Error log seem to indicate a wrong body content formatting.

Enregistreur: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:245
intégration: Home Assistant WebSocket API (documentation, problèmes)
S'est produit pour la première fois: 19:33:52 (6 occurrences)
Dernier enregistrement: 19:35:14

[547083911376] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/renault/renault_vehicle.py", line 40, in wrapper
    return await func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/renault/renault_vehicle.py", line 156, in set_charge_stop
    return await self._vehicle.set_charge_stop()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/renault_api/renault_vehicle.py", line 532, in set_charge_stop
    response = await self.session.set_vehicle_action(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/renault_api/renault_session.py", line 261, in set_vehicle_action
    return await kamereon.set_vehicle_action(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/__init__.py", line 364, in set_vehicle_action
    await request(
  File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/__init__.py", line 157, in request
    kamereon_response.raise_for_error_code()
  File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/models.py", line 136, in raise_for_error_code
    error.raise_for_error_code()
  File "/usr/local/lib/python3.12/site-packages/renault_api/kamereon/models.py", line 98, in raise_for_error_code
    raise exceptions.KamereonResponseException(
renault_api.kamereon.exceptions.KamereonResponseException: ('err.func.wired.invalid-body-format', 'Body has at least one wrongly formatted value')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 132, in _async_press_action
    await self.async_press()
  File "/usr/src/homeassistant/homeassistant/components/renault/button.py", line 47, in async_press
    await self.entity_description.async_press(self)
  File "/usr/src/homeassistant/homeassistant/components/renault/renault_vehicle.py", line 42, in wrapper
    raise HomeAssistantError(err) from err
homeassistant.exceptions.HomeAssistantError: ('err.func.wired.invalid-body-format', 'Body has at least one wrongly formatted value')
epenet commented 1 week ago

Same issue on my Renault Zoé from 2020.

Error log seem to indicate a wrong body content formatting.

As described above this should be discussed on the library repository