Adding custom actions to custom C++ cover


I am developing a custom cover esphome integration.
It is working fine for supported actions (open, close, position, etc). Code is available here: EspHome-CustomCover/esphome-cover.h at b90df4d1aec2d493305e67ce90b7759e063f1402 · gmag11/EspHome-CustomCover · GitHub

But I would like to add actions to calibrate full up and full down positions. I use a Cherubini Wave Wire 45 motor that has a sequence to set calibration points:

Is it possible to add custom actions in custom cover code to that they are available using a template button to trigger calibration actions?


I’ve solved this by the moment.
I’ve used a CustomAPIDevice definition to add a service that trigger calibration actions.
Some template buttons trigger that services through HomeAssistant.
This works as I need but it requires that device is connected to HomeAssistant. I’d like to be able to trigger calibration even if it is not connected.
I’ve updated repository with latest code

Hola German! did you solve you problem? I’m looking for the exact same solution! but I’m ussing the cover component from ESPHome.
Greetings from Chile!

Actually not. I was playing with esphome development. It takes a little effort to understand how every piece matches but when you create some simple project it is not that difficult to do your own modules.

The project on which I started this thread about is still running like I tell in the second post. As I haven’t had any issue I’ve not tried anything else.