DEFA Power EV Charger

I think you are right, because the Cloudcharge app shows nothing as well during charging.

I did some testing too. Debug log looks fine:

home-assistant_defa_power_2025-04-21T19-42-01.381Z.log:2025-04-21 22:37:19.452 DEBUG (MainThread) [custom_components.defa_power.coordinator] Finished fetching CloudCharge chargers data in 0.186 seconds (success: True)
home-assistant_defa_power_2025-04-21T19-42-01.381Z.log:2025-04-21 22:37:19.462 DEBUG (MainThread) [custom_components.defa_power.coordinator] Finished fetching CloudCharge operational data data in 0.162 seconds (success: True)
home-assistant_defa_power_2025-04-21T19-42-01.381Z.log:2025-04-21 22:38:19.466 DEBUG (MainThread) [custom_components.defa_power.coordinator] Finished fetching CloudCharge operational data data in 0.167 seconds (success: True)

Wheng charging CloudCharge app shows:

Start/stop charging button: available and works
Status: charging
Charging power: 0 kW
Energy (session): 0 kWh
Total energy: doesn’t change

Your integration shows:

Start/stop button: not available (!)
Charging state: unknown (!)
Charging power: 0 kW
Energy (session): 0 kWh
Total energy: doesn’t change, same value as in CloudCharge

I don’t really need power/energy values, but I would like to use “stop charging” button in automation.

Total energy value updated correctly after I stopped charging session.

The start/stop charging button availability is based on the charging state. You should be able to test them by calling the defa_power.start_charging and stop_charging actions added in v0.5.0-beta, they do not do any additional validations when called so they should work if the api supports it. You need to select the “connector” device when calling it.

I am planning to add diagnostic in the next beta release so then it will be easier to see what api responses people get.

I tested this today and unfortunately I couldn’t stop the charging.

Joining the choir of people thanking you for your efforts! I too have an eRange charger, and the start/stop charging buttons are greyed out for me as well. As @bcg I have tested calling the actions anyway, and they don’t work. This is from the debug log:

  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/defa_power/services.py", line 128, in handle_stop_charging
    await runtime_data["client"].async_stop_charging(connector_id)
  File "/config/custom_components/defa_power/cloudcharge_api/client.py", line 338, in async_stop_charging
    await self.__async_check_response(response)
  File "/config/custom_components/defa_power/cloudcharge_api/client.py", line 142, in __async_check_response
    raise CloudChargeRequestError
custom_components.defa_power.cloudcharge_api.exceptions.CloudChargeRequestError

If I understand your code correctly, this means we got a response that is neiter 200, 400, 401, or 403. Can I test this endpoint via curl and see what the response is?