Add cable lock/unlock support for socket-connector charging stations - #297
Conversation
Expose a lock entity backed by the Dashboard v11 cableLocked property
(PATCH /v11/chargingstations/{serial}), mirroring the existing
availability/offline-charging switches. The entity is only marked
available when the Dashboard API actually reports a cableLocked value,
since this feature only applies to socket-connector stations and not
fixed-cable models.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Hi, thanks for this ... can you share a few screenshots where in the Dashboard we see this? I believe I do not have this, since I have a permanent locked cable. |
|
The reason why you do not see things, is that the refresh of the Dashboard only occurs every 30 mins. It can be faster, if this change is also visible in the mqtt response. |
|
Please test the pre-release version. |
|
Hi, |




Summary
lockentity to control the charging cable lock on stations with a socket connector, using the Dashboard v11cableLockedproperty (PATCH /v11/chargingstations/{serial}), verified against a real dashboard capture.unavailableunless the Dashboard API has actually reported acableLockedvalue for that station.Changes
custom_components/smappee_ev/lock.py(new):SmappeeCableLockentity.custom_components/smappee_ev/api/dashboard_client.py:async_set_cable_lock.custom_components/smappee_ev/api/device_handle.py:set_cable_locked/set_cable_unlocked.custom_components/smappee_ev/coordinators/dashboard_merge.py: parsecableLockedfrom station details intoStationState.cable_locked.custom_components/smappee_ev/models/state.py: newcable_lockedfield.custom_components/smappee_ev/__init__.py: registerPlatform.LOCK.strings.json,translations/{en,nl,fr,de}.json).README.md,docs/HA_integration.md.tests/test_lock.py(new), plus additions totest_dashboard_client.py,test_device_handle.py,test_coordinator.py.Test plan
pytest(full suite, 917 passed)ruff check/ruff format --checkpre-commit run --all-files(ruff, codespell, mypy all pass)🤖 Generated with Claude Code