async def _async_service_export_device_definition(hass: HomeAssistant, service: ServiceCall) -> None:
    """Service to call setValue method for Homematic(IP) Local devices."""
    if hm_device := _async_get_hm_device_by_service_data(hass=hass, service=service):
        try:
            await hm_device.export_device_definition()
        except BaseHomematicException as ex:
            raise HomeAssistantError(ex) from ex

        _LOGGER.debug(
            "Called export_device_definition: %s, %s",
            hm_device.name,
            hm_device.address,
        )
Service to call setValue method for Homematic(IP) Local devices.
custom_components/homematicip_local/services.py