async def _async_service_get_device_value(hass: HomeAssistant, service: ServiceCall) -> ServiceResponse:
    """Service to call getValue method for Homematic(IP) Local devices."""
    channel_no = service.data[CONF_CHANNEL]
    parameter = service.data[CONF_PARAMETER]

    if hm_device := _async_get_hm_device_by_service_data(hass=hass, service=service):
        try:
            if (
                value := await hm_device.client.get_value(
                    channel_address=f"{hm_device.address}:{channel_no}",
                    paramset_key=ParamsetKey.VALUES,
                    parameter=parameter,
                )
            ) is not None:
                return {"result": value}
        except BaseHomematicException as ex:
            raise HomeAssistantError(ex) from ex
    return None
Service to call getValue method for Homematic(IP) Local devices.
custom_components/homematicip_local/services.py