async def _async_service_add_link(hass: HomeAssistant, service: ServiceCall) -> None:
    """Service to call the addLink method for link creation on a Homematic(IP) Local connection."""
    sender_channel_address = service.data[CONF_SENDER_CHANNEL_ADDRESS]
    receiver_channel_address = service.data[CONF_RECEIVER_CHANNEL_ADDRESS]
    name = service.data.get(CONF_NAME, f"{sender_channel_address} -> {receiver_channel_address}")
    description = service.data.get(CONF_DESCRIPTION, "created by HA")

    if hm_device := _async_get_hm_device_by_service_data(hass=hass, service=service):
        try:
            await hm_device.client.add_link(
                sender_address=sender_channel_address,
                receiver_address=receiver_channel_address,
                name=name,
                description=description,
            )
        except BaseHomematicException as ex:
            raise HomeAssistantError(ex) from ex
        _LOGGER.debug("Called add_link")
Service to call the addLink method for link creation on a Homematic(IP) Local connection.
custom_components/homematicip_local/services.py